Database Reference
In-Depth Information
@IBOutlet
weak
var
segmentedControl:
UISegmentedControl
!
@IBOutlet
weak
var
imageView:
UIImageView
!
@IBOutlet
weak
var
nameLabel:
UILabel
!
@IBOutlet
weak
var
ratingLabel:
UILabel
!
@IBOutlet
weak
var
timesWornLabel:
UILabel
!
@IBOutlet
weak
var
lastWornLabel:
UILabel
!
@IBOutlet
weak
var
favoriteLabel:
UILabel
!
override
func
viewDidLoad() {
super
.
viewDidLoad
()
}
@IBAction
func
segmentedControl(control:
UISegmentedControl
) {
}
@IBAction
func
wear(sender:
AnyObject
) {
}
@IBAction
func
rate(sender:
AnyObject
) {
}
}
The bad news is that in its current state, Bow Ties doesn't do anything. The good
news is that you don't need to do any Ctrl-dragging!
The segmented control and all the labels on the user interface are already
connected to
@IBOutlets
in code. In addition, the segmented control, the Wear
button and the Rate button all have corresponding
@IBActions
.
It looks like you have everything you need to get started adding some Core Data…
but wait, what are you going to display onscreen? There's no input method to speak
of, so the app must ship with sample data.
That's exactly right. Bow Ties includes a property list called
SampleData.plist
that
contains the information for seven sample ties, one for each color of the rainbow: