Skip to content

Commit 8cecdd1

Browse files
committed
Updated all projects for Xcode 6.2 Beta 5 (6C121)
1 parent f89ece7 commit 8cecdd1

File tree

113 files changed

+60
-60
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+60
-60
lines changed

chapter-addressBook/.DS_Store

-6 KB
Binary file not shown.

chapter-addressBook/Adding Persons to Groups/Adding Persons to Groups.xcodeproj/project.xcworkspace/xcshareddata/Adding Persons to Groups.xccheckout

+9-9
Original file line numberDiff line numberDiff line change
@@ -10,31 +10,31 @@
1010
<string>Adding Persons to Groups</string>
1111
<key>IDESourceControlProjectOriginsDictionary</key>
1212
<dict>
13-
<key>F0E34773117208A82F87A9711AD23C44CCB7F10A</key>
14-
<string>https://vandad.np%2540gmail.com@atlas-server.oreilly.com/git/1234000002130.git</string>
13+
<key>FAE4317C0AD339F317935F9863494CB31647F712</key>
14+
<string>github.com:vandadnp/iOS-8-Swift-Programming-Cookbook.git</string>
1515
</dict>
1616
<key>IDESourceControlProjectPath</key>
17-
<string>projects/chapter-addressBook/Adding Persons to Groups/Adding Persons to Groups.xcodeproj</string>
17+
<string>chapter-addressBook/Adding Persons to Groups/Adding Persons to Groups.xcodeproj</string>
1818
<key>IDESourceControlProjectRelativeInstallPathDictionary</key>
1919
<dict>
20-
<key>F0E34773117208A82F87A9711AD23C44CCB7F10A</key>
21-
<string>../../../../..</string>
20+
<key>FAE4317C0AD339F317935F9863494CB31647F712</key>
21+
<string>../../../..</string>
2222
</dict>
2323
<key>IDESourceControlProjectURL</key>
24-
<string>https://vandad.np%2540gmail.com@atlas-server.oreilly.com/git/1234000002130.git</string>
24+
<string>github.com:vandadnp/iOS-8-Swift-Programming-Cookbook.git</string>
2525
<key>IDESourceControlProjectVersion</key>
2626
<integer>111</integer>
2727
<key>IDESourceControlProjectWCCIdentifier</key>
28-
<string>F0E34773117208A82F87A9711AD23C44CCB7F10A</string>
28+
<string>FAE4317C0AD339F317935F9863494CB31647F712</string>
2929
<key>IDESourceControlProjectWCConfigurations</key>
3030
<array>
3131
<dict>
3232
<key>IDESourceControlRepositoryExtensionIdentifierKey</key>
3333
<string>public.vcs.git</string>
3434
<key>IDESourceControlWCCIdentifierKey</key>
35-
<string>F0E34773117208A82F87A9711AD23C44CCB7F10A</string>
35+
<string>FAE4317C0AD339F317935F9863494CB31647F712</string>
3636
<key>IDESourceControlWCCName</key>
37-
<string>ios8cookbook</string>
37+
<string>iOS-8-Swift-Programming-Cookbook</string>
3838
</dict>
3939
</array>
4040
</dict>

chapter-addressBook/Inserting a Person Entry into the Address Book/Inserting a Person Entry into the Address Book.xcodeproj/project.xcworkspace/xcshareddata/Inserting a Person Entry into the Address Book.xccheckout

+9-9
Original file line numberDiff line numberDiff line change
@@ -10,31 +10,31 @@
1010
<string>Inserting a Person Entry into the Address Book</string>
1111
<key>IDESourceControlProjectOriginsDictionary</key>
1212
<dict>
13-
<key>F0E34773117208A82F87A9711AD23C44CCB7F10A</key>
14-
<string>https://vandad.np%2540gmail.com@atlas-server.oreilly.com/git/1234000002130.git</string>
13+
<key>FAE4317C0AD339F317935F9863494CB31647F712</key>
14+
<string>github.com:vandadnp/iOS-8-Swift-Programming-Cookbook.git</string>
1515
</dict>
1616
<key>IDESourceControlProjectPath</key>
17-
<string>projects/chapter-addressBook/Inserting a Person Entry into the Address Book/Inserting a Person Entry into the Address Book.xcodeproj</string>
17+
<string>chapter-addressBook/Inserting a Person Entry into the Address Book/Inserting a Person Entry into the Address Book.xcodeproj</string>
1818
<key>IDESourceControlProjectRelativeInstallPathDictionary</key>
1919
<dict>
20-
<key>F0E34773117208A82F87A9711AD23C44CCB7F10A</key>
21-
<string>../../../../..</string>
20+
<key>FAE4317C0AD339F317935F9863494CB31647F712</key>
21+
<string>../../../..</string>
2222
</dict>
2323
<key>IDESourceControlProjectURL</key>
24-
<string>https://vandad.np%2540gmail.com@atlas-server.oreilly.com/git/1234000002130.git</string>
24+
<string>github.com:vandadnp/iOS-8-Swift-Programming-Cookbook.git</string>
2525
<key>IDESourceControlProjectVersion</key>
2626
<integer>111</integer>
2727
<key>IDESourceControlProjectWCCIdentifier</key>
28-
<string>F0E34773117208A82F87A9711AD23C44CCB7F10A</string>
28+
<string>FAE4317C0AD339F317935F9863494CB31647F712</string>
2929
<key>IDESourceControlProjectWCConfigurations</key>
3030
<array>
3131
<dict>
3232
<key>IDESourceControlRepositoryExtensionIdentifierKey</key>
3333
<string>public.vcs.git</string>
3434
<key>IDESourceControlWCCIdentifierKey</key>
35-
<string>F0E34773117208A82F87A9711AD23C44CCB7F10A</string>
35+
<string>FAE4317C0AD339F317935F9863494CB31647F712</string>
3636
<key>IDESourceControlWCCName</key>
37-
<string>ios8cookbook</string>
37+
<string>iOS-8-Swift-Programming-Cookbook</string>
3838
</dict>
3939
</array>
4040
</dict>
Binary file not shown.

chapter-addressBook/Retrieving Properties of Address Book Entries/Retrieving Properties of Address Book Entries.xcodeproj/project.xcworkspace/xcshareddata/Retrieving Properties of Address Book Entries.xccheckout

+9-9
Original file line numberDiff line numberDiff line change
@@ -10,31 +10,31 @@
1010
<string>Retrieving Properties of Address Book Entries</string>
1111
<key>IDESourceControlProjectOriginsDictionary</key>
1212
<dict>
13-
<key>F0E34773117208A82F87A9711AD23C44CCB7F10A</key>
14-
<string>https://vandad.np%2540gmail.com@atlas-server.oreilly.com/git/1234000002130.git</string>
13+
<key>FAE4317C0AD339F317935F9863494CB31647F712</key>
14+
<string>github.com:vandadnp/iOS-8-Swift-Programming-Cookbook.git</string>
1515
</dict>
1616
<key>IDESourceControlProjectPath</key>
17-
<string>projects/chapter-addressBook/Retrieving Properties of Address Book Entries/Retrieving Properties of Address Book Entries.xcodeproj</string>
17+
<string>chapter-addressBook/Retrieving Properties of Address Book Entries/Retrieving Properties of Address Book Entries.xcodeproj</string>
1818
<key>IDESourceControlProjectRelativeInstallPathDictionary</key>
1919
<dict>
20-
<key>F0E34773117208A82F87A9711AD23C44CCB7F10A</key>
21-
<string>../../../../..</string>
20+
<key>FAE4317C0AD339F317935F9863494CB31647F712</key>
21+
<string>../../../..</string>
2222
</dict>
2323
<key>IDESourceControlProjectURL</key>
24-
<string>https://vandad.np%2540gmail.com@atlas-server.oreilly.com/git/1234000002130.git</string>
24+
<string>github.com:vandadnp/iOS-8-Swift-Programming-Cookbook.git</string>
2525
<key>IDESourceControlProjectVersion</key>
2626
<integer>111</integer>
2727
<key>IDESourceControlProjectWCCIdentifier</key>
28-
<string>F0E34773117208A82F87A9711AD23C44CCB7F10A</string>
28+
<string>FAE4317C0AD339F317935F9863494CB31647F712</string>
2929
<key>IDESourceControlProjectWCConfigurations</key>
3030
<array>
3131
<dict>
3232
<key>IDESourceControlRepositoryExtensionIdentifierKey</key>
3333
<string>public.vcs.git</string>
3434
<key>IDESourceControlWCCIdentifierKey</key>
35-
<string>F0E34773117208A82F87A9711AD23C44CCB7F10A</string>
35+
<string>FAE4317C0AD339F317935F9863494CB31647F712</string>
3636
<key>IDESourceControlWCCName</key>
37-
<string>ios8cookbook</string>
37+
<string>iOS-8-Swift-Programming-Cookbook</string>
3838
</dict>
3939
</array>
4040
</dict>
Binary file not shown.

chapter-basics/.DS_Store

-6 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

chapter-basics/Presenting Temporary Information on the Screen with Popovers/Presenting Temporary Information on the Screen with Popovers/PopoverTableViewController.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ class PopoverTableViewController: UITableViewController {
105105
let cell = tableView.dequeueReusableCellWithIdentifier(
106106
TableViewValues.identifier, forIndexPath: indexPath) as UITableViewCell
107107

108-
cell.textLabel.text = items[indexPath]
108+
cell.textLabel!.text = items[indexPath]
109109

110110
return cell
111111

chapter-camera/.DS_Store

-6 KB
Binary file not shown.
Binary file not shown.

chapter-cloud/.DS_Store

-6 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.

chapter-concurrency/.DS_Store

-6 KB
Binary file not shown.

chapter-concurrency/Adding Background Fetch Capabilities to Your Apps/Adding Background Fetch Capabilities to Your Apps/ViewController.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ class ViewController: UITableViewController {
8080
let cell = tableView.dequeueReusableCellWithIdentifier("Cell",
8181
forIndexPath: indexPath) as UITableViewCell
8282

83-
cell.textLabel.text = newsItems[indexPath.row].text
83+
cell.textLabel!.text = newsItems[indexPath.row].text
8484

8585
return cell
8686
}
Binary file not shown.
Binary file not shown.

chapter-data/.DS_Store

-14 KB
Binary file not shown.

chapter-data/Boosting Data Access in Table Views/Boosting Data Access in Table Views/PersonsListTableViewController.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ NSFetchedResultsControllerDelegate {
8383

8484
let person = frc.objectAtIndexPath(indexPath) as Person
8585

86-
cell.textLabel.text = person.firstName + " " + person.lastName
86+
cell.textLabel!.text = person.firstName + " " + person.lastName
8787
cell.detailTextLabel!.text = "Age: \(person.age)"
8888

8989
return cell
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-6 KB
Binary file not shown.
Binary file not shown.
-6 KB
Binary file not shown.
Binary file not shown.

chapter-dynamics/.DS_Store

-6 KB
Binary file not shown.
Binary file not shown.

chapter-extensions/.DS_Store

-6 KB
Binary file not shown.
Binary file not shown.

chapter-extensions/Adding Widgets to the Notification Center/Widget/TodayViewController.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class TodayViewController: UITableViewController, NCWidgetProviding {
3333
TableViewConstants.cellIdentifier,
3434
forIndexPath: indexPath) as UITableViewCell
3535

36-
cell.textLabel.text = items[indexPath.row]
36+
cell.textLabel!.text = items[indexPath.row]
3737

3838
return cell
3939

Binary file not shown.
Binary file not shown.

chapter-extensions/Providing a Custom Sharing Extension to iOS/ShareExtension/AudienceSelectionViewController.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class AudienceSelectionViewController: UITableViewController {
7979

8080
let text = Audience.allValues[indexPath.row].rawValue
8181

82-
cell.textLabel.text = text
82+
cell.textLabel!.text = text
8383

8484
if text == audience{
8585
cell.accessoryType = .Checkmark

chapter-fileManagement/.DS_Store

-6 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

chapter-gestures/.DS_Store

-6 KB
Binary file not shown.

chapter-graphics/.DS_Store

-6 KB
Binary file not shown.
-6 KB
Binary file not shown.

chapter-health/.DS_Store

-6 KB
Binary file not shown.
Binary file not shown.

chapter-health/Accessing and Modifying User’s Height Information/Accessing and Modifying User’s Height Information/ViewController.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ class ViewController: UIViewController{
108108

109109
let heightUnit = HeightUnits.allValues[indexPath.row]
110110

111-
cell.textLabel.text = heightUnit.rawValue
111+
cell.textLabel!.text = heightUnit.rawValue
112112

113113
if indexPath == selectedIndexPath{
114114
cell.accessoryType = .Checkmark

chapter-health/Reading and Modifying the User’s Total Calories Burned/Reading and Modifying the User’s Total Calories Burned/AddBurnedCaloriesToDietViewController.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ class AddBurnedCaloriesToDietViewController: UITableViewController {
114114
let caloriesAsString = formatter.stringFromValue(burner.calories,
115115
unit: .Kilocalorie)
116116

117-
cell.textLabel.text = burner.name
117+
cell.textLabel!.text = burner.name
118118
cell.detailTextLabel!.text = caloriesAsString
119119

120120
return cell

chapter-health/Reading and Modifying the User’s Total Calories Burned/Reading and Modifying the User’s Total Calories Burned/ListCaloriesBurnedTableViewController.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ AddBurnedCaloriesToDietViewControllerDelegate {
319319
let caloriesAsString = formatter.stringFromValue(burner.calories,
320320
unit: .Kilocalorie)
321321

322-
cell.textLabel.text = burner.name
322+
cell.textLabel!.text = burner.name
323323
cell.detailTextLabel!.text = caloriesAsString
324324

325325
return cell

chapter-homekit/.DS_Store

-6 KB
Binary file not shown.

chapter-homekit/Adding Rooms to the User’s Home/Adding Rooms to the User’s Home/ListHomesViewController.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ class ListHomesViewController: UITableViewController, HMHomeManagerDelegate{
8383

8484
let home = homeManager.homes[indexPath.row] as HMHome
8585

86-
cell.textLabel.text = home.name
86+
cell.textLabel!.text = home.name
8787
cell.accessoryType = .DisclosureIndicator
8888

8989
return cell

chapter-homekit/Adding Rooms to the User’s Home/Adding Rooms to the User’s Home/ListRoomsTableViewController.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class ListRoomsTableViewController: UITableViewController, HMHomeDelegate {
6262

6363
let room = home.rooms[indexPath.row] as HMRoom
6464

65-
cell.textLabel.text = room.name
65+
cell.textLabel!.text = room.name
6666

6767
return cell
6868

Binary file not shown.
Binary file not shown.

chapter-homekit/Managing the User’s Home in HomeKit/Managing the User’s Home in HomeKit/ListHomesViewController.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
//
5454
// let home = homeManager.homes[indexPath.row] as HMHome
5555
//
56-
// cell.textLabel.text = home.name
56+
// cell.textLabel!.text = home.name
5757
//
5858
// return cell
5959
//
@@ -142,7 +142,7 @@ class ListHomesViewController: UITableViewController, HMHomeManagerDelegate{
142142

143143
let home = homeManager.homes[indexPath.row] as HMHome
144144

145-
cell.textLabel.text = home.name
145+
cell.textLabel!.text = home.name
146146

147147
return cell
148148

chapter-maps/.DS_Store

-6 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.

chapter-maps/Pinpointing the Location of a Device/Pinpointing the Location of a Device/ViewController.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class ViewController: UIViewController, CLLocationManagerDelegate {
4949
print("The authorization status of location services is changed to: ")
5050

5151
switch CLLocationManager.authorizationStatus(){
52-
case .Authorized:
52+
case .AuthorizedAlways:
5353
println("Authorized")
5454
case .AuthorizedWhenInUse:
5555
println("Authorized when in use")
@@ -97,7 +97,7 @@ class ViewController: UIViewController, CLLocationManagerDelegate {
9797

9898
/* Do we have authorization to access location services? */
9999
switch CLLocationManager.authorizationStatus(){
100-
case .Authorized:
100+
case .AuthorizedAlways:
101101
/* Yes, always */
102102
createLocationManager(startImmediately: true)
103103
case .AuthorizedWhenInUse:

chapter-motion/.DS_Store

-6 KB
Binary file not shown.

chapter-multimedia/.DS_Store

-6 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.

chapter-networking/.DS_Store

-6 KB
Binary file not shown.
Binary file not shown.

chapter-notification/.DS_Store

-6 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

chapter-security/.DS_Store

-6 KB
Binary file not shown.

chapter-tables/.DS_Store

-6 KB
Binary file not shown.
Binary file not shown.

chapter-tables/Adding Custom Interactions to Collection Views/Adding Custom Interactions to Collection Views/ViewController.swift

+5-5
Original file line numberDiff line numberDiff line change
@@ -41,22 +41,22 @@ class ViewController: UICollectionViewController {
4141
let pinch = UIPinchGestureRecognizer(target: self,
4242
action: "handlePinches:")
4343

44-
for recognizer in collectionView.gestureRecognizers as
44+
for recognizer in collectionView!.gestureRecognizers as
4545
[UIGestureRecognizer]{
4646
if recognizer is UIPinchGestureRecognizer{
4747
recognizer.requireGestureRecognizerToFail(pinch)
4848
}
4949
}
5050

51-
collectionView.addGestureRecognizer(pinch)
51+
collectionView!.addGestureRecognizer(pinch)
5252

5353
}
5454

5555
func handlePinches(pinch: UIPinchGestureRecognizer){
5656

5757
let defaultLayoutItemSize = CGSize(width: 80, height: 120)
5858

59-
let layout = collectionView.collectionViewLayout
59+
let layout = collectionView!.collectionViewLayout
6060
as UICollectionViewFlowLayout
6161

6262
layout.itemSize =
@@ -72,8 +72,8 @@ class ViewController: UICollectionViewController {
7272

7373
let nib = UINib(nibName: "MyCollectionViewCell", bundle: nil)
7474

75-
collectionView.registerNib(nib, forCellWithReuseIdentifier: "cell")
76-
collectionView.backgroundColor = UIColor.whiteColor()
75+
collectionView!.registerNib(nib, forCellWithReuseIdentifier: "cell")
76+
collectionView!.backgroundColor = UIColor.whiteColor()
7777

7878
}
7979

chapter-tables/Constructing Headers and Footers in Table Views/Constructing Headers and Footers in Table Views/ViewController.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class ViewController: UIViewController,
5656
let cell = tableView.dequeueReusableCellWithIdentifier("identifier",
5757
forIndexPath: indexPath) as UITableViewCell
5858

59-
cell.textLabel.text = "Cell \(indexPath.row)"
59+
cell.textLabel!.text = "Cell \(indexPath.row)"
6060

6161
return cell
6262

chapter-tables/Displaying a Refresh Control for Table Views/Displaying a Refresh Control for Table Views/ViewController.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ class ViewController: UIViewController, UITableViewDataSource {
6969
let cell = tableView.dequeueReusableCellWithIdentifier("identifier",
7070
forIndexPath: indexPath) as UITableViewCell
7171

72-
cell.textLabel.text = "\(allTimes[indexPath.row])"
72+
cell.textLabel!.text = "\(allTimes[indexPath.row])"
7373

7474
return cell
7575

chapter-tables/Enabling Swipe Deletion of Table View Cells/Enabling Swipe Deletion of Table View Cells/ViewController.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ UITableViewDataSource, UITableViewDelegate {
7171
let cell = tableView.dequeueReusableCellWithIdentifier("identifier",
7272
forIndexPath: indexPath) as UITableViewCell
7373

74-
cell.textLabel.text = allRows[indexPath.row]
74+
cell.textLabel!.text = allRows[indexPath.row]
7575

7676
return cell
7777

chapter-tables/Feeding Custom Cells to Collection Views Using .xib Files/Feeding Custom Cells to Collection Views Using .xib Files/ViewController.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ class ViewController: UICollectionViewController {
4040

4141
let nib = UINib(nibName: "MyCollectionViewCell", bundle: nil)
4242

43-
collectionView.registerNib(nib, forCellWithReuseIdentifier: "cell")
44-
collectionView.backgroundColor = UIColor.whiteColor()
43+
collectionView!.registerNib(nib, forCellWithReuseIdentifier: "cell")
44+
collectionView!.backgroundColor = UIColor.whiteColor()
4545
}
4646

4747
convenience required init(coder aDecoder: NSCoder) {
Binary file not shown.

chapter-tables/Handling Events in Collection Views/Handling Events in Collection Views/ViewController.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ class ViewController: UICollectionViewController {
4343

4444
let nib = UINib(nibName: "MyCollectionViewCell", bundle: nil)
4545

46-
collectionView.registerNib(nib, forCellWithReuseIdentifier: "cell")
47-
collectionView.backgroundColor = UIColor.whiteColor()
46+
collectionView!.registerNib(nib, forCellWithReuseIdentifier: "cell")
47+
collectionView!.backgroundColor = UIColor.whiteColor()
4848
}
4949

5050
convenience required init(coder aDecoder: NSCoder) {

chapter-tables/Populating a Table View with Data/Populating a Table View with Data/ViewController.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ class ViewController: UIViewController, UITableViewDataSource {
9797
let cell = tableView.dequeueReusableCellWithIdentifier("identifier",
9898
forIndexPath: indexPath) as UITableViewCell
9999

100-
cell.textLabel.text = "Section \(indexPath.section), " +
100+
cell.textLabel!.text = "Section \(indexPath.section), " +
101101
"Cell \(indexPath.row)"
102102

103103
return cell

chapter-tables/Providing Basic Content to a Collection View/Providing Basic Content to a Collection View/ViewController.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ class ViewController: UICollectionViewController {
3333
override init(collectionViewLayout layout: UICollectionViewLayout!) {
3434
super.init(collectionViewLayout: layout)
3535

36-
collectionView.registerClass(UICollectionViewCell.classForCoder(),
36+
collectionView!.registerClass(UICollectionViewCell.classForCoder(),
3737
forCellWithReuseIdentifier: "cell")
3838

39-
collectionView.backgroundColor = UIColor.whiteColor()
39+
collectionView!.backgroundColor = UIColor.whiteColor()
4040
}
4141

4242
convenience required init(coder aDecoder: NSCoder) {
Binary file not shown.

chapter-tables/Providing Header and Footer in a Collection View/Providing Header and Footer in a Collection View/ViewController.swift

+4-4
Original file line numberDiff line numberDiff line change
@@ -43,21 +43,21 @@ class ViewController: UICollectionViewController {
4343

4444
/* Register the nib with the collection view for easy retrieval */
4545
let nib = UINib(nibName: "MyCollectionViewCell", bundle: nil)
46-
collectionView.registerNib(nib, forCellWithReuseIdentifier: "cell")
46+
collectionView!.registerNib(nib, forCellWithReuseIdentifier: "cell")
4747

4848
/* Register the header's nib */
4949
let headerNib = UINib(nibName: "Header", bundle: nil)
50-
collectionView.registerNib(headerNib,
50+
collectionView!.registerNib(headerNib,
5151
forSupplementaryViewOfKind: UICollectionElementKindSectionHeader,
5252
withReuseIdentifier: "header")
5353

5454
/* Register the footer's nib */
5555
let footerNib = UINib(nibName: "Footer", bundle: nil)
56-
collectionView.registerNib(footerNib,
56+
collectionView!.registerNib(footerNib,
5757
forSupplementaryViewOfKind: UICollectionElementKindSectionFooter,
5858
withReuseIdentifier: "footer")
5959

60-
collectionView.backgroundColor = UIColor.whiteColor()
60+
collectionView!.backgroundColor = UIColor.whiteColor()
6161
}
6262

6363
convenience required init(coder aDecoder: NSCoder) {

0 commit comments

Comments
 (0)