所以這是我的代碼有:的UIButton沒有收到點擊
UIButton *svObjectButton = [UIButton buttonWithType:UIButtonTypeCustom];
svObjectButton.frame = CGRectMake(0, 0, 100, 100);
[svObjectButton addTarget:self action:@selector(svObjectTouchUpInside) forControlEvents:UIControlEventTouchUpInside];
[svView addSubview:svObjectButton];
UIButton *removeButton = [UIButton buttonWithType:UIButtonTypeRoundedRect];
removeButton.frame = CGRectMake(0, 0, 20, 20);
[removeButton addTarget:self action:@selector(removeButtonPressed) forControlEvents:UIControlEventTouchUpInside];
[svObjectButton addSubview:removeButton];
[svObjectButton bringSubviewToFront:removeButton];
但出於某種原因對removeButton全觸控直行通過對svObjectButton。
任何想法?