Skip to content

Commit 4922a1f

Browse files
committed
Adds support for Swift 2.0
Adds support for iOS 8.0+ (before was iOS 8.2+)
1 parent 9699837 commit 4922a1f

File tree

4 files changed

+13
-9
lines changed

4 files changed

+13
-9
lines changed

LicensingViewController.xcodeproj/project.pbxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,8 @@
174174
862F24821B568DB90035ED24 /* Project object */ = {
175175
isa = PBXProject;
176176
attributes = {
177+
LastSwiftMigration = 0700;
178+
LastSwiftUpdateCheck = 0700;
177179
LastUpgradeCheck = 0640;
178180
ORGANIZATIONNAME = "Tiago Henriques";
179181
TargetAttributes = {

LicensingViewController/LicensingItemCell.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class LicensingItemCell: UITableViewCell {
2929
setupSubviews()
3030
}
3131

32-
required init(coder aDecoder: NSCoder) {
32+
required init?(coder aDecoder: NSCoder) {
3333
super.init(coder: aDecoder)
3434
setupSubviews()
3535
}
@@ -46,11 +46,11 @@ class LicensingItemCell: UITableViewCell {
4646

4747
func setupSubviews() {
4848
titleLabel.numberOfLines = 0
49-
titleLabel.setTranslatesAutoresizingMaskIntoConstraints(false)
49+
titleLabel.translatesAutoresizingMaskIntoConstraints = false
5050
contentView.addSubview(titleLabel)
5151

5252
noticeLabel.numberOfLines = 0
53-
noticeLabel.setTranslatesAutoresizingMaskIntoConstraints(false)
53+
noticeLabel.translatesAutoresizingMaskIntoConstraints = false
5454
contentView.addSubview(noticeLabel)
5555

5656
self.setNeedsUpdateConstraints()
@@ -69,19 +69,19 @@ class LicensingItemCell: UITableViewCell {
6969
]
7070

7171
contentView.addConstraints(NSLayoutConstraint.constraintsWithVisualFormat("|-spacing-[titleLabel]-spacing-|",
72-
options: nil,
72+
options: [],
7373
metrics: metrics,
7474
views: views
7575
))
7676

7777
contentView.addConstraints(NSLayoutConstraint.constraintsWithVisualFormat("V:|-spacing-[titleLabel]-[noticeLabel]-spacing-|",
78-
options: nil,
78+
options: [],
7979
metrics: metrics,
8080
views: views
8181
))
8282

8383
contentView.addConstraints(NSLayoutConstraint.constraintsWithVisualFormat("|-spacing-[noticeLabel]-spacing-|",
84-
options: nil,
84+
options: [],
8585
metrics: metrics,
8686
views: views
8787
))

LicensingViewController/LicensingViewController.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ public class LicensingViewController: UITableViewController {
2020
public var items: [LicensingItem] = [] {
2121
didSet { tableView.reloadData() }
2222
}
23-
24-
public var titleFont = UIFont.systemFontOfSize(18, weight: UIFontWeightBold) {
23+
24+
public var titleFont = UIFont.boldSystemFontOfSize(18) {
2525
didSet { tableView.reloadData() }
2626
}
2727

@@ -52,7 +52,7 @@ public class LicensingViewController: UITableViewController {
5252

5353
// MARK: UITableViewDataSource
5454

55-
extension LicensingViewController: UITableViewDataSource {
55+
extension LicensingViewController {
5656

5757
override public func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
5858
return items.count

LicensingViewControllerDemo/LicensingViewControllerDemo.xcodeproj/project.pbxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,8 @@
201201
862F24A81B568DDB0035ED24 /* Project object */ = {
202202
isa = PBXProject;
203203
attributes = {
204+
LastSwiftMigration = 0700;
205+
LastSwiftUpdateCheck = 0700;
204206
LastUpgradeCheck = 0640;
205207
ORGANIZATIONNAME = "Tiago Henriques";
206208
TargetAttributes = {

0 commit comments

Comments
 (0)