我尝试在子视图中访问我的UILabel文本
for (UIView *myView in recognizer.view.subviews) {
...
}
如何查看本研究中发现的UILabel文本?
由于
答案 0 :(得分:2)
尝试:
for (UIView *myView in recognizer.view.subviews) {
if([myView isKindOfClass: [UILabel class]]){
//check ur Label text here
UILabel * myLabel = (UILabel *) myView;
if ([myLabel.text isEqualToString: @"Your String"])
{
//GO For Ur Logic Here
}
}
}
希望它可以帮助你......快乐的编码:)