iPhone 5 (4") bottom toolbar not responding
Asked Answered
L

5

25

I'm trying to modify an app to work with the new iPhone 5, 4" screen. I've added the new launch image, "[email protected]". After that everything seemed good. Middle portion of my views is resizing ok.

However I've noticed that in a view where I have a bottom toolbar, the buttons on the toolbar are unresponsive. It looks ok, but tapping buttons does nothing. Same code run in simulator with 3.5" screen works fine.

Any ideas?

This view is within a navigation controller. It consists of a table view and toolbar. The tableview is set to resize height.

Langobard answered 13/9, 2012 at 21:8 Comment(4)
Did you inspect the frames of the toolbar and its superview? One scenario where this happens is if the child view lies outside the bounds of its container superview. The child view (or the toolbar in your case) still gets displayed because the parent view is not cutting off the content outside its bounds. One easy way to inspect the entire hierarchy is to call the hidden recursiveDescription method on a view while debugging as in po [someParentView recursiveDescription].Arita
I think that is whats happening, but I don't understand why. Trying your suggestion, the size looks correct until I get up to UIWindow where it says 320x480. Everything below has 320x568.Langobard
Thank you so much Anurag, your comment led me to solving my similar issue.Waldenburg
check this link I solve my prob with this. :[button/tool Event overlap ][1] [1]: #12502476Bunko
M
72

I had the same problem and noticed that my window.frame.size.height was still 480.0.

Solved this problem by enabling Full Screen at Launch for the MainWindow.xib file:

Steps:

  1. Open MainWindow.xib
  2. Select the Window element
  3. Open the Attributes Inspector
  4. Under Window section, enable Full Screen at Launch
Macaulay answered 14/9, 2012 at 5:38 Comment(3)
how can I set this programetically ?Mediatory
Awesome, that one checkbox man.. btw, someone asked to try this in code for equal effect doesn't seem to work - mainWindow.frame = [UIScreen mainScreen].bounds;Mignonne
Was banging my head for last two days with this. But thanks to you.. Finally solved my problem.Thinnish
P
4

There are two solution to this problem :

  1. If you are using MainWindow follow these steps :

    a. Select MainWindow.xib b. Select 'Full Screen at Launch' from Windows option available in Attributes Inspector.

  2. If your application doesn't contain MainWindow then just add 'Self.View.Frame = [UIScreen mainScreen].bounds' in ViewDidLoad.

Preamplifier answered 18/4, 2013 at 9:52 Comment(0)
L
1

I your project has MainWindow.xib then you must have to set all splash images in order to compatible you app for iPhone 5 display.

Leix answered 2/1, 2013 at 7:8 Comment(0)
H
0

My Project wasn't using MainWindow.xib. I added the following to viewDidLoad in View Controllers of all the screens:

self.view.frame = [UIScreen mainScreen].bounds;
Hamfurd answered 23/9, 2012 at 2:15 Comment(1)
didn't work, figure out how to turn the flag on for your main window in IB.. solves the problem.Mignonne
D
0

add

self.window.frame = [UIScreen mainScreen].bounds;

in this method:

-(BOOL)application:(UIApplication *)application 
didFinishLaunchingWithOptions:(NSDictionary*)options 

in your %your app name%AppDelegate.m file

Discriminatory answered 25/7, 2013 at 10:9 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.