【发布时间】:2012-12-04 17:36:06
【问题描述】:
尝试查看 UIViewController 或 UIView 是否可以识别其 Storyboard ID。所以希望:
UIViewController *aViewController;
NSString *storyboardID = aViewController.storyboard.id; //not an actual property
或:
NSString *storyboardID = [aViewController.storyboard valueForKey:@"storyboardId"]; //also not a working call
但不高兴,也无法在网上找到类似的解决方案。有谁知道这是否可能?
【问题讨论】:
-
只是一个兴趣点,可以使用'[aViewController.storyboard valueForKey:@"name"];'。不过其他答案更好。
-
我是
storyboardIdentifier。 -
@Andy storyboardIdentifier 在哪里?
-
@ArgaPK 很久以前有一个名为
storyboardIdentifier的私有财产。我不知道它是否仍然可用,但您可以尝试使用valueForKey查询它。
标签: ios objective-c xcode storyboard identity