Fetch image from server and render it in

78 views Asked by At

I want to fetch image from the server, save it locally and and display when user opens the show page - with Rubymotion.

I am using AFMotion to fetch the image url as follows. enter image description here

In my show screen I can get the image url with news.image_url. My doubt is how do i pass this to the layout file where I can add some styles to it like

enter image description here

1

There are 1 answers

0
yogi_bear On BEST ANSWER

I have found a solution to my own question. This is what i have done.

enter image description here

In the on_load method of the show news page, I pass the image url and set the remote_image for the UIImageView to the image url passed.

enter image description here

I got the solution from the red potion documentation. http://docs.redpotion.org/en/latest/cookbook/networking/