Questions tagged [rootviewcontroller]

145 questions
2
votes
2 answers

Present viewController over rootViewController when a notification is tapped

When the app is in terminate state and I receive a push notification. Which if I view I want the app to load normally but it should present a viewController over the rootViewController for which I've added a close button and whenever i will tap this…
Chaudhry Talha
  • 7,231
  • 11
  • 67
  • 116
2
votes
1 answer

Swift 3 iOS- Programmatically Set and Push a new RootVC from a SplitViewController's DetailNavigationController

I have a SplitViewVC that has a MasterNavVC who's root is a TableViewVC. The SplitViewVC also has a DetailNavVC that has a WhiteVC as it's root. I have several other view controllers that I want to get through from my TableViewVC: RedVC, GreenVC,…
2
votes
2 answers

Xamarin Studio - Ctrl + Drag to assign Root View Controller

I am going through the Xamarin Hello.iOS tutorial and there is an issue when trying to complete steps 6 and 7 from the…
2
votes
0 answers

Remove current ViewController after instantiate and presented the next VC

In iOS project, XCode, I have two VCs, VC1 and VC2. What I want to do is in VC1, have a button to go to VC2 using let VC2 = self.storyboard?.instantiateViewControllerWithIdentifier("VC2") as! VC2 self.presentViewController(loginVC, animated:…
user172902
  • 3,541
  • 9
  • 32
  • 75
2
votes
2 answers

Trigger an event / method when UIWindow RootViewController changes SWIFT

I'm working on an iOS framework. I have a requirement to log events when user enters or exits a particular View Controller. For that I was thinking if somehow I could be able to register a notification to trigger a custom method when the root view…
2
votes
1 answer

Error with top view controller

I have one difficulty with the root view controller. enter image description here Picture(1) Within the below code and the picture 1, everything work fine. But within picture 2 enter image description here Picture (2), I got an error said that…
1
vote
1 answer

SwiftUI [ShareSheet] connection invalidated. Attempt to present which is already presenting

I'm trying to create a share button in my app. App on SwiftUi, Xcode version 13.2.1, iPhone 15.2 If I use this code: let url = URL(string: "https://example.com") let activityController = UIActivityViewController(activityItems: [url!],…
1
vote
2 answers

How to do signin / signup and logout navigation using userdefaults in swift?

i have scenedelegate, appdelegate, signinVC, signupVC, and homeVC viewcontroller flow like below UINavigationController(initialVC) ->SigninVC (signin and signup buttons) -> homeVC(logoutBtn) i need when i signIn or signUp i need to move…
Swift
  • 1,074
  • 12
  • 46
1
vote
0 answers

why i am not able to move from loginpage in swift?

I have Registration, Login and Home viewcontrollers my app flow is 1) if i register with name password then i need to go home page and in home page if i tap logout i need to go login page 2) after registration if i go login with registration name…
Swift
  • 1,074
  • 12
  • 46
1
vote
4 answers

Root view controller offset issue from Safe Area

When root view controller appears, the view seems like conflicting with safe area But when I change tab and come back again to this tab again, is seems like everything is ok Edit: class Switcher { static func updateRootVC(){ let status =…
Hanzala Raza
  • 149
  • 1
  • 16
1
vote
0 answers

Swift - How to dismiss my RootViewController?

I have a multi-screen app, with RootPageViewController as starting ViewController. When the user logs out of his/her account, I want to dismiss all ViewControllers and present the WelcomeViewController. Down below is what I do; if let appDelegate =…
Sotiris Kaniras
  • 520
  • 1
  • 12
  • 30
1
vote
2 answers

Returning to rootViewController, viewDidAppear is called beforeviewDidLoad

I need to return to my rootViewController when the app move from background to foreground. So in applicationWillEnterForeground I have written this code: let storyboard = UIStoryboard(name: "Main", bundle: nil) let mainController =…
Silvia
  • 21
  • 2
1
vote
0 answers

Status bar labels turn white after setting UIWindow's rootViewController

Some times after doing this if let window = UIApplication.shared.keyWindow { window.rootViewController = HomeTabBarController() } I get this kind of visual of status bar status bar visual it doesn't happen always and when it happens it may stay…
1
vote
1 answer

Updating/Changing root view controller after initially opening app for iOS13+

I'm trying to update the root view controller from ViewController() to fourYearPlan(). When the user initially opens the app, they are greeted in ViewController() and led to a TableViewController(). From there, when they tap on a tableViewCell, it…
1
vote
5 answers

Swift navigation bar - remove left bar item

I want to remove back-button which takes me to previous VC. Is solution in changing rootVC or? I have LoginVC and HomeVC. If user successfully logs in, he shouldn't have an option to go back to login screen because it makes no sense. LoginVC: let…
1
2
3
9 10