"!"로 사용자 정의 단추를 표시하려고합니다. UITableView 셀 내부 텍스트로. 코드는 다음과 같습니다.UITableView 셀에 UIButton 표시
UIButton *informationBtn = [UIButton buttonWithType:UIButtonTypeCustom];
[informationBtn setFrame:CGRectMake(10, 5, 55, 55)];
[informationBtn setTitle:@"!" forState:UIControlStateNormal];
[informationBtn addTarget:self action:@selector(popUpWindowWithMessage:) forControlEvents:UIControlEventTouchUpInside];
[cell.contentView addSubview:informationBtn];
여기서 "셀"은 UITableViewCell 인스턴스로 정의됩니다.
그러나 단추가 셀에 나타나지 않습니다. 단추를 표시하려면 어떻게해야합니까?
아, 이것은 내가 생각해 본 적이없는 것입니다. – newguy