I am trying to push controller using
but for the universal app
i have to write..
if([[UIDevice current]UserInterfaceIdiom] == UIUserInterFaceIPad)
{
MyViewController *controller = [[MYViewController alloc]initWithNibName:@"MyViewController_IPad"];
[self.navigationCOntroller pushViewController:myViewController animated:YES];
else{
MyViewController *controller = [[MYViewController alloc]initWithNibName:@"MyViewController_IPhone"];
[self.navigationCOntroller pushViewController:myViewController animated:YES];
}
Can i get solution to overcome the ” if ”
condition and avoid the device check..
Make two nibs, one for iPhone and one for iPad name them
MyViewController~iphone.xibandMyViewController~ipad.xib(note: it’s important to match the case!). Make sure they’re both added to your target, and then in your code just do: