Skip to content

Commit b15fce9

Browse files
committed
Update GraphicsPerformance-Starter project syntax to Swift 3.2
1 parent c67bc59 commit b15fce9

4 files changed

Lines changed: 32 additions & 16 deletions

File tree

GraphicsPerformance-Starter/GraphicsPerformance-Starter.xcodeproj/project.pbxproj

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,16 +207,16 @@
207207
TargetAttributes = {
208208
9BEA051B1C50EFAC0075E954 = {
209209
CreatedOnToolsVersion = 7.2;
210-
DevelopmentTeam = U2HX3RFD94;
210+
DevelopmentTeam = FQL8675Q6W;
211211
};
212212
9BEA05311C50EFAC0075E954 = {
213213
CreatedOnToolsVersion = 7.2;
214-
DevelopmentTeam = U2HX3RFD94;
214+
DevelopmentTeam = FQL8675Q6W;
215215
TestTargetID = 9BEA051B1C50EFAC0075E954;
216216
};
217217
9BEA053C1C50EFAC0075E954 = {
218218
CreatedOnToolsVersion = 7.2;
219-
DevelopmentTeam = U2HX3RFD94;
219+
DevelopmentTeam = FQL8675Q6W;
220220
TestTargetID = 9BEA051B1C50EFAC0075E954;
221221
};
222222
};
@@ -416,28 +416,33 @@
416416
isa = XCBuildConfiguration;
417417
buildSettings = {
418418
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
419+
DEVELOPMENT_TEAM = FQL8675Q6W;
419420
INFOPLIST_FILE = "GraphicsPerformance-Starter/Info.plist";
420421
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
421422
PRODUCT_BUNDLE_IDENTIFIER = "NEU.GraphicsPerformance-Starter";
422423
PRODUCT_NAME = "$(TARGET_NAME)";
424+
SWIFT_VERSION = 3.0;
423425
};
424426
name = Debug;
425427
};
426428
9BEA05481C50EFAC0075E954 /* Release */ = {
427429
isa = XCBuildConfiguration;
428430
buildSettings = {
429431
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
432+
DEVELOPMENT_TEAM = FQL8675Q6W;
430433
INFOPLIST_FILE = "GraphicsPerformance-Starter/Info.plist";
431434
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
432435
PRODUCT_BUNDLE_IDENTIFIER = "NEU.GraphicsPerformance-Starter";
433436
PRODUCT_NAME = "$(TARGET_NAME)";
437+
SWIFT_VERSION = 3.0;
434438
};
435439
name = Release;
436440
};
437441
9BEA054A1C50EFAC0075E954 /* Debug */ = {
438442
isa = XCBuildConfiguration;
439443
buildSettings = {
440444
BUNDLE_LOADER = "$(TEST_HOST)";
445+
DEVELOPMENT_TEAM = FQL8675Q6W;
441446
INFOPLIST_FILE = "GraphicsPerformance-StarterTests/Info.plist";
442447
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
443448
PRODUCT_BUNDLE_IDENTIFIER = "NEU.GraphicsPerformance-StarterTests";
@@ -450,6 +455,7 @@
450455
isa = XCBuildConfiguration;
451456
buildSettings = {
452457
BUNDLE_LOADER = "$(TEST_HOST)";
458+
DEVELOPMENT_TEAM = FQL8675Q6W;
453459
INFOPLIST_FILE = "GraphicsPerformance-StarterTests/Info.plist";
454460
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
455461
PRODUCT_BUNDLE_IDENTIFIER = "NEU.GraphicsPerformance-StarterTests";
@@ -461,6 +467,7 @@
461467
9BEA054D1C50EFAC0075E954 /* Debug */ = {
462468
isa = XCBuildConfiguration;
463469
buildSettings = {
470+
DEVELOPMENT_TEAM = FQL8675Q6W;
464471
INFOPLIST_FILE = "GraphicsPerformance-StarterUITests/Info.plist";
465472
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
466473
PRODUCT_BUNDLE_IDENTIFIER = "NEU.GraphicsPerformance-StarterUITests";
@@ -473,6 +480,7 @@
473480
9BEA054E1C50EFAC0075E954 /* Release */ = {
474481
isa = XCBuildConfiguration;
475482
buildSettings = {
483+
DEVELOPMENT_TEAM = FQL8675Q6W;
476484
INFOPLIST_FILE = "GraphicsPerformance-StarterUITests/Info.plist";
477485
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
478486
PRODUCT_BUNDLE_IDENTIFIER = "NEU.GraphicsPerformance-StarterUITests";

GraphicsPerformance-Starter/GraphicsPerformance-Starter.xcodeproj/project.xcworkspace/contents.xcworkspacedata

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

GraphicsPerformance-Starter/GraphicsPerformance-Starter/CustomTableCell.swift

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

1111
class CustomTableCell: UITableViewCell {
12-
let imgView = UIImageView(frame: CGRectMake(10, 10, 180, 180))
13-
let label = UILabel(frame: CGRectMake(220, 90, 150, 20))
12+
let imgView = UIImageView(frame: CGRect(x: 10, y: 10, width: 180, height: 180))
13+
let label = UILabel(frame: CGRect(x: 220, y: 90, width: 150, height: 20))
1414

1515
override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
1616
super.init(style: style, reuseIdentifier: reuseIdentifier)
1717

18-
imgView.layer.shadowColor = UIColor.blackColor().CGColor
18+
imgView.layer.shadowColor = UIColor.black.cgColor
1919
imgView.layer.shadowOpacity = 1
2020
imgView.layer.shadowRadius = 2
21-
imgView.layer.shadowOffset = CGSizeMake(1, 1)
21+
imgView.layer.shadowOffset = CGSize(width: 1, height: 1)
2222

2323
label.layer.shouldRasterize = true
2424

GraphicsPerformance-Starter/GraphicsPerformance-Starter/FirstViewController.swift

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import UIKit
1010

1111

1212
class FirstViewController: UIViewController, UITableViewDelegate, UITableViewDataSource {
13-
let table = UITableView(frame: CGRectMake(0, 0, UIScreen.mainScreen().bounds.size.width, UIScreen.mainScreen().bounds.size.height - 49))
13+
let table = UITableView(frame: CGRect(x: 0, y:0, width: UIScreen.main.bounds.size.width, height: UIScreen.main.bounds.size.height - 49))
1414
let imgArray = Array(1...10)
1515

1616
override func viewDidLoad() {
@@ -25,24 +25,25 @@ class FirstViewController: UIViewController, UITableViewDelegate, UITableViewDat
2525
override func didReceiveMemoryWarning() {
2626
super.didReceiveMemoryWarning()
2727
}
28+
2829

29-
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
30+
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
3031
let identifier = "tableviewcell"
31-
var cell = table.dequeueReusableCellWithIdentifier(identifier) as? CustomTableCell
32+
var cell = tableView.dequeueReusableCell(withIdentifier: identifier) as? CustomTableCell
3233
if cell == nil {
33-
cell = CustomTableCell(style: .Default, reuseIdentifier: identifier)
34-
cell?.selectionStyle = .None
34+
cell = CustomTableCell(style: .default, reuseIdentifier: identifier)
35+
cell?.selectionStyle = .none
3536
}
36-
cell?.setupContent(String(imgArray[indexPath.row]), text: "This is a label")
37-
37+
cell?.setupContent(imgName: String(imgArray[indexPath.row]), text: "This is a label")
38+
3839
return cell!
3940
}
4041

41-
func tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath) -> CGFloat {
42+
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
4243
return 200
4344
}
4445

45-
func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
46+
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
4647
return 10
4748
}
4849
}

0 commit comments

Comments
 (0)