Nabeel Thobani
Nabeel Thobani

Reputation: 939

iOS 6 View gets small after opening the app on iOS 7

I have view in my xib file whose height is 44 which contains buttons (like a toolbar).

It's working fine in iOS 7 now but when i open it in iOS 6 , the height of view gets small (24.0f) and so are the buttons in it.

Another thing is that, if i build the app with xcode 5 then the older versions of xcode will not be able to open xib files.

How to fix this issue? Help would be highly appreciated.

Upvotes: 0

Views: 163

Answers (2)

San D
San D

Reputation: 19

This is works for me

- (void)viewDidAppear:(BOOL)animated {

    self.view.frame = CGRectMake(0, 0, 320, 00);
    NSLog(@"%f", self.view.frame.origin.x);
    NSLog(@"%f", self.view.frame.origin.y);
    NSLog(@"%f", self.view.frame.size.width);
    NSLog(@"%f", self.view.frame.size.height);
    [super viewWillAppear:animated];

}

Upvotes: 1

Jordan Montel
Jordan Montel

Reputation: 8247

To answer of the second part of your question, the head of your xib file is different with XCode 5. But, with XCode 5 you can keep the old version of your xib using XCode 4.6 and iOS 6.

Go to your xib file and modify :

enter image description here

and use XCode 4.6 and iOS 6 :

enter image description here

With that, you can correct your bug with the 20px less in iOS 6. You need to keep your xib file in iOS 6 and add a Content View below the view with a delta of 20px in Y and add your UI elements in this content view. like this :

enter image description here

Upvotes: 0

Related Questions