0
这里是我的代码:如何处理触摸事件子视图
MAINVIEW:
NSArray *btArray = [NSArray arrayWithObjects:@"1",@"1",@"1",@"1",@"1",nil];
ButtonBarComponent *bottomeButtonBar = [[ButtonBarComponent alloc] initButtonBarComponentWithButtonArray:btArray];
bottomeButtonBar.frame = CGRectMake(0, 340, 320, 200);
[self.view addSubview:bottomeButtonBar];
子视图:
-(id)initButtonBarComponentWithButtonArray:(NSArray *)btArray {
self = [[UIView alloc] initWithFrame:CGRectMake(0, 340, 320, 200)];
self.backgroundColor = [UIColor whiteColor];
}
但为什么我不能运行触摸事件中的代码?
这是Java吗?目标C?什么语言? – 2011-04-29 02:15:27
Xcode。 iPhone的东西。 – Mikecito 2011-04-29 02:36:52
你在哪里使用initButtonBarComponentWithButtonArray方法中的数组? – 2011-04-29 02:40:53