- www.haiku-os.org / www.mobileinteraction.se
- @konrad1977
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
//header file | |
typedef void (^ColorThemeBuilder)(id<ColorThemeProtocol> colorTheme); | |
@interface ThemeBuilder : NSObject <ColorThemeProtocol> | |
- (instancetype)initColorTheme:(ColorThemeBuilder)builder; | |
@end | |
//Implementation |
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
class Person { | |
var firstname: String | |
var lastname: String | |
init(firstname: String, lastname: String) { | |
self.firstname = firstname | |
self.lastname = lastname | |
} | |
} |
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
class Person { | |
var firstname: String | |
var lastname: String | |
func fullname() -> String { | |
return firstname + " " + lastname | |
} | |
init(firstname: String, lastname: String) { | |
self.firstname = firstname |
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
class Person { | |
var firstname: String | |
var lastname: String | |
init(firstname: String, lastname: String) { | |
self.firstname = firstname | |
self.lastname = lastname | |
} | |
} |
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 FileSaver { | |
class func savePath() -> String | |
func saveFile() | |
var isSaved: Bool { set get } | |
} | |
class VideoDocumentStorage : FileSave { | |
class func savePath() { "Videopath" } | |
func saveFile() { |
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
class Factory { | |
} | |
extension Factory { | |
class var SharedInstance: Factory { | |
struct Static { | |
static let instance: Factory = Factory() |
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
func myFirstFunction() { | |
let message = "hello world!" | |
print(message) | |
} |
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
func getWelcomeMessageToUser(user: String) -> String { | |
return "Hello " + user | |
} |
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
var daysInMonth: Int = 30 | |
var currentYear: 2000 | |
let months: 12 | |
enum Sex { | |
case Male | |
case Female | |
case Unknown | |
} |
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
var index = 0 | |
repeat { | |
index++ | |
} while index < 100 |
OlderNewer