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
| // get an objects type | |
| lldb: po type(of: yourObject) | |
| // info dump on an object | |
| lldb: po dump(youObject) |
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
| let birthday = Todd.birthday // gets my birthday | |
| let now = NSDate() | |
| let secondsDifference = now.timeIntervalSinceDate(birthday) | |
| let secondsPerDay = 60*60*24 // 60 seconds * 60 minutes * 24 hours | |
| let daysSinceBirthday = secondsDifference / secondsPerDay |
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
| // UIImage+Downsample.swift | |
| // Created by Todd Hopkinson | |
| import UIKit | |
| extension UIImage { | |
| func downsample(reductionAmount: Float) -> UIImage? { | |
| let image = UIKit.CIImage(image: self) |
NewerOlder