嘗試查看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