Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在我的应用程序中,我包含了许多不同的标签(它们代表街道名称)。因此,我做了一些计算,以正确的角度和正确的位置显示它们。现在我想检查在我想要包含新标签的区域中是否存在具有相同文本的现有标签,但我不确定如何管理它。我可以检查十字路口吗?
我期待着帮助
您可以UILabel通过UIView以下方式获取 -
UILabel
UIView
for (id view in self.view.subviews) { if ([view isKindOfClass:[UILabel class]]) { UILabel *label = (UILabel *) view; } }