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 Notifications: String { | |
case DidLogin | |
case DidLogout | |
case AddToCart | |
func post(object: AnyObject? = nil) { | |
NotificationCenter.default.post(name: NSNotification.Name(rawValue: self.rawValue), object: object) | |
} | |
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.familyNames.sorted().forEach({ | |
print("Font Family : " + $0) | |
let names = UIFont.fontNames(forFamilyName: $0) | |
print("Font Names = \(names)") | |
print("-------------------------------------------") | |
}) |
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
// | |
// Created by Duy Nguyen on 22/9/16. | |
// | |
import SpriteKit | |
class Entity { | |
// var mAnimatingFrames = Entity.initWithSpriteSheetNamed("SpriteSheetNamed", sourceRect: CGRectMake(0, 0, 1600, 300), numberOfSprites: 6) | |
class func initWithSpriteSheetNamed(spriteSheet: String, sourceRect: CGRect, numberOfSprites: Int) -> [SKTexture] { | |