47 questions
1
vote
4
answers
2k
views
How do you dismiss the previous view controller or a controller that I want from another view controller?
I want to dismiss a view controller that is not currently on top.
I present a view controller and when I present it I want the previous one closed.
To give more details, this is the path I follow A -&...
1
vote
0
answers
206
views
Swift 5: Unbalanced calls to begin/end appearance transitions for xxViewController when i try dismiss views
i have two errors "Unbalanced calls to begin/end appearance transitions for DonesViewController"(its my last viewcontroller) and the same error fot BottomSheetViewController, when i try to ...
2
votes
1
answer
2k
views
Perform function on Dismiss of a View Controller
i am calling a GET(method) API on viewDidAppear function of a view controller. i am presenting a new view controller using navigation controller over my first view controller. on the second view ...
-2
votes
1
answer
443
views
how to make a show a new controller after closing another controller?
I am new to Swift and want to make a simple application
When the user launch the application, He sees the FirstViewController where there is 1 Login button, when the user tap on this button, ...
2
votes
0
answers
605
views
fullScreenCover Dismiss with Drag SWIFTUI
Is it possible to dismiss a View with a scroll view by dragging down when in .fullScreenCover? I know .sheets can, but can it be done with fullScreenCover? I very new at swift.
0
votes
2
answers
2k
views
iOS get notified in parent viewcontroller when presented viewcontroller is dimissed
I have a view controller which presents another view controller and within the presented viewcontroller , user makes choices which will lead to many other notifications to be pushed but when we ...
0
votes
2
answers
382
views
How to close multiple viewcontrollers in one time?
For my requirement, I have to go back to my rootviewcontroller (tabbar) but It have many page present on it.
example flow
my tabbar (have 4 tabs each tab has own navigation ) -> push(vc1) -> ...
0
votes
0
answers
154
views
Dismiss and popViewController not working when presentingViewController is UITabbarController
My scence
UITabbar ( UINavigation(page1) -push-> page2 -push-> page3 -present-> page4 )
From my feature I stay on page4 and want to dismiss it and pop to root ( page1 ) but when I get ...
0
votes
1
answer
249
views
How to dismiss multiple present view controllers?
If I have some flow of my application like this..
navigation(vc1) --pushed--> vc2 --present--> navigation(vc3) --push--> vc4 --push--> vc5
how to dismiss to vc2 ?
1
vote
1
answer
867
views
Dismiss a View Controller and present a new one in the same method - swift
Summary of problem
I have two View Controllers (VC1 = MainViewController and VC2 = ResultViewController).
In VC1 there is a method called endGame(). In this method I want to both dismiss VC1 and ...
0
votes
1
answer
304
views
Showing ViewController's View when animating upper ViewController
I have ViewController(1) presented over another ViewController(2), I want to accomplish the effect that when I dismiss viewController1 I perform a reduction of size through CGAffineTransform and I ...
1
vote
1
answer
72
views
Stop Dismissing UIViewController While User finished Action in UIAlertControl
How to handle action of alert controller button tapped, then continue dismissing of current view controller?
Some Peace of Code:
internal func dismissPasscodeLock(_ lock: PasscodeLockType, ...
0
votes
1
answer
582
views
How to dismiss viewcontroller and pop to root viewcontroller swift?
I have main TabbarController which holds ViewController(A).
From this A pushed another ViewController(B) using navigationController?.pushViewController
From B pushed another ViewController(C) using ...
2
votes
5
answers
3k
views
Swift: Call a method from ViewController1 after dismissing ViewController2
I'm currently building a homework tracking app where you can add courses in a TableView. In one ViewController, I have a list of courses that already exist. I also have a button that allows the user ...
2
votes
2
answers
6k
views
Close a modal view with a button in Swift?
Learning some view controller basics and am stuck on how to dismiss a modal with a button.
In my slimmed-down example, I have a two view setup with the initial view and the modal. The first view has ...
1
vote
1
answer
1k
views
How to run code when view controller in iOS is dismissed by swiping down? [duplicate]
I have a view controller that I present in my iOS app using Swift and Xcode that is able to be dismissed by swiping down on it. I need to implement code that executes when the user swipes down on the ...
0
votes
1
answer
332
views
Delete current and presenting view controller in objective-c
I have a tableview controller, a detail VC. and an edit detail VC that allows for deletion of an item. The Tableview is fed by an array of items.
Upon deletion of the item, I would like not only to ...
0
votes
2
answers
391
views
black screen visible when dragging viewcontroller to tabbarcontroller in swift?
When i am presenting from TabbarController to Outside Viewcontroller presenting correctly and also Dismiss correctly.but when i drag to dismiss the ViewController it show's Black screen using ...
3
votes
1
answer
1k
views
Dismiss only presented view controller not the whole navigation stack Swift
I have a tab bar controller. In that the first tab is a navigation controller. Lets call it controller A. I am then pushing another view controller on it. Lets call it controller B.
After that I am ...
-1
votes
2
answers
57
views
Dimiss View Controller to Specific View Controller Issue
i have VC1 and i present VC2 and then multiple VC's after it like in a flow,
VC3 -> VC4 -> VC5
Now i want VC5 to dismiss to VC2, i have searched and tried code and call the view controller by ...
1
vote
1
answer
3k
views
SwiftUI - Dismiss Keyboard when Picker selected
Is there a simple means of dismissing the keyboard or any other active control when another control such as a date picker becomes active? Or vice versa.
There are some solutions for dismissing the ...
-1
votes
1
answer
126
views
iOS: Child View Controller dismissal causes viewDidLoad to be called again
I have a view controller, SubscribeVC which uses InAppPurchases service which is injected into it. The user initiates the purchase logic and during the process, StoreKit shows few UIAlertControllers ...
0
votes
0
answers
84
views
How to store variable value of popup or dismissed ViewController
Let's say I has a audio player app and there is song list (tableView) in VC1 to present all the songs and clicking any row of it to open another VC2 to present the playing scene. In this playing scene ...
0
votes
2
answers
228
views
View controller dismiss issue
I am setting up a new application which have a firebase authentication
While you are registered user there is no problem with you to create and post add (Item) so other people can see it. BUT if you ...
0
votes
2
answers
5k
views
Swift: How to dismiss a ViewController programmatically?
I got a little problem.
On my main view controller I got a bar button that opens a slide menu, which is a regular view controller using a slide in transition. The slide menu has a button to open ...
0
votes
1
answer
224
views
UITableViewController didSelectRowAt not properly dismissing
As you can see below in my code I've tried a few things to dismiss the UIViewTableController back into my parent ViewController once a row is selected to no luck
didselectRowAt code in my ...
1
vote
3
answers
98
views
Issue on dismissing a viewController to rootViewController
I am trying to dismiss a viewController to rootViewController while signOut. But the problem is that the viewController is not getting dismissed, It still remains in the same page itself.
Below I have ...
-1
votes
1
answer
266
views
How can I go dismiss two viewcontrollers with navigation controller?
I have three relevant views, they are all connected to a navigation controller, with push segues (also I have stored arrays using prepare for segue with all three). So I want to use dismiss since I ...
0
votes
0
answers
90
views
Shouldn't dismiss (nsviewcontroller method to dismiss view controller) be a class method?
Apple documentation says, dismiss(viewcontroller) dismisses the viewcontroller passed in the argument. currently i can call this method only on an NSViewController instance. shouldn't this method be a ...
0
votes
1
answer
154
views
Button Handler Syntax for Dismissing ViewController in IOS
I have created a custom UIBarButton in code to dismiss a custom viewController. The compiler does not like my syntax, however.
Here is the code to create the UIBarButtonItem:
//grab VC
detailC* ...
0
votes
2
answers
363
views
Dismiss view controller not executing when using material design dialogs in iOS Swift
I'm using material design dialog for my iOS app written with swift. Here is the brief documentation of material design dialogs: https://material.io/develop/ios/components/dialogs/
I have a dialog ...
3
votes
1
answer
400
views
how to close all view controllers that presented modally inFront of each other with unwind segue in swift?
so I have a main view controller that the view controllers will present inFront of each other and I want when user click the button in the last view controller close all of the presented modally view ...
0
votes
0
answers
539
views
Outlets are being hidden on dismiss of view controller
In my app, I have a screen it is like a submit form, which contains dropdown picker, textfields and buttons. There are two buttons one is to pick image from gallery and other one to pick image from ...
0
votes
3
answers
759
views
Cant dismiss view controller after present it
After presenting a Tab bar controller, I can't dismiss tab bar controller.
I also can't even tap my button after I reinstall without delete the app. Need to uninstall and reinstall the app then I am ...
0
votes
1
answer
90
views
how can I dismiss first vc that second has presented modally on the first vc
I have a view controller that named "firstVC" and another one that named "secondVC" . the secondVC will present modally on the first vc I want to dismiss firstVC and secondVC when user push the button ...
1
vote
2
answers
2k
views
View Controller won't dismiss and present new view controller immediately
I'm trying to present a view controller once the QRCode reader has been dismissed, however when doing this the QRCode reader view controller is presented again. The code snippet below shows the method ...
2
votes
1
answer
3k
views
Swift: Presenting modally and dismissing a navigation controller
I have a very common iOS app scenario:
The MainVC of the app is a UITabBarController. I set this VC as the rootViewController in the AppDelegate.swift file:
func application(_ application: ...
0
votes
1
answer
67
views
dismisscontroller delegate method not working
I have 2 viewcontrollers, first VC contains backButton.
firstVC.h
@protocol DVDelegate <NSObject>
-(void)DVViewControllerDismissed:(NSString *)stringForFirst;
@end
and also contains delegate ...
-1
votes
1
answer
2k
views
Difference between `present` & `push` ViewController
dismissViewController method not working to get previous viewcontoller
[self.navigationController dismissViewControllerAnimated:YES completion:nil];
popViewController work and go to previous ...
0
votes
0
answers
781
views
iOS app crash when call dismiss method
From an UIViewController embebed in a UITabBarController I perform a modal segue by
self.present(.....
being "self" my view controller inside my UITabBarController. The new ViewController shows ...
0
votes
0
answers
34
views
Swift 3 Dismissing all view controllers beside current one
I have seen lots of answers on how to go to the root view controller, but I want to keep open the view controller that is currently being shown but then dismiss all view controllers that came prior to ...
0
votes
1
answer
1k
views
Interactive sliding menu goes to completion as soon as pan gesture starts [Swift]
I am trying to implement a sliding menu that can be interactively dismissed by horizontal panning, same as the ones in Uber and Google apps. Everything works as expected except that, as soon as I ...
0
votes
1
answer
43
views
IOS/Autolayout: Change to Presenting View After Presented Controller Dismissed
I am trying to get autolayout to work properly on a view controller with a scrollview. When I load the view controller the first time, it is not doing what I want. However, if I launch a second ...
0
votes
3
answers
1k
views
How to move to parentViewController if you push and present multiple viewControllers?
I have a tabBar controller as parent and I'm pushing a view controller with navigationController. then presenting 2 other view Controllers above to it. its like Tabbar(homeController) -> Child1(push) -...
-1
votes
1
answer
154
views
Swift: How to make sure that no infinite ViewController are stacked on top of each other (how to dismiss them if necessary)? [duplicate]
I am creating a simple app with three ViewController in interface builder. Right now they are presented in this order:
FirstVC > SecondVC > ThirdVC
FirstVC
Shows the main menu, a play button is ...
13
votes
4
answers
23k
views
How to dismiss 2 view controller in swift ios? [closed]
How to dismiss 2 view controllers in Swift iOS?
Below is my code.
@IBAction func backButtonTapped(sender: AnyObject) {
self.presentingViewController
.presentingViewController
....
82
votes
6
answers
172k
views
modal View controllers - how to display and dismiss
I'm breaking my head for the last one week on how to solve the issue with showing and dismissing multiple view controllers. I have created a sample project and pasting the code directly from the ...