
Thank a lot for offering your help! For sure I will need it later.
I was able to figure out what caused the problem. While manually creating MyViewController I gave it a NIB name. When instantiating that view controller in the buttonClicked method I had to use the same NIB name in initWithNibName:@" ". I typed a different name and it caused the problem described.