gpt4 book ai didi

ios - 我怎样才能得到对象的字符串名称?

转载 作者:行者123 更新时间:2023-12-01 17:54:45 29 4
gpt4 key购买 nike

<分区>

我需要获取 UILabel、UITextView 等的对象名称。示例:

@property (nonatomic, strong) IBOutlet UITextField *Adress;

...

for (UIView *theObject in [self.view subviews]){
NSString *objName = //theObject name
NSLog(@"name of subview is: %@", objName);
// should be "name of subview is: Adress "
}

有人有什么想法吗?

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com