【发布时间】:2013-10-22 19:06:49
【问题描述】:
这是我的 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;
但是,这不起作用。如有错误请指正。
【问题讨论】:
-
你得到了什么?
-
userinteractionenabled 正在 viewcontroller1 中工作。但是在 viewcontroller2 上创建的同一个按钮,然后我只是调用了 userinteractionenabled 上述格式不起作用...
-
我的要求是,按钮将一个接一个地移动,即,最初 button1 是 userinteractionenabled 是 Yes,所有按钮都是 No。如果 button1 执行操作,则 button2 被启用,依此类推。
-
这个问题已经被问了几百次了,你用谷歌搜索过这个吗? stackoverflow.com/questions/1658433/…
标签: ios objective-c