Programmatically get a Storyboard ID?
You can use the restorationIdentifier, it's right above the Storyboard identifier and it's a UIViewController property.
Is this possible to Set ViewController Storyboard ID programmatically?
When you programmtically create a VC , then you don't have to load it with identifier you only need
let first = FirstVC()
// in AppDelegate
didFinishLaunchingWithOptions
it's suppose you use
self.window?.rootViewController = UINavigationController(rootViewController: first)
then inside the first
let second = SecondVC()
self.navigationcontroller?.pushViewController(second,animated:true)
Is it possible to programmatically get the identifier of a basic UIViewController from an UIViewController or Storyboard in Swift/Objective-C?
In Swift:
var str: String! = self.restorationIdentifier
Get storyboard ID programmatically
Solved it with NSString *restorationId = self.restorationIdentifier;
Related Topics
What's the Equivalent of the Uisplitviewcontroller in Swiftui
Could Not Find an Overload for "Init" That Accepts the Supplied Arguments in Swift
How to Limit an iOS App Only to 4 Inch Screen Devices
How to Pass Data from One Container to Another, Both Embedded in the Same Uiviewcontroller in Swift
Auto Adjust Custom Uitableviewcell and Label in It to the Text
Check If User Is Logged into Icloud? Swift/Ios
How to Use Sfsafariviewcontroller with Swiftui
Reverse an Audio File Swift/Objective-C
How to Consecutively Present Two Alert Views Using Swiftui
How to Create Otp Verification Screen and Detect Delete Backward on Multiple Uitextfield Is Swift
Getter VS Computed Property. What Would Warrant Using One of These Approaches Over the Other
How to Make the View Update Instant in Swiftui
Uitableviewcells with Uibutton Overlaps While Scrolling
Launching Viber App via Url Scheme on iOS
How to Change the Color of the Text in a Uipickerview Under iOS 7
CSS Styled Scrollbars Support for Safari Mobile on iOS 6 Disappeared