I've been designing a custom table cell layout for my app (with auto layout) and I'm facing few problems.
This is how my custom table cell xib:
My table cell XIB
http://i.stack.imgur.com/qblLW.png
What I cant find how to do:
The ImageView: The images in these cells are from remote URLS (with JSON). Their height and width is always different and I don't know them. My goal is to make the width of the image always all over the screen width with few pixels margin from the device's screen (similar to Instagram image width) with the scaled image's height (proportional to the image's width).
Instagram screenshot example
http://i.stack.imgur.com/n0brG.png
- Since I have no idea what the height of the image will be, how I can design the app so the label will always below the image with no much spacing? I mean - No matter where the images bottom is, the label will be always 10px under it.
- I don't know the label length - so the next cell will have to start as soon as the label text ends. How do I accomplish that?
Hope to get some help with those things, I feel very frustrated about it since I've done this in one line of code in my Anroid version (whoever familiar with this - TopOf anotherid / BottomOfanotherid)