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.
21Apr/130

PCH file built from a different branch

After upgrading to current XCode (Version 4.6.2 (4H1003)) some of you could meet with the issue described bellow:

PCH file built from a different branch ((clang-425.0.27)) 
than the compiler ((clang-425.0.28))

Luckily the solution is simple because what’s enough is nice and quick clean (SHIFT+CMD+K or Product->Clean).

1May/100

iPhone Development FAQ

I will try regularly complete this post with most useful stuff.

Q: How to make full screen app?
A: There are two ways:

  • add property UIStatusBarHidden (Status bar is initially hidden) to info.plist and set it to true,
  • call method setStatusBarHidden in viewDidLoad
[[UIApplication sharedApplication] setStatusBarHidden:YES animated:NO]

Q: What size is application icon?
A: Icon size should be 57×57 [px] and both the glossy effect and rounded corners will be created by program automatically.