응용 프로그램을 개발 중입니다. 그 점에서 나는 UITableViewCell의 모든 하위 뷰를 얻습니다.하위보기가 버튼인지 확인하는 방법
(void)listSubviewsOfView:(UIView *)view {
// Get the subviews of the view
NSArray *subviews = [view subviews];
// Return if there are no subviews
if ([subviews count] == 0) return;
for (UIView *subview in subviews) {
NSLog(@"%@", subview);
// List the subviews of subview
[self listSubviewsOfView:subview];
}
}
하지만 내 문제는 하위 뷰 목록에서 버튼을 찾는 방법입니다 :
이 하나의 코드입니다. 이 문제를 해결하는 방법을 알려주십시오.