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)


I think this one is the best of its kind.. :)



Apple Tech Talk 2011 – Berlin

Apple Tech Talk 2011 Badge
As all iOS programmers know places for this conference were booked almoust immediately. At first I thought that the scale of the event will be much bigger (however doing it in 9 cities is not piece of cake – if it all will be as well orginized as in Germany),


Read from storage 0 bytes, but requested 12 bytes

From time to time this error could ocurr while force killing InteliJ process. It means that you have corrupt the caches and what you need to do is clear it (File -> Invalidate Cache). InteliJ will have to reindex all files again so reopening the projects can take a while. But if that won’t help next thing to do is delete compiler cache manually. Remove folders:

  • Users\user\.IntelliJIdea90\system\caches
  • Users\user\.IntelliJIdea90\system\compiler\project\.caches

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:

#pragma mark -
#pragma mark label


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.


Writing the college admission essay

While preparing my own essay and reading books I work out some grand rules, and I would like to share them.

  • You have to find a specific point in time to write about, 500 words it’s not enough to get into details of some meaningless fact,
  • Your story can’t be ordinary because admissions counselor have read already tons of them and you want be remembered and plant a seed that will give you passport to dreamed college,
  • There are not such things like bad stories, there are only badly narrated ones.. Each one can have it’s climax and that is what you should be focus on. Climax and The point are very important, because admission essay is not about story itself but its influence on you,
  • You have many ways to expose point of the story, it could be near the beginning and rest of essay could be strictly connected with your felling toward it or hero (You in most times) changing; you could as well write first some background stories which are leading to the point and leave yourself few sentences to comment it..