Wednesday, 16 October 2013

Ipad ios 7 Comaptiblity

In my one iPad application i have to make it compatible for the ios 7 which is already exists for ios 6.0.For that i have to do below changes.
1>I have to add below two icon files for ios 7.0
-icon files 
ipad non ratina (76*76)
ipad ratina (152*152)
2> I used custom navigation bar for my app.One issue  found in ios 7.0 that statsbar is overlapped with navigation bar 
I implement this code in appDelegate
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7) {
            [[UIApplication sharedApplication] setStatusBarStyle: UIStatusBarStyleDefault];
            for (UIView *v in self.navController.view.subviews) {
               CGRect oldFrame = v.frame;
                v.frame = CGRectMake(oldFrame.origin.x, oldFrame.origin.y + 20.0f, oldFrame.size.width, oldFrame.size.height);
            }
            [[UIApplication sharedApplication] setStatusBarStyle: UIStatusBarStyleDefault];
        }
-In all view controller to transfer all views 20 pixel down from top implement this code
 if (IS_HIGHER_IOS7) {
        for (UIView *v in self.view.subviews) {
                CGRect oldFrame = v.frame;
                v.frame = CGRectMake(oldFrame.origin.x, oldFrame.origin.y + 20.0f, oldFrame.size.width, oldFrame.size.height);
        }
    }

No comments:

Post a Comment