Reputation: 111
I have a rubymotion application that uses a rails backend. When I use a get method it pulls the stored image into an array as @picture = ["UIImageView:0x13c6f0d0"]. After it pulls in the image into the array I have the following code to render the image to the subview:
@picture.each do |pic|
pic.alloc.initWithImage(self)
pic.frame = [[0,0],[200,300]]
self.view.addSubview(pic)
end
With the loop listed above it doesn't break the application but it doesn't render the image to the page. Is there something I'm missing?
Upvotes: 0
Views: 333
Reputation: 24422
You were almost there. Try this:
@picture.each do |pic|
pic.frame = [[0,0],[200,300]]
self.view.addSubview(pic)
end
Upvotes: 1