I need to display cafe details in a viewcontroller. Cafe data is from API call, each cafe may have different data set.
Generally the view will display the following in order:
- cafe name
- address
- min 2 line and max of 4 line.
- contact number
- might be empty, max up to 2 sets of contact number
- email
- might be empty
- description (HTML)
- link to social media or website
- might be empty, max up to 4 set of URL
- map
What I need:
- display data in view if it's not empty
- be able to set the spacing before the previous element
I'm using xcode storyboard, the view controller is embed in Navigation controller and Tab bar controller.
What's the recommended way to handle flexible/dynamic interface, is there any guide or tutorial that I can follow? So far all the help I can find is simple placing of elements in fixed coordinate. For my case, some element size may change depending on the data returned from API call.