ionic modal opens behind another modal [duplicate] - ionic-framework

This question already has answers here:
Ordering multiple IonicModals on top of each other
(4 answers)
Closed 6 years ago.
In my main ionic view I have a category modal that can be called by clicking a button and this modal contains a list of categories that can be selected by user.
Then I have another modal that contains a form and my category modal can also be called from this form modal by clicking another button.
If I directly open the form modal and call the category modal from there, everything works just fine and I can view the category modal.
but the problem is if I first call the category modal and close it and then open the form modal and call the category modal from there, it will open behind the form modal and I have to close the form modal to see the category modal.
how can I fix that?
thanks.

You can refer this answer for your scenario: https://stackoverflow.com/a/31629855/3878940 It explains similar scenario when multiple modals are opened and how they overlap with each other

Related

Unwanted dialog behavior with ios13 [duplicate]

This question already has answers here:
Presenting modal in iOS 13 fullscreen
(27 answers)
Closed 3 years ago.
I'm using Xcode 11 since a few days. From the startup screen you can press a button to go to the next screen via a show-segue. In this second screen you can swipe down. This results in returning to the startup screen. However I expected that this behavior is only possible for modal screens, using the Present Modally segue.
I tried the different segue kinds (Show, Show Detail, Present Modally, Present as Popover), but they all result in that the second screen can be swiped down.
I tried to use isModalInPresentation = true, but this the user can still pull down the window (however it does not get dismissed).
I expect that the second screen is as the startup screen which cannot be dismissed by pulling it down, nor give the feeling it is a modal dialog (which it isn't to begin with).
Show segue with navigation controller
isModalInPresentation = true has to work if you specify it in the second view controller which you have presented.
For example: if you are presenting HomeViewController, make sure in the viewDidLoad() of HomeViewController, you have a line of code that says isModalInPresentation = true.
If you still wish to stop the little bouncing down behavior of the second view controller, unfortunately you have to create your own custom presentation style similar to that to achieve what you want. It's not yet possible from the Apple docs at the moment.

How to add more tabs in tab view controller storyboard application? [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Xcode 4.2 Tabbed Application - Adding New Tab view
I'm new to iPhone app and I followed following tutorial to develop a tab view application using story board:
It's working fine.Thanks to the Author. :)
Now, I want to add couple of more tabs to the main view(default, its 2 tabs; I want 3 or 4).
How Can I do it?
Add one view controller (UIViewController) And Add it with your tabBarController in relationship "View Controllers"(To do this right click on tab bar controller and drag it to new view controller and select bottom most relationship seague, i.e. view controller), your XIB page should look like:
You can apply same pattern for the rest.
To Add Controller Files
As #Jamie Said:
You have to go to the menu and click on "New File", then Objective-C class, and finally make sure to select UIViewController subclass. Name it and then it will add the files. Now in your storyboard make sure to change the class of each tab to the name of your file. i.e. to assign custom class for your ViewController this I have used Name AAA for that in Image.
Just add one more View controller on the screen drag it from the controls, then hold the right click on tab bar controller bring that click on the newly added view controller and left the click the four options will be appear there choose the topmost option by clicking on it its name is "Relationships-view controllers" . and its done.

My facebook login dialog is popped UNDER my current modal view. What to do now?

Any similar experiences (I'm on iPad)?
It depends where you present your modal view controller from.
If your root controller is already presenting a modal view and you show another one, it will be shown under the open modal view.
The solution is to present the 2nd modal controller from the one that is already open.
But nevertheless I think it is not a good design (at least on iOS) to have two or more modals stacked.

how to know programmatically which view is presently appears on screen while using navigation controller

i want to know which view controller is on top of screen at a particular time so that i can control that views...
i have a 2 buttons on my bottom navigation bar,and one of these buttons pressed i should have to load particular view and and these buttons will appear in all views ...
i am pushing visit view whenever i press visit button ,but when i press visit button in visit view is gets pushing new view on existing visit view ,so whenever i press back is not getting me to previous view suddenly ...
so i want to eliminate these condition
I'm having a hard time parsing that question, but it sounds to me as though you might be looking for the topViewController and visibleViewController properties of UINavigationController.

switching between views in iphone programming [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
View Controllers: How to switch between views programmatically?
i want to go to another view from one view on a button click
please help me........
thank you
Use a UINavigationController to display the first view. When the user taps your button, call the navigation controller's pushViewController:animated: method. To return to the previous view programmatically, call one of the pop...ViewController... methods (though this may not be required, since the navigation controller itself can handle "back" button taps).
If you don't want to use the uiNevigationController then use:
[self.view addSubView:objectOfSecondPage.view];
and add this on the back button in the next page
[removeFrom SuperView];