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
| lazy var persistentStoreCoordinator: NSPersistentStoreCoordinator = { | |
| // .. | |
| let containerURL = fileManager.containerURLForSecurityApplicationGroupIdentifier("group.com.myapp.MyApp") | |
| let groupURL = containerURL!.URLByAppendingPathComponent(databaseName) | |
| // .. | |
| } |
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 store = try coordinator.addPersistentStoreWithType(NSSQLiteStoreType, configuration: nil, URL: groupURL, options: options) |
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
| try coordinator.migratePersistentStore(store, toURL: groupURL, options: options, withType:NSSQLiteStoreType) |
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
| notification.userInfo = [ "notificationId": myNotificationId ] |
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 userInfoCurrent = notification.userInfo! as! [String:AnyObject] | |
| let uid = userInfoCurrent["notificationId"]! as! String | |
| if uid == targetNotificationId { | |
| // aplicamos alguna acción aquí | |
| } |
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 id = thought.valueForKey("id") as! String | |
| if let cachedImage = ImageCache.sharedCache.imageForKey("image-\(id)") { | |
| cell.picture.image = cachedImage | |
| } else { | |
| dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), { | |
| let scaledImage = Helper.scaleUIImageToSize(image!, size: size) | |
| ImageCache.sharedCache.setImage(scaledImage, forKey: "image-\(id)") | |
| dispatch_async(dispatch_get_main_queue(), { |
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
| var str = "Hello, playground" | |
| var strings = [String]() | |
| str.characters.map{strings.append(String($0))} |
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
| final _color1 = Colors.red; | |
| final _color2 = Colors.blueGrey[900]; | |
| final _color3 = Colors.amberAccent; | |
| final _color4 = Colors.pink.shade50; | |
| //final _color5 = Colors.lightRed; | |
| final _color6 = Colors.transparent; | |
| final _color7 = const Color(0xFF013487); | |
| final _color8 = const Color(0xFF4CD132); | |
| //final _color9 = const Color(0xFF0134GG); |
course by Google
main topics
Lesson 1: The Flutter Framework
- Flutter Development Tools