Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 02-19-2010, 02:45 PM   #10 (permalink)
Dr.Lightning
Registered Member
 
Join Date: Feb 2010
Posts: 13
Default

Quote:
Originally Posted by Sayid Cohen View Post
The following code solve it for me:

Code:
- (void)viewWillAppear:(BOOL)animated {
	// to fix the controller showing under the status bar
	self.view.frame = [[UIScreen mainScreen] applicationFrame];
}
==CONFIRMED== The above suggestion worked. In detail, in the context of the most simple Hello World example, which is in the context of the code I posted higher up, here's what I did. I found in MyViewController.m the function viewDidLoad, that was put there automagically by XCode when the class was created, but was commented out. I removed the comment-out to restore the code, then added the appropriate code inside:

Code:
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
	self.view.frame = [[UIScreen mainScreen] applicationFrame];
    [super viewDidLoad];
}
And that fixed the problem.

==WHAT THIS MEANS== in essence is that the tutorial falls short of being purely "correct" and should have included this or a similar fix. Perhaps ==MORE TO THE POINT==, XCode should have put that code in there, running not commented out.
Dr.Lightning is offline   Reply With Quote
 

» Advertisements
» Online Users: 298
20 members and 278 guests
ADY, apatsufas, dacapo, HemiMG, ilmman, iosdevjtp, leahov, MarkC, marto1914, masc2279, morands, PsychoChris, sly24, sneaky, Sunny46, tgjorgoski, thh022, Thrillhouse1919, timle8n1, vogueestylee
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,877
Threads: 89,222
Posts: 380,718
Top Poster: BrianSlick (7,129)
Welcome to our newest member, peterkessler45
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 10:04 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.