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
// | |
// UIFont+DahDit.m | |
// DahDit | |
// | |
// Created by Erik Andersson on 2011-07-28. | |
// Copyright 2011 Åva gymnasium. All rights reserved. | |
// | |
#import "UIFont+DahDit.h" |
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
/* | |
TextViewWithPlaceholderAndExpandingHeight.swift | |
TextViewWithPlaceholderAndExpandingHeight | |
Created by Shabib Hossain on 1/24/17. | |
Copyright (c) 2017 shabib87 <shabib.sust@gmail.com> | |
Permission is hereby granted, free of charge, to any person obtaining a copy |
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 SmartCar { | |
func driveOnRoad() { | |
print("Vroom!") | |
} | |
func talk() { | |
print("Hi! I am the smart talking car!") | |
} | |
} |
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 Flyable { | |
func flyOnAir() | |
} | |
class SmartFlyingCar: SmartCar, Flyable { | |
func flyOnAir() { | |
print("Wohoo! I am flying high!") | |
} | |
} |
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 SuperSmartCar: SmartCar { | |
func driveOnWater() { | |
print("I can run over water, because I can! B-)") | |
} | |
} |
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 RoadDrivable { | |
func driveOnRoad() | |
} | |
protocol WaterDrivable { | |
func driveOnWater() | |
} | |
protocol Flyable { | |
func flyOnAir() |
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 SmartBoat: SmartVehicle, RoadDrivable, WaterDrivable { | |
func driveOnRoad() { | |
print("Vroom!") | |
} | |
func driveOnWater() { | |
print("I can run over water, because I can! B-)") | |
} | |
} |
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
@implementation Singleton | |
+ (instancetype)sharedInstance { | |
static Singleton *sharedInstance = nil; | |
static dispatch_once_t onceToken; | |
dispatch_once(&onceToken, ^{ | |
sharedInstance = [[Singleton alloc] init]; | |
}); | |
return sharedInstance; |
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 Singleton { | |
static let sharedInstance = Singleton() | |
private init() { | |
// do stuff | |
} | |
} |
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 User { | |
var name = "" | |
var age = 0 | |
} | |
class EditUserInfoController { | |
var user: User | |
init (user: User) { | |
self.user = user |
OlderNewer