1

Woohoo! My first Stack Overflow post :)

I am running into some problems trying to use Custom View Controllers in Swift.

I am working with the PopupDialog API found here: https://github.com/Orderella/PopupDialog#default-dialog-properties

This code works fine and the popup appears as desires:

    let title = "THIS IS THE DIALOG TITLE"
    let message = "This is the message section of the popup dialog default view"
    // Create the dialog
    let popup = PopupDialog(title: title, message: message, image: nil)
    self.present(popup, animated: true, completion: nil)`

But when I try to use my own View Controller like so:

let ratingVC = popupViewController(nibName: "popupViewController", bundle: nil)
let popup = PopupDialog(viewController: ratingVC, buttonAlignment: .horizontal, transitionStyle: .bounceDown, gestureDismissal: true)
present(popup, animated: true, completion: nil)

The program will compile and run, but the popup no longer appears like it did before. I am faced with a dark screen dimming in preparation for the popup, but thus, the view controller doesn't appear.

Also, any good Swift resources would be greatly appreciated, my learning so far has all been through web browsing. Thank you!

boomsoon
  • 11
  • 1

0 Answers0