menuView= [[UIImageView alloc] initWithFrame:CGRectMake(0,411, 320,49)];
UIButton *test = [UIButton buttonWithType:UIButtonTypeCustom ];
test.frame = CGRectMake(0, 0, 80, 49);
[test addTarget:self action:@selector(buttonPressed:) forControlEvents:UIControlEventTouchUpInside];
[menuView addSubview:test];
[self.view addSubview:menuView];
我触摸里面(测试)按钮。但没有工作。为什么??UIButton Touch事件不起作用
呢'self'实现一个名为'buttonPressed:'的方法? – 2012-01-14 08:41:36