Programmatically get a Storyboard ID?

后端 未结 6 1104
醉话见心
醉话见心 2020-12-02 21:52

Trying to see if a UIViewController or UIView can identify its Storyboard ID. So was hoping for:

UIViewController *aViewController;
NSString *storyboardID =         


        
6条回答
  •  南笙
    南笙 (楼主)
    2020-12-02 22:33

    You can use the Restoration ID:

    NSString *restorationId = self.restorationIdentifier;
    

    Just check the checkbox 'Use Storyboard ID'

提交回复
热议问题