Sebastian Suchanowski Programmer's notes

27Nov/130

Autolayout without coding – UIScrollView (ambiguous scrollable content height)

Recently while doing application upgrade to iOS7 I’ve encountered few issues with autolayout machanism and I want to share with you one in particular. I hope that will help you make your app ‘responsive’ :) and you could solve the ambiguous scrollable content height issue without writing any code.

Let’s go back in history, we had an app called iDoc24 and after iOS7 was greatly adopted I had to start putting all things aside and prepare update with new style. Here how the main menu looked back then and what was the result of upgrading.

On the left we have a first version. Let’s leave the discussion if the tab bar should be used there – assume that this is the result that we want to achieve. Now – as you could imagine we have two simple (there are more but those are obvious) ways to do it:

  • Three static buttons,
  • TableView with custom cells.
1May/101

Xcode FIXME and TODO list

Before I start describing mentioned tags I would like to show useful #pragma directives. We need first to assure that option Sort list alphabetically is off like in the screen.


There are two ways of using #pragma directives:

1
2
#pragma mark -
#pragma mark label