Skip to content

Commit 86252ad

Browse files
authored
Merge pull request #216 from cuappdev/omar/swift5
Omar/swift5
2 parents 154c427 + 45a756a commit 86252ad

67 files changed

Lines changed: 1822 additions & 1900 deletions

File tree

Some content is hidden

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

.swiftlint.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,17 @@ excluded: # paths to ignore during linting. Takes precedence over `included`.
1818
force_cast: warning # implicitly. Give warning only for force casting
1919

2020
force_try:
21-
severity: warning # explicitly. Give warning only for force try
21+
severity: warning # explicitly. Give warning only for force try
2222

2323
type_body_length:
2424
- 300 # warning
25-
- 400 # error
2625

2726
# or they can set both explicitly
2827
file_length:
29-
warning: 500
30-
error: 800
28+
- 500
29+
30+
line_length:
31+
- 120
3132

3233
large_tuple: # warn user when using 3 values in tuple, give error if there are 4
3334
- 3

Podfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ target 'TCAT' do
3333
pod 'Presentation', :git=> 'https://github.com/cuappdev/Presentation.git'
3434
pod 'SnapKit'
3535
pod 'WhatsNewKit', '~> 1.1.2'
36-
36+
3737
# Other
38-
pod 'Fuzzywuzzy_swift', :git=> 'https://github.com/cuappdev/Fuzzywuzzy_swift.git'
38+
pod 'SwiftLint'
3939

4040
target 'TCATTests' do
4141
inherit! :search_paths

TCAT.xcodeproj/project.pbxproj

Lines changed: 108 additions & 106 deletions
Large diffs are not rendered by default.

TCAT.xcodeproj/xcshareddata/xcschemes/Siri.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1010"
3+
LastUpgradeVersion = "1020"
44
wasCreatedForAppExtension = "YES"
55
version = "2.0">
66
<BuildAction

TCAT.xcodeproj/xcshareddata/xcschemes/TCAT Debug.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1010"
3+
LastUpgradeVersion = "1020"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

TCAT.xcodeproj/xcshareddata/xcschemes/TCAT Release.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1010"
3+
LastUpgradeVersion = "1020"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

TCAT.xcodeproj/xcshareddata/xcschemes/Today Extension Debug.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1010"
3+
LastUpgradeVersion = "1020"
44
wasCreatedForAppExtension = "YES"
55
version = "2.0">
66
<BuildAction

TCAT.xcodeproj/xcshareddata/xcschemes/Today Extension Release.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1010"
3+
LastUpgradeVersion = "1020"
44
wasCreatedForAppExtension = "YES"
55
version = "2.0">
66
<BuildAction

TCAT/Cells/BusStopTableViewCell.swift

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,20 @@
99
import UIKit
1010

1111
class BusStopTableViewCell: UITableViewCell {
12-
12+
1313
let linePosition: CGFloat = DetailIconView.width - 16 // max of DetailIconView (114) - constant (16) = 98
14-
14+
1515
var titleLabel: UILabel!
1616
let cellHeight: CGFloat = RouteDetailCellSize.smallHeight
1717
let cellWidth: CGFloat = RouteDetailCellSize.indentedWidth
18-
18+
1919
var connectorTop: UIView!
2020
var connectorBottom: UIView!
2121
var statusCircle: Circle!
22-
22+
2323
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
2424
super.init(style: style, reuseIdentifier: reuseIdentifier)
25-
25+
2626
titleLabel = UILabel()
2727
titleLabel.frame = CGRect(x: cellWidth, y: 0, width: UIScreen.main.bounds.width - cellWidth - 20, height: 20)
2828
titleLabel.font = .getFont(.regular, size: 14)
@@ -33,34 +33,34 @@ class BusStopTableViewCell: UITableViewCell {
3333
titleLabel.sizeToFit()
3434
titleLabel.center.y = cellHeight / 2
3535
contentView.addSubview(titleLabel)
36-
36+
3737
connectorTop = UIView(frame: CGRect(x: linePosition, y: 0, width: 4, height: cellHeight / 2))
3838
connectorTop.frame.origin.x -= connectorTop.frame.width / 2
3939
connectorTop.backgroundColor = Colors.tcatBlue
4040
contentView.addSubview(connectorTop)
41-
41+
4242
connectorBottom = UIView(frame: CGRect(x: linePosition, y: cellHeight / 2, width: 4, height: cellHeight / 2))
4343
connectorBottom.frame.origin.x -= connectorBottom.frame.width / 2
4444
connectorBottom.backgroundColor = Colors.tcatBlue
4545
contentView.addSubview(connectorBottom)
46-
46+
4747
statusCircle = Circle(size: .small, style: .outline, color: Colors.tcatBlue)
4848
statusCircle.center = self.center
4949
statusCircle.center.y = cellHeight / 2
5050
statusCircle.frame.origin.x = linePosition - (statusCircle.frame.width / 2)
5151
contentView.addSubview(statusCircle)
52-
52+
5353
}
54-
54+
5555
required init?(coder aDecoder: NSCoder) {
5656
fatalError("init(coder:) has not been implemented")
5757
}
58-
58+
5959
func setCell(_ name: String) {
6060
titleLabel.text = name
6161
titleLabel.sizeToFit()
6262
titleLabel.frame.size.width = UIScreen.main.bounds.width - cellWidth - 20
6363
titleLabel.center.y = cellHeight / 2
6464
}
65-
65+
6666
}

TCAT/Cells/GeneralTableViewCell.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class GeneralTableViewCell: UITableViewCell {
1414
super.awakeFromNib()
1515
// Initialization code
1616
}
17-
17+
1818
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
1919
super.init(style: .subtitle, reuseIdentifier: reuseIdentifier)
2020
}
@@ -25,11 +25,11 @@ class GeneralTableViewCell: UITableViewCell {
2525

2626
override func layoutSubviews() {
2727
super.layoutSubviews()
28-
28+
2929
preservesSuperviewLayoutMargins = false
3030
separatorInset = .zero
3131
layoutMargins = .zero
32-
32+
3333
switch reuseIdentifier {
3434
case Constants.Cells.seeAllStopsIdentifier:
3535
textLabel?.text = Constants.General.seeAllStops
@@ -43,6 +43,6 @@ class GeneralTableViewCell: UITableViewCell {
4343
}
4444

4545
textLabel?.font = .getFont(.regular, size: 14)
46-
46+
4747
}
4848
}

0 commit comments

Comments
 (0)