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 :
MacroMain开发者_如何学JAVAView *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.
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
精彩评论