This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| protocol AudioPlayable { | |
| var audioURL: URL { get } | |
| } | |
| extension SongClip: AudioPlayable {} | |
| struct AudioPlayer { | |
| func play<AudioItem: AudioPlayable>(_ item: AudioItem) { | |
| // play the generic item |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| struct AudioPlayer { | |
| func play(_ clip: SongClip) { | |
| // play the audioURL property | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| extension SongClip: TwoLinesAndImageDisplayable { | |
| var imageURL: URL { return coverImageURL } | |
| var topLineText: String { return title } | |
| var bottomLineText: String { return artist } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| protocol TwoLinesAndImageDisplayable { | |
| var imageURL: URL { get } | |
| var topLineText: String { get } | |
| var bottomLineText: String { get } | |
| } | |
| final class TwoLinesAndImageTableViewCell: UITableViewCell { | |
| @IBOutlet fileprivate weak var _sideImageView: UIImageView! | |
| @IBOutlet fileprivate weak var _topLabel: UILabel! | |
| @IBOutlet fileprivate weak var _bottomLabel: UILabel! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| final class SongClipTableViewCell: UITableViewCell { | |
| @IBOutlet fileprivate weak var _coverImageView: UIImageView! | |
| @IBOutlet fileprivate weak var _titleLabel: UILabel! | |
| @IBOutlet fileprivate weak var _artistLabel: UILabel! | |
| func set(_ clip: SongClip) { | |
| _coverImageView.imageURL = clip.coverImageURL | |
| _titleLabel.text = clip.title | |
| _artistLabel.text = clip.artist | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| struct SongClip { | |
| let title: String | |
| let artist: String | |
| let audioURL: URL | |
| let coverImageURL: URL | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fastlane_version "1.49.0" | |
| default_platform :ios | |
| ###################### | |
| slack_webhook = 'https://...' #See Slack Incoming Webhook | |
| slack_default_channel = '#channel' | |
| default_production_scheme = 'YOUR-PRODUCTION-SCHEME' | |
| certificates_output_path = './certificates' | |
| profiles_output_path = './profiles' |