Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Loading the XIB dependent on the device
- //
- // 1. create your viewcontroller's named MyViewController~ipad.xib and MyViewController~iphone.xib
- //
- // 2. inizialize your class with MyViewController myvc = [[MyViewController alloc] initWithDefaultNib];
- //
- - (id)initWithDefaultNib
- {
- NSString *nibName =[[[[[NSBundle mainBundle] pathForResource: NSStringFromClass([self class]) ofType:@"nib"] componentsSeparatedByString:@"/"] lastObject] stringByReplacingOccurrencesOfString:@".nib" withString:@""];
- if (self = [super initWithNibName:nibName bundle:nil]) {
- }
- return self;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement