Join Todd Perkins for an in-depth discussion in this video Creating alert panels and alert sheets, part of Cocoa with Swift Essential Training.
- View Offline
- Exercise Files
…Let's look at creating alerts.…So I have a pretty simple project here in MainMenu.xib.…I'll click on the CreatingAlerts window.…And I have two buttons in it,…and each button is connected to a method in the app delegate class.…I can see that by clicking on a button and…then checking in the Connections Inspector.…So look under sent actions and you'll see Create Panel when I…have Alert Panel selected, then Create Sheet when I have Alert Sheet selected.…In Cocoa we can present alerts in two different ways.…
There are Alert Panels, which are essentially pop up windows, and…there are Alert Sheets.…An Alert Sheet is an overlay in an existing window,…rather than a separate window in and of itself.…So let's look at our code in AppDelegate.swift.…So we have createPanel and createSheet.…And then we have those indicators on the left side showing that…these are indeed connected to user interface elements.…I'm going to hide the utilities area by clicking the button at the top right of…the screen.…
And then we'll create an alert panel.…
- Creating your first Cocoa app
- Understanding the relationship between Cocoa and Swift
- Creating a playground
- Working with variables, functions, arrays, and loops
- Creating basic interactions and quick connections
- Building custom controller classes
- Using delegates
- Creating and arranging interface elements
- Using data controls
- Debugging and troubleshooting
- Distributing a Cocoa application
Skill Level Beginner
1. Getting Started
Installing the tools1m 14s
2. Introduction to Swift
3. Core Cocoa Skills
5. Creating User Interfaces
6. Arranging User Interfaces
7. Using Data Controls
8. Debugging and Troubleshooting
9. Distributing an Application
10. Finishing Touches
Creating full-screen apps4m 56s
Next steps1m 36s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.