0
UIButton *btn1 = [UIButton buttonWithType:UIButtonTypeCustom];
[btn1 setImage:[UIImage imageNamed:@"restaurant.png"] forState:UIControlStateNormal];
UIButton *btn2 = [UIButton buttonWithType:UIButtonTypeCustom];
[btn2 setImage:[UIImage imageNamed:@"restaurant1.png"] forState:UIControlStateNormal];
if([scaleStr isEqualToString:@"0.139738"]){
btn1.frame = CGRectMake(330,145,5,5);
[imageScrollView addSubview:btn1];
} else if ([scaleStr isEqualToString:@"0.209607"]) {
[btn1 removeFromSuperView];
btn2.frame = CGRectMake(495,217.5,10,10);
[imageScrollView addSubview:btn2];
}
我已經doubletap在UIScrollview.If背景圖像時設置的按鈕i抽頭第二時間加倍,第一按鈕也show.I要刪除哪些我創建第一按鈕。刪除舊的按鈕時雙抽頭
另外我在下一個條件中刪除btn1。
請在此幫助我。