iOS Popup View Using Separate View Controller (Xcode 8, Swift 3)

Mark Moeykens · 117K views · 2016 · 14:23

Open on YouTube

Software (other)Testing, debugging & developer toolstutorialdated

Why Stack Overflow recommends it

Stack Overflow users link it as the tutorial they followed to build a popup view controller, and it comes up in questions about problems that appear after following it, such as dismissing, navigation and passing data back.

Recommended by 1 people across 1 different months, 2018 to 2020.

What it is

A 2016 iOS tutorial by Mark Moeykens (Big Mountain Studio) showing how to build a modal popup that sits on top of a main view controller by using a separate view controller, in Xcode 8 and Swift 3. It is done mostly in the storyboard and is continued in a follow-up video.

What people said

Recommends JSharpp · 2018-11 · Stack Overflow · on “Presenting a View Controller Modally”

My solution was to create a modal segue to the new view controller. Place the content in a view within the view controller and set the view controllers background opacity to the desired amount. This can all be done through storyboard. This way when the popover view controller appears the view appears where I want it, in the correct size, and the previous view controller is still visible behind the background. The only issue I'm having with this is dismissing the modal popover when I click outside of the view. This video was helpful: [this video] Edit: This Detect any tap outside the current view [LINK] provided the solution to dismissing the modal when you touch outside of the view.

Cites ProfessorHelloKittyNr1 · 2018-05 · Stack Overflow · on “How to run code in your main view controller in swift when a pop up closes”

I'm currently writing my first swift app. Currently there is one view/view controller that loads when the app is run as well as a popup window tied to a separate view-controller (like so: [this video] ). When I close the pop-up I want to update several things on my original view and run some code. However, neither func viewDidLoad() nor func viewDidAppear() seems to run. And I can't do anything from the pop-up view since I don't have access to the components in the main view-controller from it. What should I do? The pop-up is "presented modally" if that makes a difference?

Cites Am1rFT · 2018-07 · Stack Overflow · on “Black screen after presenting model view controller in current context from tab controller”

I'm creating a Popup error message for my own app. I have followed a tutorial in [this video] . As my app is a tab bar app when Popup, comes up and a user presses another tab and then get back to that specific tab the background is changed !!!! any Idea what is happening here? 1. This is when the popUp comes up [LINK] 2.This one is when has change the tab and then came back to that specific tab [LINK] 3.This is the last state when the user close the popup after they changed the tab [LINK] none of these bugs happens if the user closes the pop up at the beginning! let next = self.storyboard?.instantiateViewController(withIdentifier: "ErrorVC") self.present(next!, animated: true, completion: nil) an

Cites ARAV · 2018-07 · Stack Overflow · on “Navigation pushViewController is not working”

i have login view controller. when usersingin i' showing popup for that i refereed [this video] i can achieved that. popup had button when i click the button navigation to next view controller but its now working when i am clicking that action is performing but its not navigating to next view controller wher i did mistake Singin class DigitalGateViewController: NANavigationViewController { @IBAction func singin(_ sender: UIButton) { let lv = NAViewPresenter().activityVC() self.present(lv, animated: true) } } this is popupviewcontroller class ActivityViewController: NANavigationViewController { @IBAction func okbuttonclick() { let dv = NAViewPresenter().myGuestListVC() // self.navigationController

Cites Mister Fisher · 2019-08 · Stack Overflow · on “How to maintain the navigation with a segue "present modally"?”

[LINK] I have : navigation controller -> tableViewController -> tab bar Controller -> ViewController1 / ViewController2 / ViewController3 I click on a cell on the TableViewController and I open the TabBar. All is OK But, I wanted to have more details from the datas in the TableViewController so I decided to make a popup with the content of the cell. I found this tutorial [this video] => GREAT ! It's about the use of segue "present modally" with a viewcontroller containing the popup. I made a link from the popup to the tabBarController and I lose the Navigation Bar [LINK] I tried to play with navigationBar but nothing is working. I changed the type of segue but I don't obtain what I want. I think

Cites swiftcaw · 2020-02 · Stack Overflow · on “How do I update a UIlabel from Popup View Using Separate View Controller”

Kinda new to Swift programming and have a question regarding updating an existing uilabel from a popup view. I followed this tutorial: [this video] I have a main ViewController named 'myViewController' and a Popup View controller named 'popUp'. On myViewController I have 1 x UILabel which is an outlet: @IBOutlet weak var myLabel: UILabel? this label is populated in viewDidLoad: myLabel.text = "hello" On the popUp View controller I have 6 Buttons. Each button has a IBAction: @IBAction func button1(_ sender: Any) { //how do I set the uilabel from here to myViewController dismiss(animated: true, completion: nil) } Im presenting the popUp like this: Storyboard Segue [LINK] I would like to be able to