Wednesday 19 June 2013

xib compatible with both iphone 5 and iphone 4 devices

Hi Team,



 NSString *viewName;
        if ([[UIScreen mainScreen] bounds].size.height == 568)
        {
            viewName = [[NSString alloc] initWithString:@"ViewControllerIphone5"];
            
            //this is iphone 5 xib
        }
        else
        {
            viewName=[[NSString alloc] initWithString:@"ViewController"];
           
            // this is iphone 4 xib
        }

  
enter image description here enter image description here enter image description here

Thanks & Regards,
R.Anusha

No comments:

Post a Comment