尝试查看UIViewController或UIView是否可以识别它的Storyboard ID。因此,希望为:以编程方式获取故事板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
@Andy storyboardIdentifier在哪里? – ArgaPK