Questions tagged [rootview]

In view based mobile application(iOS/Android) rootview provides interface between window and otherview.

148 questions
3
votes
1 answer

How to change RootViewController (in AppDelegate) from within CustomViewController?

Good day, My app has authorization form (SigninController) which is loaded in AppDelegate, and after signing in (checking is in SigninController.m) TabBarController should appear (as main view of application). How can I change controller from Signin…
LIAL
  • 1,624
  • 4
  • 24
  • 30
3
votes
1 answer

Casting UIWindow.rootView to UIHostingController which has environment variables

Casting UIWindow.rootView to a hosting controller like: window?.rootViewController as? UIHostingController works fine, unless it has environmentObjects. As my MainTabView has been initialized with .environmentObject, I cannot cast it…
Rashid
  • 1,515
  • 16
  • 16
3
votes
1 answer

iOS: Presenting new views whose interface is loaded from a xib file and contain a Navigation Controller

There's something fundamental that I'm not understanding about presenting views that get their interface from a XIB file. My app's root view controller is a UITabBarController. One of the tab bar options presents a UINavigationController-controlled…
maxedison
  • 17,243
  • 14
  • 67
  • 114
3
votes
3 answers

Pass Data using popToRootViewController

So I have a basic app, here is how it works. I have a root view controller called A and a table view controller called B. And when the user selects a row in B I pop back to the root view controller A. And what I am trying to do is to pass the data…
user3662854
3
votes
1 answer

UIWindow's rootViewController considerations

I've been reading several posts dealing with switching the rootViewController of the window, and sometimes it is said that keeping a same rootViewController throughout the app's lifecycle is better than switching it, and other posts are related to…
AppsDev
  • 12,319
  • 23
  • 93
  • 186
2
votes
2 answers

"window" undeclared (first use in this function) error in iOS tutorial

I am trying the Core Data Tutorial and I have copied the code as given in this Apple's tutorial on Core Data…
user709903
  • 195
  • 1
  • 3
  • 10
2
votes
1 answer

Compose app - Is it possible to programatically get component tree information from RootView/DecorView?

Our SDK can't be inline with app's code, is there a way to retrieve UI tree info without app developer manually add code snippets to capture the "Component Tree" data without using the Layout Inspector tool?
changjieyang
  • 136
  • 4
2
votes
2 answers

Is there anything wrong with switching views by setting the root view controller?

I was wondering if the following is an accepted way to switch views? AppDelegate.m - (IBAction) switchViews { if (self.window.rootViewController == self.viewController) { self.window.rootViewController =…
Åke Gregertsen
  • 185
  • 2
  • 7
2
votes
2 answers

when exactly do Interface Builder items get instantiated?

Say I create a navigation based application from the template in XCode4, then there will be in the MainWindow.xib a Navigation Controller, which has as a child the RootViewController. When exactly would then: Instance of RootViewController be…
Greg
  • 34,042
  • 79
  • 253
  • 454
2
votes
2 answers

iOS Programming: Understand UINavigationController and the RootViewController

I'm reading Apple doc but I don't understand what a root controller is. The doc says that this is the controller at the bottom of the stack. Maybe, is this the controller that I've push the first time? Anyone can explain this concept? From Apple doc…
Lorenzo B
  • 33,216
  • 24
  • 116
  • 190
2
votes
1 answer

Monotouch: UINavigationController, set the RootViewController

How is it possible to map the initWithRootViewController objective-c method in Monotouch? From Miguel de Icaza Rosetta site, I've found the following translation but I don't know how to apply it: Selector: initWithRootViewController: Method: IntPtr…
Lorenzo B
  • 33,216
  • 24
  • 116
  • 190
2
votes
0 answers

How to get value from a TextView which is in a ListView without any custom adapters?

I have a ListView with a TextView (which has an integer as string) and a Seekbar. I need to extract the integer value and set it to the Seekbar. Unfortunately, when I do this, I get a NullPointer exception because the content that populates the…
Zac
  • 695
  • 1
  • 11
  • 34
2
votes
1 answer

iOS - Getting black view upon changing root view controller

I am trying to change the root view controller upon the button taps from ViewController1 to ViewController2 and vice versa. Problem is I am getting black screen after I set my second view controller as root view controller. I am enclosing my…
iOSFresher
  • 21
  • 1
2
votes
1 answer

Swift Toast message is not display "UIApplication.sharedApplication().windows"

i have add one Toast message first time is working Good , but When i use This code in appdelegate file toast message is not working Here is my code i am using in app delegate This Code "instantiateViewControllerWithIdentifier" for direct go to this…
2
votes
0 answers

android rootview malfunctionning

I'm creating a fragment that contains two listviews ,the two in a linearlayout that has as orientation:horizontal; the second listview is in a horizontalscrollview; the problem is in the second listview; I should have in each row of the listview 6…
1
2
3
9 10