This file contains 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 MovieListView: MovieListPresenterDelegate { | |
private var presenter: MovieListPresenter | |
func didTapOnReload() | |
func didTapOnMovie(at index: Int) | |
func showDetailView(for movie: Movie) | |
} | |
protocol MovieListPresenterDelegate { | |
func updateWithMoviePresentations(_ movies: [MoviePresentation]) | |
} |
This file contains 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 MovieListView: MovieListPresenterDelegate { | |
private var presenter: MovieListPresenter | |
func didTapOnReload() | |
func didTapOnMovie(at index: Int) | |
} | |
protocol MovieListPresenterDelegate { | |
func updateWithMoviePresentations(_ movies: [MoviePresentation]) | |
} |
This file contains 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
enum Theme: String { | |
case light, dark | |
} | |
class UserSettings { | |
static let shared = UserSettings(notificationCenter: .default) | |
let notificationCenter: NotificationCenter | |
var theme: Theme = .light { |
This file contains 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
enum Theme: String { | |
case light, dark | |
} | |
protocol UserSettingsDelegate { | |
func themeDidChange(_ theme: Theme) | |
} | |
class UserSettings { | |
This file contains 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
typealias Property<Value, ID> = GenericProperty<Value, ID, Void> | |
typealias CollectionProperty<Value, ID> = GenericProperty<Value, ID, CollectionChange> | |
struct GenericProperty<Value, ID, ChangeInfo> { | |
private var _value: Value | |
var value: Value { | |
get { return _value } | |
set { set(newValue) } | |
} |
This file contains 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
tell application "System Preferences" | |
set current pane to pane "com.apple.preference.keyboard" | |
tell application "System Events" | |
tell tab group 1 of window "Keyboard" of process "System Preferences" | |
click checkbox "Use all F1, F2, etc. keys as standard function keys" | |
end tell | |
end tell | |
end tell |
NewerOlder