2
secondViewController.h的对象:属性视图没有发现任何类型secondViewController
#import <UIKit/UIKit.h>
@interface secondViewController : UIViewController
@end
viewController.m:
#import "ViewController.h"
#import "secondViewController.h"
@interface ViewController()
@end
@implementation ViewController
@synthesize secondViewController;
- (IBAction)switchView:(id)sender{
[self.view addSubview:secondViewController.view atIndex:0];
}
属性视图没有发现任何类型secondViewController的对象 有什么麻烦吗?
我建立一个xib文件initWithNibName – leoliu 2012-03-18 12:58:42