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 > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 10-15-2009, 12:22 PM   #1 (permalink)
Registered Member
 
Join Date: Oct 2009
Posts: 4
Default Unwanted upward 20 pixel shift in iPhone screen

I've used Interface Builder to create a .xib file, in which I've put a UIButton at the very bottom of the screen. That's how I want it. But when I run the program in the iPhone simulator, the button is shifted upwards by about 20 pixels, whereas I want it at the very bottom. In fact, the whole screen is shifted upwards by about 20 pixels.

If I create a new iPhone application from scratch on my system, then I don't have this problem.

But I am creating my application by extending a tutorial I found on the web (at iPhone Tutorial - Multiple XIB files on Vimeo - it's an excellent tutorial on creating an application with multiple xib files, if you're interested).

In the tutorial, there is a "SecondViewController" (of type UIViewController), "SecondView" (of type UIView), and SecondView.xib files - and the "second view" functionality does not have the upward shifting problem. I've created a "ThirdViewController", "ThirdView" , and ThirdView.xib" along exactly the same lines as the "second view" stuff, but the "third view" when I run it in the simulator gives me this mysterious screen shifting upwards problem.

I will greatly appreciate any hints to the solution.

Thanks,
Sandeep
sandpjain is offline   Reply With Quote
Old 10-15-2009, 02:12 PM   #2 (permalink)
Registered Member
 
scotopia's Avatar
 
Join Date: Oct 2008
Posts: 2,028
Default

20 pixels is the height of the status bar; almost always when there are mysterious shifts of 20 pixels up and down it involves handling of the status bar somehow.
scotopia is offline   Reply With Quote
Reply

Bookmarks

Tags
interface builder, screen, shift, simulator, uibutton

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 273
20 members and 253 guests
ADY, AragornSG, Bertrand21, Dani77, Dattee, Duncan C, fkmtc, HDshot, HemiMG, iDifferent, JasonR, macquitzon216, mer10, prchn4christ, Rudy, sacha1996, sneaky, spiderguy84, Sunny46, theone8one
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,885
Threads: 89,231
Posts: 380,768
Top Poster: BrianSlick (7,129)
Welcome to our newest member, bookesp
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 03:11 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0