I am trying to create a OS X app using Swift, and it's been going well until now!
What I want to do is prompt user to enter a password in an alert (or any dialog really), save it in a variable and use it later on. Now, this app is just to get my hands dirty, so I don't even want the input box to be secure. It just needs to popup and ask for text input.
I have looked everywhere. Scanned the
If you are using storyboards, you can create a new viewcontroller in the storyboard with the layout for your box. Then you can for example have this new viewcontroller be shown as a sheet, or a pop-up using a segue.
You can also use
presentViewController in code to show the viewcontroller in a more custom fashion (using a custom animation for example).