0
votes

If I already have a UIViewController(no nib) on iphone,and I wanna use it on ipad. I use a IBOutlet(UIView)on ipad to show this view.

I try to set in viewDidLoad :

MacroMainView *marcoview =[[MacroMainView alloc]initWithNibName:nil bundle:nil];

marcoView =[marcoview view];

[[self view]addSubview:marcoView];

but still no work.. What should I do??

Thanks in advance.

1

1 Answers

0
votes

You should use loadView method for a UIViewController without a nib. UIViewController Doc

If you create your views manually, you must override this method and use it to create your views