The function I wrote to achieve this is below.
Please note that I only needed it to fill out vertically but I am sure it could be adapted easily to work any other way.
[lua]–[[Make sure to define a rectangle the height of the content above this function. in my case it is called detailBG
there is also a displayGroup called detailScreenScroll defined above this.
And finally there is an image called detailBgTop at the top of the content group defined above this]]–
local function tileBG()
local paper = display.newImageRect(“bg-repeat.png”, 320, 73)
paper:setReferencePoint(display.TopCenterReferencePoint)
paper.x = (display.contentWidth / 2)
paper.y = detailBgTop.height
detailScreenScroll:insert(2, paper)
local maxHeight = math.ceil(detailBG.height / paper.height)-- getting the total amount of images we need to fill the background using the total height divided by the height of each background image
paper:removeSelf()–removing the original image as we have the height details we need from it.
bgInstance = {}–setting up table
maxBg = math.ceil(maxHeight)–setting the max background height
for i = 1, maxBg do
print(i)–printing us how many images we need to fill the background
bgInstance[i] = display.newImageRect(“bg-repeat.png”, 320, 73)
–bgInstance[i]:setReferencePoint(display.TopCenterReferencePoint)
detailScreenScroll:insert(1, bgInstance[i])–inserting at the back of the displayGroup (because it’s a background duh!)
bgInstance[i].x = display.contentWidth / 2
bgInstance[i].y = bgInstance[i].height * i
– the following if statement was because there was a bottom image I was using at the end of the repeated background if you dont need this then comment it out
if (i == maxBg) then
bgInstance[maxBg]:setReferencePoint(display.TopCenterReferencePoint)
bgInstance[maxBg].y = (detailBgBot.y - bgInstance[maxBg].height)
end
end
end
tileBG()[/lua]
I just had a few drinks at the local pub… so if you are having trouble getting this to work, even after defining extras described at the start comments let me know 
Hope this helps someone needing a simple way to do this, and it works for retina displays too
[import]uid: 69160 topic_id: 14022 reply_id: 51681[/import]