Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Status bar is the wrong size on iPad when running in iPhone emulation mode #14

Closed
anystone opened this issue Jan 19, 2011 · 1 comment
Closed

Comments

@anystone
Copy link

The status bur shows up as too long when running an iPhone app in emulation mode on an iPad.

I fixed it by making the following changes:

  • Moved kScreenWidth define above the IsIPad macro

  • Changed IsIPad macro to:

        
    #define IsIPad (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) && (kScreenWidth > 480)
    
    • In initWithFrame after setting the initial statusBarFrame, need to correct the frame width because on iPad in emulation mode it gives a statusBarFrame that is too wide (at least in iOS 4.2.1)

      if( statusBarFrame.size.width > kScreenWidth )
      statusBarFrame.size.width = kScreenWidth;

By the way, thank you very much for this library - it's great!

@myell0w
Copy link
Owner

myell0w commented Jan 19, 2011

Thanks for pointing this out, fixed with commit 5a980fa. And thanks for the compliment - always appreciated :)

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants