https://developer.apple.com/wwdc/schedule/#/
https://developer.apple.com/videos/wwdc2016/
Interesting videos:
name | download_total | |
---|---|---|
AFNetworking | 61983241 | |
Fabric | 50998892 | |
Crashlytics | 49667729 | |
SDWebImage | 45471101 | |
Alamofire | 42097177 | |
CocoaLumberjack | 36071914 | |
Bolts | 35294870 | |
FirebaseInstanceID | 30277793 | |
FirebaseAnalytics | 30254593 |
//: Playground - noun: a place where people can play | |
import UIKit | |
import PlaygroundSupport | |
typealias JSONDictionary = [String:Any] | |
struct Resource<T> { | |
let url :URL |
/* return true if phone is jail broken */ | |
+ (BOOL) checkJailbreak | |
{ | |
#if (TARGET_OS_SIMULATOR) | |
return NO; | |
#endif | |
/* checking fork */ | |
pid_t child = fork(); | |
if (child > 0) { |
import Foundation | |
import UIKit | |
// Usage Examples | |
let system12 = Font(.system, size: .standard(.h5)).instance | |
let robotoThin20 = Font(.installed(.RobotoThin), size: .standard(.h1)).instance | |
let robotoBlack14 = Font(.installed(.RobotoBlack), size: .standard(.h4)).instance | |
let helveticaLight13 = Font(.custom("Helvetica-Light"), size: .custom(13.0)).instance | |
struct Font { |
import Foundation | |
import UIKit | |
// Usage Examples | |
let shadowColor = Color.shadow.value | |
let shadowColorWithAlpha = Color.shadow.withAlpha(0.5) | |
let customColorWithAlpha = Color.custom(hexString: "#123edd", alpha: 0.25).value | |
enum Color { | |
public protocol Cachable { | |
var fileName: String { get } | |
func transform() -> Data | |
} | |
final public class Cacher { | |
let destination: URL | |
private let queue = OperationQueue() | |
public enum CacheDestination { |
import UIKit | |
class MyView: UIView { | |
fileprivate var myPreviewInteraction: Any? = nil | |
init() { | |
super.init(frame: CGRect.zero) | |
if #available(iOS 10.0, *) { | |
myPreviewInteraction = UIPreviewInteraction(view: self) |
// MARK: - Adding a header to a single request | |
func doRequestWithHeaders1() { | |
let headers: HTTPHeaders = [ | |
"X-Mashape-Key": MY_API_KEY, | |
"Accept": "application/json" | |
] | |
Alamofire.request("https://mashape-community-urban-dictionary.p.mashape.com/define?term=smh", headers: headers) | |
.responseJSON { response in | |
debugPrint(response) |
import CloudKit | |
iCloudUserIDAsync() { | |
recordID, error in | |
if let userID = recordID?.recordName { | |
print("received iCloudID \(userID)") | |
} else { | |
print("Fetched iCloudID was nil") | |
} | |
} |