Swift - Pop Up View Tutorial
Why Stack Overflow recommends it
Stack Overflow users link it as the starting point for their pop up view controller code, then ask follow-up questions about refreshing, passing data, sizing and blocking the parent view.
Recommended by 1 people across 1 different months, 2016 to 2020.
What it is
A short iOS tutorial from Seemu Apps showing how to build a pop up view in Swift by presenting a second view controller as a child over the current screen, with source code on GitHub. It is a code-along screencast aimed at beginners using Storyboards.
What people said
Recommends Santos Ramón · 2017-10 · Stack Overflow · on “Swift: Full screen UIImageView not working”
You can follow the logic of this tutorial, but instead of creating a UIViewController for the "popup" you can create an UIViewController with an imageView in fullscreen mode. [this video]
Cites Done · 2016-09 · Stack Overflow · on “Refresh view after popup is dismissed in swift”
I was watching this tutorial [this video] and I have added button in popup. Button is adding coins (IAP), but the problem is when I dismiss popup it will not refresh view to see update coins. If I hit back button and then come again it is updated. so the question is how to refresh parent view after pressing close button. here is popupVC import UIKit class PopUpViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() self.view.backgroundColor = UIColor.blackColor().colorWithAlphaComponent(0.8) self.showAnimate() // Do any additional setup after loading the view. } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that
Cites moseby · 2016-09 · Stack Overflow · on “Reach function in another viewcontroller file?”
I made a popupviewcontroller using this tutorial: [this video] And I would like when I press down the popup (with a Retry-button instead), that it should go back to the original Viewcontroller, as it does, but also restarts the "game" on the original viewcontroller automatically. So basically I want to start the game when I press "Retry" on the popup. But I only get errors when trying to reach that function.. Original Viewcontroller: var time : Float = 0.0 var timer: NSTimer? @IBOutlet weak var progressBar: UIProgressView! override func viewDidLoad() { super.viewDidLoad() startGame() } func startGame() { startTimer() } func startTimer() { timer = NSTimer.scheduledTimerWithTimeInterval(0.001, targ
Cites ScoopMatt · 2016-10 · Stack Overflow · on “Swift - Deeplink within app to launch popup viewcontroller”
I'm trying to launch a deeplink from within a Label in Swift, the intention is that the deeplink launches a popup view controller with some additional information, these deeplinks will not be available externally in the app. I have followed the following youtube video to setup the new view controller, [this video] , but the example here is on a button click, and i would like this to be dynamic as the content is driven from a database, i was hoping to use the following ( [LINK] ) to dyanmically add deeplinks into various words within a label. The part i'm stuck on is how to convert the following snippet of code, into a format that can be run when the deeplink is selected, my understanding is this
Cites Humyl · 2016-10 · Stack Overflow · on “Pass data from Parent Controller to popup Controller in Swift”
I want to create a popup controller in Swift, but I can't pass data from the parent controller to the popup (set label text in pop up) Code: let popUpPreload = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "popUpOneID") as! PopUpViewController popUpPreload.delegate = self popUpPreload.lbTitlePopUp.text = "title" popUpPreload.tvIntructions.text = "intructions" self.addChildViewController(popUpPreload) popUpPreload.view.frame = self.view.frame self.view.addSubview(popUpPreload.view) popUpPreload.didMove(toParentViewController: self) Error in set label popup text. I refer in link [this video]
Cites Min Htet Oo · 2017-04 · Stack Overflow · on “How to center the popupview that contain dynamic height content ??”
I am now implementation the pop up dialog for my iOS app according to this youtube video " [this video] ".But the problem is I can't set my pop up view to fixed height because there is dynamic height label in my popup view which is inside my popup view controller.Can anyone tell me how to solve this solution?Thanks for your attention. [LINK] Here is my code to open popup view controller from parent view controller. let PopUpVC = UIStoryboard(name:"Main", bundle:nil).instantiateViewController(withIdentifier: "FeedPopUpViewController") as! FeedPopUpViewController self.addChildViewController(PopUpVC) PopUpVC.view.frame = self.view.frame self.view.addSubview(PopUpVC.view) PopUpVC.didMove(toParentView
Cites sab3rclaw1225 · 2020-08 · Stack Overflow · on “How to block popup background in Swift?”
I am trying to make sure that parent view is unclickable when childview (aka popup) is active. But somehow I am able to select labels and buttons in parent view even when childview is on front. Can someone please help me on how can I disable parent view touch when child view is active. I referred this [this video] to create pop up view. This is button code that actives popup view: @IBAction func questionMark(_ sender: Any) { let popOverVC = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "QuestionID") as! QuestionMarkViewController self.addChild(popOverVC) popOverVC.view.frame = self.view.frame self.view.addSubview(popOverVC.view) popOverVC.didMove(toParent: self