我在我的项目中添加了一个UIScrollView ...我添加了10个按钮“fieldButton”一次,然后我想添加其他5个按钮的同一个UIScrollView。它试图做到这一点第一次添加10按钮也进入scrollview ..如何删除第一个添加10按钮之前添加其他项目。在相同的滚动视图...删除按钮形式滚动视图
if(a == 1){
for(int i = 0; i< 10; i++){
UIButton *fieldButton_area = [[Mos_component alloc]getComboButton:title andFrame:CGRectMake(0, y, 180, 40)];
[fieldButton_area addSubview:cid];
[fieldButton_area addTarget:self action:@selector(get_Area:) forControlEvents:UIControlEventTouchUpInside];
[state_scroll addSubview:fieldButton_area];
}
}
else{
UIButton *fieldButton_state = [[Mos_component alloc]getComboButton:title andFrame:CGRectMake(0, y, 180, 40)];
[fieldButton_state addSubview:cid];
[fieldButton_state addTarget:self action:@selector(get_Area:) forControlEvents:UIControlEventTouchUpInside];
[state_scroll addSubview:fieldButton_state];
}
非常感谢....帮助.... – jaleel 2010-01-06 11:32:51
它不能正常工作 – jaleel 2010-01-06 13:59:47
究竟是什么错? – Vladimir 2010-01-06 14:27:14