Sebastian Suchanowski Programmer's notes


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.

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).


Invalid length for a Base-64 char array

Lately I am working on iDoc24 stuff ( and and this is my major responsibility for the moment – but not only iOS apps but also taking care of backend system (which was originally written in – bleh! :p). I’ve encountered a lot of issues there and I’d like to share them with you.

Here is the most important line from stack trace I’ve got

at System.Convert.FromBase64String(String s)

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.