Skip to content

Commit 481367f

Browse files
committed
Cleanup
1 parent a521995 commit 481367f

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

TestSwift.xcodeproj/project.pbxproj

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
/* Begin PBXBuildFile section */
1010
021E1AEF1944CDDE00FDC37C /* Track.swift in Sources */ = {isa = PBXBuildFile; fileRef = 021E1AEE1944CDDE00FDC37C /* Track.swift */; };
1111
021E1AF11944D4A800FDC37C /* TrackCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 021E1AF01944D4A800FDC37C /* TrackCell.swift */; };
12-
021E1AF31944E0C200FDC37C /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 021E1AF21944E0C200FDC37C /* QuartzCore.framework */; };
1312
022889EF193FC3AC00D729A0 /* DetailsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 022889EE193FC3AC00D729A0 /* DetailsViewController.swift */; };
1413
022889F1193FD6C000D729A0 /* Album.swift in Sources */ = {isa = PBXBuildFile; fileRef = 022889F0193FD6C000D729A0 /* Album.swift */; };
1514
0229AE63193F97EF00BCED97 /* Blank52.png in Resources */ = {isa = PBXBuildFile; fileRef = 0229AE62193F97EF00BCED97 /* Blank52.png */; };
@@ -34,7 +33,6 @@
3433
/* Begin PBXFileReference section */
3534
021E1AEE1944CDDE00FDC37C /* Track.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Track.swift; path = Classes/Track.swift; sourceTree = "<group>"; };
3635
021E1AF01944D4A800FDC37C /* TrackCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TrackCell.swift; sourceTree = "<group>"; };
37-
021E1AF21944E0C200FDC37C /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
3836
022889EE193FC3AC00D729A0 /* DetailsViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = DetailsViewController.swift; path = Classes/DetailsViewController.swift; sourceTree = "<group>"; };
3937
022889F0193FD6C000D729A0 /* Album.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Album.swift; path = Classes/Album.swift; sourceTree = "<group>"; };
4038
0229AE62193F97EF00BCED97 /* Blank52.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Blank52.png; sourceTree = "<group>"; };
@@ -56,7 +54,6 @@
5654
isa = PBXFrameworksBuildPhase;
5755
buildActionMask = 2147483647;
5856
files = (
59-
021E1AF31944E0C200FDC37C /* QuartzCore.framework in Frameworks */,
6057
);
6158
runOnlyForDeploymentPostprocessing = 0;
6259
};
@@ -109,7 +106,6 @@
109106
02CCF499193D16930069AEE9 = {
110107
isa = PBXGroup;
111108
children = (
112-
021E1AF21944E0C200FDC37C /* QuartzCore.framework */,
113109
02CCF4A4193D16930069AEE9 /* TestSwift */,
114110
02CCF4B7193D16930069AEE9 /* TestSwiftTests */,
115111
02CCF4A3193D16930069AEE9 /* Products */,

TestSwift/Classes/DetailsViewController.swift

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ import QuartzCore
1111

1212
class DetailsViewController: UIViewController, UITableViewDelegate, UITableViewDataSource, APIControllerProtocol {
1313

14+
let playIcon = "▶️"
15+
let stoppedIcon = "⬛️"
16+
1417
@IBOutlet var albumCover : UIImageView
1518
@IBOutlet var titleLabel : UILabel
1619
@IBOutlet var tracksTableView : UITableView
@@ -54,7 +57,7 @@ class DetailsViewController: UIViewController, UITableViewDelegate, UITableViewD
5457

5558
func tableView(tableView: UITableView!, didDeselectRowAtIndexPath indexPath: NSIndexPath!) {
5659
if let cell = tableView.cellForRowAtIndexPath(indexPath) as? TrackCell {
57-
cell.playIcon.text = "▶️"
60+
cell.playIcon.text = playIcon
5861
}
5962
}
6063

@@ -71,11 +74,11 @@ class DetailsViewController: UIViewController, UITableViewDelegate, UITableViewD
7174
var track = tracks[indexPath.row]
7275
if let cell = tableView.cellForRowAtIndexPath(indexPath) as? TrackCell {
7376
if(trackPlaying(track)) {
74-
cell.playIcon.text = "▶️"
77+
cell.playIcon.text = playIcon
7578
mediaPlayer.stop()
7679
}
7780
else {
78-
cell.playIcon.text = "⬛️"
81+
cell.playIcon.text = stoppedIcon
7982
mediaPlayer.stop()
8083
mediaPlayer.contentURL = NSURL(string: track.previewUrl)
8184
mediaPlayer.play()
@@ -105,10 +108,10 @@ class DetailsViewController: UIViewController, UITableViewDelegate, UITableViewD
105108
cell.titleLabel.text = track.title
106109

107110
if( trackPlaying(track) ) {
108-
cell.playIcon.text = "⬛️"
111+
cell.playIcon.text = stoppedIcon
109112
}
110113
else {
111-
cell.playIcon.text = "▶️"
114+
cell.playIcon.text = playIcon
112115
}
113116

114117
return cell

TestSwift/SearchResultsViewController.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ class SearchResultsViewController: UIViewController, UITableViewDataSource, UITa
6262
// Jump in to a background thread to get the image for this item
6363

6464
// Grab the artworkUrl60 key to get an image URL for the app's thumbnail
65-
//var urlString: NSString = rowData["artworkUrl60"] as NSString
6665
let urlString = album.thumbnailImageURL
6766

6867
// Check our image cache for the existing key. This is just a dictionary of UIImages

0 commit comments

Comments
 (0)