Black screen when loading iPad Storyboard. - objective-c

So I am working on an app https://github.com/Kronusdark/PerlinNoiseKit and I had a (crappy) iPhone UI going, but I decided to make it run on my iPad. The problem is that when it loads the iPad storyboard, I get a black screen. I have checked my project summary and it is pointing to the correct storyboard file. The outlets all appear to be set correctly, and it will actually run code in my viewController on my iPad. I just get no UI. I have pushed my most recent changes to my repo if anyone wants to try to run it, any advice would be helpful.

Eureka! It turns out one of my sub-views were not working properly. After I removed the offending view my storyboard loaded no problem. I believe it was due to a rogue drawRect:.

Related

WatchKit crash due to accepted event even if not everything is loaded

I have made an extension with a storyboard and some table view. In the simulator all is running ok, but when I try the app on Apple Watch I have some troubles. Since the Apple Watch is slower than the simulator it takes about one second to display the table views. During this time in the place of the table view is displayed nothing. If the user press the empty area that will be filled by the table view, as soon as the table view become visible it will be processed the event associated to the table view. I do not know why but this causes the app crash!!! I think everything would be solved if I do like in the other applications on my Apple Watch that while loading the view shows the rotating circle and not the elements of the view that are already in the storyboard (like buttons and labels) added at compile time.
I have to say that maybe the crashed are due to an use of NSTimer that modify some variables modified by the app, maybe I should use a mutex. But I do not figure how in the Apple Watch the application crashes (or it appears the rotating circle and keep rotating) but in the simulator is ALL OK. What can I do? Do you need additional information? Thanks!

UIViewcontroller's view frame starting at unexpected location

We are started to convert our iOS 6 application into iOS 7. I tried to create one screen for my application. I used Xib file for design, I designed the screen from top to bottom with UILabel and UIButtons. When I tried to run the app in Simulator it showing differently from xib design. In simulator the designs are came down and bottom UILabel has hide.
I got the self.view.frame from viewDidLoad() was (0,64,32,504). But, it is showing correctly in viewDidAppear (0,0,320,568).
How can I resolve this issue in Xcode 5? Could you please help me to solve this.Looking forward your reply. Thanks.
You cannot depend on the frame in -viewDidLoad, because it hasn't been resized for the device at that point. You need to wait for -viewDidAppear.

UI in in IOS simulator doesn't show

I have a question I am trying to create a database from a tutorial that I have posted on here. The problem that I keep having is that when I build the project the project is built successfully. However when the IOS simulator pulls up to show me the UI I have a black screen. I have doubled checked that my connections to my storyboards are correct. and still my UI still not displaying. I have made sure that I had my sqlite library connected within the project and it is. This is a single view application for an IPAD. I have searched ways of finding issues within my code and I have done breakpoints to see where my application breaks. and This is what I have found.
this is where my application breaks because is the first screen that it pops after I have started the IOS simulator. I do not know how to fix this.
this screen basically tells me that there is something wrong with the UIwindow alloc. For some reason is breaking here and I do not know why.
This last screen shot is not that great to interpret especially if its in numbers.
Please help. I will be posting more screen shots if needed at this point I need all the help that I can get. I did not think that it would be difficult to create and link a db.
If you are using storyboards you need to remove all the code in didFinishLaunchingWithOptions and just return YES. Also set your main storyboard file appropriately in the plist file.

UITableView Misalignment with Navigation Bar (cells get stuck underneath on rotate)

I'm using the new Storyboarding feature in Xcode 4.2, and I've run into a problem where my UITableView seems to forget that there is a Navigation Bar upon device rotation. When the device is rotated, the cells appear to be trapped under the Navigation Bar. This bug is driving me absolutely insane, where I might just trash the project and start over.
Since I have recently noticed this, I am not sure if it is something that I had done / misconfigured or a bug. Nevertheless, to the issue:
Images of the Issue:
The image below shows what my application looks like once loaded. Everything is aligned correctly
Once the device is rotated, the UITableView ignores the Navigation Bar and assumes its space.
The problem persists even when the device is reoriented to portrait mode.
My struts and springs in Xcode are no different from a default UINavigationController dragged out from the object library. I've even ditched my UINavigationController and reconfigured a new one.
For the record, I do NOT have my main navigation controller subclassed.
Lastly, there is a similar post on Stack Overflow, but as you can see, my Navigation Bar does resize itself correctly upon rotation.
Add this in the didRotateFromInterfaceOrientation method.
[self.navigationController.view layoutSubviews];
Looks like you have wantsFullScreenLayout = YES in the UIViewController.

iPad orientation

I have question regarding changing orientation on iPad.
I use MonoTouch, but if Obj-C programmers can help, it will be just as great.
First of all, I figured out if I provide different splash screen images for different orientations, app will show the right one. This can be done for any orientation, such as "Default-LandscapeLeft.png", or generic one "Default-Landscape.png".
All of my images are of correct dimensions and yet, when I start it in portrait mode, it shows it enlarged. All of other modes work perfectly well.
Second problem is I want my app to continue to be in that orientation after my first controller appear. At the moment, it shows portrait in any case. I started generating orientation notifications before first controller appeared (UINavigationController), but I think it responds only on orientation changes. After I moved device, it rotates and from that moment, everything works fine. BUT, I want to "inherit" orientation info from my splash screen.
Any idea will be appreciated.
Thanks guys and girls.
Cheers
Images for different orientations:
Default.png and Default-Landscape.png should be provided + setting the app settings to provide the required orientations.
Second problem:
After creating the first controller call
myController.WillRotate(UIApplication.SharedApplication.StatusBarOrientation, 0);