I have a generic UIViewController which has multiple uses. It can be instantiated for 6 different ways as it is designed to be very generic. Let us call this multipurpose viewcontroller as MultiPurposeViewController.
Type1VC = MultiPurposeViewController()// initiated differently
self.navigationController.push(Type1VC)
Inside Type1VC:
Type2VC = MultiPurposeViewController()// initiated differently than before
self.navigationController.push(Type2VC)
Is it allowed to do an operation with a navigation controller?
Edit:
- Will such an operation cause any memory issues?
- Is such an operation allowed when dealing with
UINavigationController
stack? - Has anybody encountered such a scenario of stacking multiple instances of the same
UIViewContoller
onto aUINavigationController
stack without having any memory leaks?