logo
down
shadow

How to set root view controller in storyboard animated with navigation controller programmatically


How to set root view controller in storyboard animated with navigation controller programmatically

Content Index :

How to set root view controller in storyboard animated with navigation controller programmatically
Tag : ios , By : Kuer
Date : November 24 2020, 01:01 AM

should help you out I have my login screen how ever i can able to skip that screen and go to home page when I am in the home page I could`d able to get my navigation controller in my home page i have embedded navigation controller with my login page have connectivity via push segue to home page every thing is good but nav bar is not coming in homepage if I try to embedded nav controller in homepage then also its not coming ... my code is , User following method to set rootViewController using navigation:
[(UINavigationController*)self.window.rootViewController pushViewController:yourViewController animated:YES];

Comments
No Comments Right Now !

Boards Message :
You Must Login Or Sign Up to Add Your Comments .

Share : facebook icon twitter icon

Using Split View Controller and Navigation Controller As Window Root View Controller Alternately


Tag : ios , By : iyogee
Date : March 29 2020, 07:55 AM
will be helpful for those in need I finally found a way. I probably found the error. What i have done is cutting the branch on which i am sitting. I was releasing the view controller which i am currently in:) When viewdidDisappear called, there is no such view controller. Because i throw away it to space already.Below is my working steps. I hope it will be useful to someone. But i cant stand thinking of apple may reject my app. I wish finding a suitable way.
This is my working ultimate way of using split view controller and navigation controller as window root view controller alternately.
AppDelegate.h
@property (assign,nonatomic) UINavigationController * NC;
@property (assign,nonatomic) UISplitViewController *SVC;
AppDelegate.m
//Creating my main screen controller
//Creating my navigation controller with my view controller instance. Then
self.NC= my_navigation_controller;
self.window.rootViewController= self.NC;
 MyMainScreen.m
 -(void) OpenSplit()
 {
      //Creating my master view controller of SVC
      //Creating my detail view controller of SVC
      //Creating my SVC;
      AppDelegate * app_delegate= [[UIApplication sharedApplication] delegate];
      app_delegate.SVC= newly created my SVC;
      app_delegate.window.rootViewController= app_delegate.SVC;          
 }
MyDetailView.m
- (void) viewDidLoad()
{
    ...
    AppDelegate * app_delegate= [[UIApplication sharedApplication] delegate];
    app_delegate.NC= nil;  //i dont need it now. i am releasing. Releasing Navigation Controller release as well child controllers. I learned with testing.
}   
MyDetailView.m
-(void) closeSplitView
{
     //Creating navigation controller with my main screen view controller
     AppDelegate * app_delegate= [[UIApplication sharedApplication] delegate];
     app_delegate.NC= newly_created_NC;
     app_delegate.window.rootViewController= appdelegate.NC;
} 
 MyMainScreen.m
 -(void) viewDidLoad
 {
    AppDelegate * app_delegate= [[UIApplication sharedApplication] delegate];
    app_delegate.SVC= nil; //I am releasing it because i am working with NC now.
 }

How to return to view controller in main.storyboard from a xib without using navigation controller or navigation bar?


Tag : ios , By : harley.holt
Date : March 29 2020, 07:55 AM
should help you out Yes, you have to insert you called viewController to NavigationController, but if you wont to use modal flow - to close presentedViewController just call:
[self dismissViewControllerAnimated:YES completion:^{

}];
- (void)viewDidAppear:(BOOL)animated
{
    [super viewDidAppear:animated];

    UIViewController *c = [[UIViewController alloc] init];
    c.view.backgroundColor = [UIColor redColor];

    [self presentViewController:c animated:YES completion:^{
        [self dismissViewControllerAnimated:YES completion:^{

        }];
    }];
}

Error trying to programmatically add a controller file to a navigation controller without creating storyboard


Tag : ios , By : Jµ.
Date : March 29 2020, 07:55 AM
I think the issue was by ths following , If you are not using a storyboard then you shouldn't attempt to create your sign-in view controller from a storyboard. Change the code to create the view controller directly:
func SignIn(sender: UIButton!) {
    print("I'm, here")
    let controller = signInController()
    self.navigationController?.pushViewController(controller, animated: true)
}

Storyboard's view controller not showing up when programmatically set as root view controller


Tag : ios , By : semicolonth
Date : March 29 2020, 07:55 AM
will be helpful for those in need You need to initialize the window programmatically.
Try adding the following to the beginning of your didFinishLaunchingWithOptions method in Appdelegate
self.window = UIWindow()
UIApplication.shared.windows.first?.rootViewController = rootVC
window?.rootViewController = rootVC

When set root view controller programmatically navigation and tab bar missing


Tag : ios , By : Hugo
Date : March 29 2020, 07:55 AM
Related Posts Related QUESTIONS :
  • How can I achieve automatic scrolling in my text view when text comes down to the keyboard level in Swift?
  • how to get the location with the CLLocationManager every 10 secondes?
  • Calling completion handler of a function from Timer selector function Swift
  • How to make SwiftUI view fullscreen?
  • RAM, JSC, Views, UI and JS usage table appearing whenever I launch my react native app. How to remove this table?
  • Change status bar background color using UIStatusBarManager
  • Should we make tapGesture component an IBAction or IBOutlet to capture the tap event?
  • Iframe automatically goes full screen using Ionic 3.9.2 on iOS
  • How to calculate score out of 1000 given some seconds (In Double)
  • How to calculate time (minutes) between two dates in swift?
  • There was problem loading requested app.it looks like you may be using LAN URL
  • Swift circular corners doesn't work properly on different screen sizes
  • How change .navigationBarTitle font in SwiftUI?
  • What happens if `MPSCNNConvolutionDataSource` protocol's `load` method return false?
  • Why does the UIBarButtonItem not show up when I create it with code?
  • How to prevent following view controller inheriting navigation view controller bar?
  • What does it mean when .xcodeproj files are shown in red in Xcode?
  • Xcode SwiftUI how to scroll the Preview Canvas?
  • Expand tableview and increase scrollview content size by an appropriate difference on clicking a button inside a table c
  • xcodebuild failed with return code: 65 - using CLI/Appcenter but no error messages
  • "'isDeveloperModeEnabled' is deprecated: This no longer needs to be set during development. " What is isDevelo
  • Right click in UIKit for Mac
  • How we Support Dark Mode in Current iOS App with iOS 13?
  • Security vulnerablility issue in ios mobile app
  • How to set a background color for the viewController in swiftUI?
  • SwiftUI : Segue navigation
  • iOS 13 Custom UISearchBar _searchField crash
  • USDZ models have holes in SceneKit but not QuickLook
  • Why does iOS Password Autofill not prompt to save password on keychain?
  • Pushing information to firebase after event is created(Firebase-Realtime-Database)
  • Xcode 11 Beta and Carthage bootstrap
  • How to change the status bar background color and text color on iOS 13?
  • Using Core Data with SwiftUI
  • How should I do to wait all the data downloaded completely and show on TableView?
  • Can we specify the number of rows that can be shown in each section of a collection view
  • Why sometimes completion handler not called?
  • Protocol 'View' can only be used as a generic constraint because it has Self or associated type requirements
  • In UIKit we can set label.numberOfLines = 0 when we do not know how many lines the text will take? What is the alternati
  • Swift ISO8601 format to Date returning fatal error
  • SwiftUI Login Page Layout
  • Xcode: Could not locate installed application. Install claimed to have succeeded, but application could not be found on
  • See the TestFlight crash log in the Xcode
  • Why does zero UIView's CALayer.speed stops UIAlertController's buttons from working?
  • Firestore collectionGroup query returns empty result
  • Modify text in SwiftUI
  • CNCopyCurrentNetworkInfo with iOS 13
  • WWDC 2019 - iOS13 April 2020 requirement
  • Nativescript IPhone X - How to "hide" home indicator behind two swipes to go to home screen
  • Should I use a singleton location manager in Swift?
  • Accessibility problem in reusable TableViewCell
  • Remove top line containing Done button from Keyboard Using Storyboard or in Swift
  • Swift Storyboard - Centring an Icon and multi-line text horizontally
  • viewDidAppear is delayed by 0.5 sec
  • Pass URL values to SecondView Controller WebView (WKWebView)
  • How to upload images faster on iOS, when using takePictureAsync?
  • Tableview multiple sections with one floating header
  • UITextView: Huge Memory Usage
  • How to put a logo in NavigationView in swiftui?
  • How can I load an UIImage into a SwiftUI Image asynchronously?
  • How to remove highlight on tap of List with SwiftUI?
  • shadow
    Privacy Policy - Terms - Contact Us © scrbit.com