这是我的 viewcontroller1.m 按钮 userinteractionenabled 功能,
-(void) BtnUserInteractionStatus {
oneBtn2.userInteractionEnabled = NO;
oneBtn3.userInteractionEnabled = NO;
}
- (void)viewDidLoad {
[super viewDidLoad];
[self BtnUserInteractionStatus];
}
这是我的 viewcontroller2.m 按钮 userinteractionenabled 功能从 viewcontroller1.m 访问,
#import "ViewController1.h"
- (void)viewDidLoad {
[super viewDidLoad];
svc = [[StageViewController alloc]init];
[svc BtnUserInteractionStatus];
}
我的viewcontroller2.h,
#import "ViewController1.h"
@interface ViewController2 : UIViewController {
StageViewController *svc;
}
@property (assign) StageViewController *svc;
但是,这是行不通的。如有错误请指正。