├── AVCapturePhotoOutput ├── AVCapturePhotoOutputObjectiveCSample │ ├── AVCapturePhotoOutputObjectiveCSample.xcodeproj │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcuserdata │ │ │ │ └── nikolay.andonov.xcuserdatad │ │ │ │ └── UserInterfaceState.xcuserstate │ │ └── xcuserdata │ │ │ └── nikolay.andonov.xcuserdatad │ │ │ ├── xcdebugger │ │ │ └── Breakpoints_v2.xcbkptlist │ │ │ └── xcschemes │ │ │ ├── AVCapturePhotoOutputObjectiveCSample.xcscheme │ │ │ └── xcschememanagement.plist │ └── AVCapturePhotoOutputObjectiveCSample │ │ ├── AppDelegate.h │ │ ├── AppDelegate.m │ │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ │ ├── CapturePhotoHandler.h │ │ ├── CapturePhotoHandler.m │ │ ├── Info.plist │ │ ├── MainViewController.h │ │ ├── MainViewController.m │ │ └── main.m └── AVCapturePhotoOutputSwiftSample │ ├── AVCapturePhotoOutputSwiftSample.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcuserdata │ │ │ └── nikolay.andonov.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcuserdata │ │ └── nikolay.andonov.xcuserdatad │ │ ├── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist │ │ └── xcschemes │ │ ├── AVCapturePhotoOutputSwiftSample.xcscheme │ │ └── xcschememanagement.plist │ └── AVCapturePhotoOutputSwiftSample │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── CapturePhotoHandler.swift │ ├── Info.plist │ └── MainViewController.swift ├── CallKit ├── CallKitObjCSample │ ├── CallKit.xcodeproj │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcuserdata │ │ │ │ └── Dobby.xcuserdatad │ │ │ │ └── UserInterfaceState.xcuserstate │ │ └── xcuserdata │ │ │ └── Dobby.xcuserdatad │ │ │ ├── xcdebugger │ │ │ └── Breakpoints_v2.xcbkptlist │ │ │ └── xcschemes │ │ │ ├── CallKit.xcscheme │ │ │ └── xcschememanagement.plist │ └── CallKit │ │ ├── AppDelegate.h │ │ ├── AppDelegate.m │ │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ │ ├── CallManager.h │ │ ├── CallManager.m │ │ ├── CallViewController.h │ │ ├── CallViewController.m │ │ ├── IncomingCallViewController.h │ │ ├── IncomingCallViewController.m │ │ ├── Info.plist │ │ ├── OutgoingCallViewController.h │ │ ├── OutgoingCallViewController.m │ │ ├── ViewController.h │ │ ├── ViewController.m │ │ └── main.m └── CallKitSwiftSample │ ├── CallKitSwiftSample.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcuserdata │ │ │ └── nikolay.andonov.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcuserdata │ │ └── nikolay.andonov.xcuserdatad │ │ ├── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist │ │ └── xcschemes │ │ ├── CallKitSwiftSample.xcscheme │ │ └── xcschememanagement.plist │ └── CallKitSwiftSample │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── CallManager.swift │ ├── CallViewController.swift │ ├── IncomingCallViewController.swift │ ├── Info.plist │ ├── OutgoingCallViewController.swift │ └── ViewController.swift ├── NSPersistentContainer ├── NSPersistentContainerObjCSample │ ├── NSPersistentContainerObjCSample.xcodeproj │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcuserdata │ │ │ │ ├── Dobby.xcuserdatad │ │ │ │ └── UserInterfaceState.xcuserstate │ │ │ │ └── nikolay.andonov.xcuserdatad │ │ │ │ └── UserInterfaceState.xcuserstate │ │ └── xcuserdata │ │ │ ├── Dobby.xcuserdatad │ │ │ └── xcschemes │ │ │ │ ├── NSPersistentContainerObjCSample.xcscheme │ │ │ │ └── xcschememanagement.plist │ │ │ └── nikolay.andonov.xcuserdatad │ │ │ ├── xcdebugger │ │ │ └── Breakpoints_v2.xcbkptlist │ │ │ └── xcschemes │ │ │ ├── NSPersistentContainerObjCSample.xcscheme │ │ │ └── xcschememanagement.plist │ └── NSPersistentContainerObjCSample │ │ ├── AppDelegate.h │ │ ├── AppDelegate.m │ │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ │ ├── CoreDataHandler.h │ │ ├── CoreDataHandler.m │ │ ├── CoreDataStack.h │ │ ├── CoreDataStack.m │ │ ├── Info.plist │ │ ├── NSPersistentContainerObjCSampleModel.xcdatamodeld │ │ └── NSPersistentContainerObjCSampleModel.xcdatamodel │ │ │ └── contents │ │ ├── NSPersistentContainerObjCsSampleModel.xcdatamodeld │ │ └── NSPersistentContainerObjCsSampleModel.xcdatamodel │ │ │ └── contents │ │ ├── SampleEntity+CoreDataClass.h │ │ ├── SampleEntity+CoreDataClass.m │ │ ├── SampleEntity+CoreDataProperties.h │ │ ├── SampleEntity+CoreDataProperties.m │ │ ├── SampleTableViewController.h │ │ ├── SampleTableViewController.m │ │ └── main.m └── NSPersistentContainerSwiftSample │ ├── NSPersistentContainerSwiftSample.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcuserdata │ │ │ └── nikolay.andonov.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcuserdata │ │ └── nikolay.andonov.xcuserdatad │ │ ├── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist │ │ └── xcschemes │ │ ├── NSPersistentContainerSwiftSample.xcscheme │ │ └── xcschememanagement.plist │ └── NSPersistentContainerSwiftSample │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── CoreDataHandler.swift │ ├── CoreDataStack.swift │ ├── Info.plist │ ├── NSPersistentContainerSwiftSampleModel.xcdatamodeld │ └── NSPersistentContainerSwiftSampleModel.xcdatamodel │ │ └── contents │ ├── SampleEntity+CoreDataClass.swift │ ├── SampleEntity+CoreDataProperties.swift │ └── SampleTableViewController.swift ├── NSQueryGenerationToken ├── NSQueryGenerationTokenObjCSample │ ├── NSQueryGenerationTokenObjCSample.xcodeproj │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcuserdata │ │ │ │ └── nikolay.andonov.xcuserdatad │ │ │ │ └── UserInterfaceState.xcuserstate │ │ └── xcuserdata │ │ │ └── nikolay.andonov.xcuserdatad │ │ │ ├── xcdebugger │ │ │ └── Breakpoints_v2.xcbkptlist │ │ │ └── xcschemes │ │ │ ├── NSQueryGenerationTokenObjCSample.xcscheme │ │ │ └── xcschememanagement.plist │ └── NSQueryGenerationTokenObjCSample │ │ ├── AppDelegate.h │ │ ├── AppDelegate.m │ │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ │ ├── CoreDataHandler.h │ │ ├── CoreDataHandler.m │ │ ├── CoreDataStack.h │ │ ├── CoreDataStack.m │ │ ├── Info.plist │ │ ├── MainTableViewController.h │ │ ├── MainTableViewController.m │ │ ├── NSQueryGenerationTokenModel.xcdatamodeld │ │ └── NSQueryGenerationTokenModel.xcdatamodel │ │ │ └── contents │ │ ├── QueryGenerationTokenModel.xcdatamodeld │ │ └── QueryGenerationTokenModel.xcdatamodel │ │ │ └── contents │ │ ├── SampleEntity+CoreDataClass.h │ │ ├── SampleEntity+CoreDataClass.m │ │ ├── SampleEntity+CoreDataProperties.h │ │ ├── SampleEntity+CoreDataProperties.m │ │ └── main.m └── NSQueryGenerationTokenSwiftSample │ ├── NSQueryGenerationTokenSwiftSample.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcuserdata │ │ │ ├── Dobby.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ │ │ └── nikolay.andonov.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcuserdata │ │ ├── Dobby.xcuserdatad │ │ └── xcschemes │ │ │ ├── NSQueryGenerationTokenSwiftSample.xcscheme │ │ │ └── xcschememanagement.plist │ │ └── nikolay.andonov.xcuserdatad │ │ ├── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist │ │ └── xcschemes │ │ ├── NSQueryGenerationTokenSwiftSample.xcscheme │ │ └── xcschememanagement.plist │ └── NSQueryGenerationTokenSwiftSample │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── CoreDataHandler.swift │ ├── CoreDataStack.swift │ ├── Info.plist │ ├── MainTableViewViewController.swift │ ├── NSPersistentContainerSwiftSampleModel.xcdatamodeld │ └── NSPersistentContainerSwiftSampleModel.xcdatamodel │ │ └── contents.xml │ ├── NSQueryGenerationTokenModel.xcdatamodeld │ └── NSQueryGenerationTokenModel.xcdatamodel │ │ └── contents │ ├── SampleEntity+CoreDataClass.swift │ └── SampleEntity+CoreDataProperties.swift ├── README.md ├── Resources ├── avcapture_photo_output.gif.gif ├── callkit.gif ├── nspersistent_container.gif ├── nsquery_generation_token.gif ├── sirikit.gif ├── speech_recognition.gif ├── uicollection_view_data_source_prefetching.gif ├── uigraphics_renderer.gif ├── uipreview_interaction.gif ├── uiview_property_animator.gif └── user_notifications.gif ├── SiriKit ├── SiriKitObjCSample │ ├── SiriKat │ │ ├── AppDelegate.h │ │ ├── AppDelegate.m │ │ ├── Assets.xcassets │ │ │ └── AppIcon.appiconset │ │ │ │ └── Contents.json │ │ ├── Base.lproj │ │ │ └── LaunchScreen.storyboard │ │ ├── DetailViewController.h │ │ ├── DetailViewController.m │ │ ├── Info.plist │ │ ├── Main.storyboard │ │ ├── PhotosProvider.h │ │ ├── PhotosProvider.m │ │ ├── SiriKat.entitlements │ │ ├── ViewController.h │ │ ├── ViewController.m │ │ ├── cat.jpg │ │ ├── dog.jpg │ │ ├── duck.jpg │ │ ├── main.m │ │ ├── pig.jpg │ │ └── seal.jpg │ ├── SiriKit.xcodeproj │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcuserdata │ │ │ │ └── Dobby.xcuserdatad │ │ │ │ └── UserInterfaceState.xcuserstate │ │ └── xcuserdata │ │ │ └── Dobby.xcuserdatad │ │ │ ├── xcdebugger │ │ │ └── Breakpoints_v2.xcbkptlist │ │ │ └── xcschemes │ │ │ ├── SiriKat.xcscheme │ │ │ ├── SiriKitExtension.xcscheme │ │ │ ├── SiriKitExtensionUI.xcscheme │ │ │ └── xcschememanagement.plist │ └── SiriKitExtension │ │ ├── Info.plist │ │ ├── IntentHandler.h │ │ └── IntentHandler.m └── SiriKitSwiftSample │ ├── SiriKitExtension │ ├── Info.plist │ └── IntentHandler.swift │ ├── SiriKitSwiftSample.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcuserdata │ │ │ └── nikolay.andonov.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcuserdata │ │ └── nikolay.andonov.xcuserdatad │ │ ├── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist │ │ └── xcschemes │ │ ├── SiriKitExtension.xcscheme │ │ ├── SiriKitSwiftSample.xcscheme │ │ └── xcschememanagement.plist │ └── SiriKitSwiftSample │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── DetailViewController.swift │ ├── Info.plist │ ├── PhotosProvider.swift │ ├── SiriKitSwiftSample.entitlements │ ├── ViewController.swift │ ├── cat.jpg │ ├── dog.jpg │ ├── duck.jpg │ ├── pig.jpg │ └── seal.jpg ├── SpeechRecognition ├── SpeechRecognitionObjCSample │ ├── SpeechRecognitionObjCSample.xcodeproj │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcuserdata │ │ │ │ └── nikolay.andonov.xcuserdatad │ │ │ │ └── UserInterfaceState.xcuserstate │ │ └── xcuserdata │ │ │ └── nikolay.andonov.xcuserdatad │ │ │ ├── xcdebugger │ │ │ └── Breakpoints_v2.xcbkptlist │ │ │ └── xcschemes │ │ │ ├── SpeechRecognitionObjCSample.xcscheme │ │ │ └── xcschememanagement.plist │ └── SpeechRecognitionObjCSample │ │ ├── AppDelegate.h │ │ ├── AppDelegate.m │ │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ │ ├── Info.plist │ │ ├── MainViewController.h │ │ ├── MainViewController.m │ │ └── main.m └── SpeechRecognitionSwiftSample │ ├── SpeechRecognitionSwiftSample.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcuserdata │ │ │ └── nikolay.andonov.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcuserdata │ │ └── nikolay.andonov.xcuserdatad │ │ ├── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist │ │ └── xcschemes │ │ ├── SpeechRecognitionSwiftSample.xcscheme │ │ └── xcschememanagement.plist │ └── SpeechRecognitionSwiftSample │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ └── MainViewController.swift ├── UICollectionViewDataSourcePrefetching ├── UICollectionViewDataSourcePrefetchingObjCSample │ ├── UICollectionViewDataSourcePrefetchingObjCSample.xcodeproj │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcuserdata │ │ │ │ ├── Dobby.xcuserdatad │ │ │ │ └── UserInterfaceState.xcuserstate │ │ │ │ └── nikolay.andonov.xcuserdatad │ │ │ │ └── UserInterfaceState.xcuserstate │ │ └── xcuserdata │ │ │ ├── Dobby.xcuserdatad │ │ │ └── xcschemes │ │ │ │ ├── UICollectionViewDataSourcePrefetchingObjCSample.xcscheme │ │ │ │ └── xcschememanagement.plist │ │ │ └── nikolay.andonov.xcuserdatad │ │ │ ├── xcdebugger │ │ │ └── Breakpoints_v2.xcbkptlist │ │ │ └── xcschemes │ │ │ ├── UICollectionViewDataSourcePrefetchingObjCSample.xcscheme │ │ │ └── xcschememanagement.plist │ └── UICollectionViewDataSourcePrefetchingObjCSample │ │ ├── AppDelegate.h │ │ ├── AppDelegate.m │ │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ │ ├── Info.plist │ │ ├── MainCollectionViewCell.h │ │ ├── MainCollectionViewCell.m │ │ ├── MainCollectionViewController.h │ │ ├── MainCollectionViewController.m │ │ └── main.m └── UICollectionViewDataSourcePrefetchingSwiftSample │ ├── UICollectionViewDataSourcePrefetchingSwiftSample.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcuserdata │ │ │ └── nikolay.andonov.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcuserdata │ │ └── nikolay.andonov.xcuserdatad │ │ ├── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist │ │ └── xcschemes │ │ ├── UICollectionViewDataSourcePrefetchingSwiftSample.xcscheme │ │ └── xcschememanagement.plist │ └── UICollectionViewDataSourcePrefetchingSwiftSample │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ ├── MainCollectionViewCell.swift │ └── MainCollectionViewController.swift ├── UIGraphicsRenderer ├── UIGraphicsRendererObjectiveC │ ├── GraphicsRenderer.xcodeproj │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcuserdata │ │ │ │ ├── dobrinka.tabakova.xcuserdatad │ │ │ │ └── UserInterfaceState.xcuserstate │ │ │ │ └── nikolay.andonov.xcuserdatad │ │ │ │ └── UserInterfaceState.xcuserstate │ │ └── xcuserdata │ │ │ ├── dobrinka.tabakova.xcuserdatad │ │ │ ├── xcdebugger │ │ │ │ └── Breakpoints_v2.xcbkptlist │ │ │ └── xcschemes │ │ │ │ ├── GraphicsRenderer.xcscheme │ │ │ │ └── xcschememanagement.plist │ │ │ └── nikolay.andonov.xcuserdatad │ │ │ └── xcschemes │ │ │ ├── GraphicsRenderer.xcscheme │ │ │ └── xcschememanagement.plist │ ├── GraphicsRenderer │ │ ├── AppDelegate.h │ │ ├── AppDelegate.m │ │ ├── Assets.xcassets │ │ │ └── AppIcon.appiconset │ │ │ │ └── Contents.json │ │ ├── Base.lproj │ │ │ ├── LaunchScreen.storyboard │ │ │ └── Main.storyboard │ │ ├── Info.plist │ │ ├── ViewController.h │ │ ├── ViewController.m │ │ ├── black-cat.jpg │ │ └── main.m │ ├── GraphicsRendererTests │ │ ├── GraphicsRendererTests.m │ │ └── Info.plist │ └── GraphicsRendererUITests │ │ ├── GraphicsRendererUITests.m │ │ └── Info.plist └── UIGraphicsRendererSwift │ ├── GraphicsRendererSwift.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcuserdata │ │ │ └── dobrinka.tabakova.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcuserdata │ │ └── dobrinka.tabakova.xcuserdatad │ │ └── xcschemes │ │ ├── GraphicsRendererSwift.xcscheme │ │ └── xcschememanagement.plist │ └── GraphicsRendererSwift │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ ├── ViewController.swift │ └── black-cat.jpg ├── UIPreviewInteraction ├── UIPreviewInteractionObjCSample │ ├── UIPreviewInteractionObjCSample.xcodeproj │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcuserdata │ │ │ │ └── nikolay.andonov.xcuserdatad │ │ │ │ └── UserInterfaceState.xcuserstate │ │ └── xcuserdata │ │ │ └── nikolay.andonov.xcuserdatad │ │ │ └── xcschemes │ │ │ ├── UIPreviewInteractionObjCSample.xcscheme │ │ │ └── xcschememanagement.plist │ └── UIPreviewInteractionObjCSample │ │ ├── AppDelegate.h │ │ ├── AppDelegate.m │ │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ │ ├── Info.plist │ │ ├── PreviewInteractionMainViewController.h │ │ ├── PreviewInteractionMainViewController.m │ │ ├── PreviewInteractionPopViewController.h │ │ ├── PreviewInteractionPopViewController.m │ │ ├── main.m │ │ └── sample.jpg └── UIPreviewInteractionSwiftSample │ ├── UIPreviewInteractionSwiftSample.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcuserdata │ │ │ └── nikolay.andonov.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcuserdata │ │ └── nikolay.andonov.xcuserdatad │ │ ├── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist │ │ └── xcschemes │ │ ├── UIPreviewInteractionSwiftSample.xcscheme │ │ └── xcschememanagement.plist │ └── UIPreviewInteractionSwiftSample │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ ├── PreviewInteractionMainViewController.swift │ ├── PreviewInteractionPopViewController.swift │ └── sample.jpg ├── UIViewPropertyAnimator ├── UIViewPropertyAnimatorObjCSample │ ├── UIViewPropertyAnimatorObjCSample.xcodeproj │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcuserdata │ │ │ │ └── nikolay.andonov.xcuserdatad │ │ │ │ └── UserInterfaceState.xcuserstate │ │ └── xcuserdata │ │ │ └── nikolay.andonov.xcuserdatad │ │ │ ├── xcdebugger │ │ │ └── Breakpoints_v2.xcbkptlist │ │ │ └── xcschemes │ │ │ ├── UIViewPropertyAnimatorObjCSample.xcscheme │ │ │ └── xcschememanagement.plist │ └── UIViewPropertyAnimatorObjCSample │ │ ├── AppDelegate.h │ │ ├── AppDelegate.m │ │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── PropertyAnimatorStoryboard.storyboard │ │ ├── Info.plist │ │ ├── PropertyAnimatorViewController.h │ │ ├── PropertyAnimatorViewController.m │ │ └── main.m └── UIViewPropertyAnimatorSwiftSample │ ├── UIViewPropertyAnimatorSwiftSample.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcuserdata │ │ │ └── nikolay.andonov.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcuserdata │ │ └── nikolay.andonov.xcuserdatad │ │ ├── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist │ │ └── xcschemes │ │ ├── UIViewPropertyAnimatorSwiftSample.xcscheme │ │ └── xcschememanagement.plist │ └── UIViewPropertyAnimatorSwiftSample │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── PropertyAnimatorStoryboard.storyboard │ ├── Info.plist │ └── PropertyAnimatorViewController.swift └── UserNotifications ├── UserNotificationsObjCSample ├── UserNotificationsObjCSample.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcuserdata │ │ │ └── nikolay.andonov.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcuserdata │ │ └── nikolay.andonov.xcuserdatad │ │ ├── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist │ │ └── xcschemes │ │ ├── UserNotificationsObjCSample.xcscheme │ │ └── xcschememanagement.plist └── UserNotificationsObjCSample │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ ├── MainViewController.h │ ├── MainViewController.m │ ├── UserNotificationsHandler.h │ ├── UserNotificationsHandler.m │ ├── logo.png │ └── main.m └── UserNotificationsSwiftSample ├── UserNotificationsSwiftSample.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcuserdata │ │ └── nikolay.andonov.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcuserdata │ └── nikolay.andonov.xcuserdatad │ ├── xcdebugger │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ ├── UserNotificationsSwiftSample.xcscheme │ └── xcschememanagement.plist └── UserNotificationsSwiftSample ├── AppDelegate.swift ├── Assets.xcassets └── AppIcon.appiconset │ └── Contents.json ├── Base.lproj ├── LaunchScreen.storyboard └── Main.storyboard ├── Info.plist ├── MainViewController.swift ├── UserNotificationsHandler.swift └── logo.png /AVCapturePhotoOutput/AVCapturePhotoOutputObjectiveCSample/AVCapturePhotoOutputObjectiveCSample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /AVCapturePhotoOutput/AVCapturePhotoOutputObjectiveCSample/AVCapturePhotoOutputObjectiveCSample.xcodeproj/project.xcworkspace/xcuserdata/nikolay.andonov.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naandonov-mm/iOS-10-Sampler/5b70e0234bc21cb3acd1250bc234572eacaa7078/AVCapturePhotoOutput/AVCapturePhotoOutputObjectiveCSample/AVCapturePhotoOutputObjectiveCSample.xcodeproj/project.xcworkspace/xcuserdata/nikolay.andonov.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /AVCapturePhotoOutput/AVCapturePhotoOutputObjectiveCSample/AVCapturePhotoOutputObjectiveCSample.xcodeproj/xcuserdata/nikolay.andonov.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 8 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /AVCapturePhotoOutput/AVCapturePhotoOutputObjectiveCSample/AVCapturePhotoOutputObjectiveCSample.xcodeproj/xcuserdata/nikolay.andonov.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | AVCapturePhotoOutputObjectiveCSample.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 4E606B771DF7122100B3EF1D 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /AVCapturePhotoOutput/AVCapturePhotoOutputObjectiveCSample/AVCapturePhotoOutputObjectiveCSample/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // AVCapturePhotoOutputObjectiveCSample 4 | // 5 | // Created by Nikolay Andonov on 12/6/16. 6 | // Copyright © 2016 Mentormate. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /AVCapturePhotoOutput/AVCapturePhotoOutputObjectiveCSample/AVCapturePhotoOutputObjectiveCSample/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /AVCapturePhotoOutput/AVCapturePhotoOutputObjectiveCSample/AVCapturePhotoOutputObjectiveCSample/CapturePhotoHandler.h: -------------------------------------------------------------------------------- 1 | // 2 | // CapturePhotoHandler.h 3 | // AVCapturePhotoOutputObjectiveCSample 4 | // 5 | // Created by Nikolay Andonov on 12/6/16. 6 | // Copyright © 2016 Mentormate. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @protocol CapturePhotoHandlerDelegate 13 | 14 | - (void)didEndCapturingLivePhotoWithSuccess:(BOOL)success; 15 | 16 | @end 17 | 18 | @interface CapturePhotoHandler : NSObject 19 | 20 | @property(nonatomic, weak) id delegate; 21 | 22 | + (instancetype)sharedHandler; 23 | 24 | - (BOOL)isLivePhotoSupported; 25 | - (void)createCaptureSessionForView:(UIView *)view; 26 | - (void)takeLivePhoto; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /AVCapturePhotoOutput/AVCapturePhotoOutputObjectiveCSample/AVCapturePhotoOutputObjectiveCSample/MainViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // MainViewController.h 3 | // AVCapturePhotoOutputObjectiveCSample 4 | // 5 | // Created by Nikolay Andonov on 12/6/16. 6 | // Copyright © 2016 Mentormate. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface MainViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /AVCapturePhotoOutput/AVCapturePhotoOutputObjectiveCSample/AVCapturePhotoOutputObjectiveCSample/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // AVCapturePhotoOutputObjectiveCSample 4 | // 5 | // Created by Nikolay Andonov on 12/6/16. 6 | // Copyright © 2016 Mentormate. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /AVCapturePhotoOutput/AVCapturePhotoOutputSwiftSample/AVCapturePhotoOutputSwiftSample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /AVCapturePhotoOutput/AVCapturePhotoOutputSwiftSample/AVCapturePhotoOutputSwiftSample.xcodeproj/project.xcworkspace/xcuserdata/nikolay.andonov.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naandonov-mm/iOS-10-Sampler/5b70e0234bc21cb3acd1250bc234572eacaa7078/AVCapturePhotoOutput/AVCapturePhotoOutputSwiftSample/AVCapturePhotoOutputSwiftSample.xcodeproj/project.xcworkspace/xcuserdata/nikolay.andonov.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /AVCapturePhotoOutput/AVCapturePhotoOutputSwiftSample/AVCapturePhotoOutputSwiftSample.xcodeproj/xcuserdata/nikolay.andonov.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 8 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /AVCapturePhotoOutput/AVCapturePhotoOutputSwiftSample/AVCapturePhotoOutputSwiftSample.xcodeproj/xcuserdata/nikolay.andonov.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | AVCapturePhotoOutputSwiftSample.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 4E77CE8D1DD5D24E002AE146 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /CallKit/CallKitObjCSample/CallKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /CallKit/CallKitObjCSample/CallKit.xcodeproj/project.xcworkspace/xcuserdata/Dobby.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naandonov-mm/iOS-10-Sampler/5b70e0234bc21cb3acd1250bc234572eacaa7078/CallKit/CallKitObjCSample/CallKit.xcodeproj/project.xcworkspace/xcuserdata/Dobby.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /CallKit/CallKitObjCSample/CallKit.xcodeproj/xcuserdata/Dobby.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /CallKit/CallKitObjCSample/CallKit.xcodeproj/xcuserdata/Dobby.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | CallKit.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | C773E50A1D99B17D00A6DEBC 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /CallKit/CallKitObjCSample/CallKit/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // CallKit 4 | // 5 | // Created by Dobrinka Tabakova on 9/26/16. 6 | // Copyright © 2016 Dobrinka Tabakova. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /CallKit/CallKitObjCSample/CallKit/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /CallKit/CallKitObjCSample/CallKit/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /CallKit/CallKitObjCSample/CallKit/CallManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // CallManager.h 3 | // CallKit 4 | // 5 | // Created by Dobrinka Tabakova on 11/13/16. 6 | // Copyright © 2016 Dobrinka Tabakova. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @protocol CallManagerDelegate 13 | 14 | - (void)callDidAnswer; 15 | - (void)callDidEnd; 16 | - (void)callDidHold:(BOOL)isOnHold; 17 | - (void)callDidFail; 18 | 19 | @end 20 | 21 | @interface CallManager : NSObject 22 | 23 | + (CallManager*)sharedInstance; 24 | - (void)reportIncomingCallForUUID:(NSUUID*)uuid phoneNumber:(NSString*)phoneNumber; 25 | - (void)startCallWithPhoneNumber:(NSString*)phoneNumber; 26 | - (void)endCall; 27 | - (void)holdCall:(BOOL)hold; 28 | 29 | @property (nonatomic, weak) id delegate; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /CallKit/CallKitObjCSample/CallKit/CallViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // CallViewController.h 3 | // CallKit 4 | // 5 | // Created by Dobrinka Tabakova on 9/26/16. 6 | // Copyright © 2016 Dobrinka Tabakova. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface CallViewController : UIViewController 12 | 13 | @property (nonatomic, strong) NSString *phoneNumber; 14 | @property (nonnull, strong) NSUUID *uuid; 15 | @property (nonatomic, assign) BOOL isIncoming; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /CallKit/CallKitObjCSample/CallKit/IncomingCallViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // IncomingCallViewController.h 3 | // CallKit 4 | // 5 | // Created by Dobrinka Tabakova on 9/26/16. 6 | // Copyright © 2016 Dobrinka Tabakova. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface IncomingCallViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /CallKit/CallKitObjCSample/CallKit/IncomingCallViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // IncomingCallViewController.m 3 | // CallKit 4 | // 5 | // Created by Dobrinka Tabakova on 9/26/16. 6 | // Copyright © 2016 Dobrinka Tabakova. All rights reserved. 7 | // 8 | 9 | #import "IncomingCallViewController.h" 10 | #import "CallViewController.h" 11 | 12 | 13 | static NSString *const kTitle = @"Incoming Call"; 14 | 15 | @interface IncomingCallViewController () 16 | 17 | @property (weak, nonatomic) IBOutlet UITextField *phoneNumberTextField; 18 | @property (weak, nonatomic) IBOutlet UIButton *simulateCallButton; 19 | 20 | @end 21 | 22 | 23 | @implementation IncomingCallViewController 24 | 25 | - (void)viewDidLoad { 26 | [super viewDidLoad]; 27 | self.title = kTitle; 28 | } 29 | 30 | #pragma mark - Actions 31 | 32 | - (IBAction)phoneNumberValueChanged:(UITextField*)sender { 33 | NSString *phoneNumber = [sender.text stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; 34 | self.simulateCallButton.enabled = (phoneNumber.length); 35 | } 36 | 37 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 38 | if ([[segue identifier] isEqualToString:@"ShowCall"]) { 39 | CallViewController* callViewController = [segue destinationViewController]; 40 | callViewController.phoneNumber = self.phoneNumberTextField.text; 41 | callViewController.isIncoming = YES; 42 | callViewController.uuid = [NSUUID new]; 43 | } 44 | } 45 | 46 | @end 47 | 48 | -------------------------------------------------------------------------------- /CallKit/CallKitObjCSample/CallKit/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) Demo 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UIBackgroundModes 24 | 25 | audio 26 | voip 27 | 28 | UILaunchStoryboardName 29 | LaunchScreen 30 | UIMainStoryboardFile 31 | Main 32 | UIRequiredDeviceCapabilities 33 | 34 | armv7 35 | 36 | UISupportedInterfaceOrientations 37 | 38 | UIInterfaceOrientationPortrait 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | CFBundleURLTypes 43 | 44 | 45 | CFBundleTypeRole 46 | Editor 47 | CFBundleURLName 48 | $(PRODUCT_BUNDLE_IDENTIFIER).url-scheme.dial 49 | CFBundleURLSchemes 50 | 51 | callkit-demo 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /CallKit/CallKitObjCSample/CallKit/OutgoingCallViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // OutgoingCallViewController.h 3 | // CallKit 4 | // 5 | // Created by Dobrinka Tabakova on 9/26/16. 6 | // Copyright © 2016 Dobrinka Tabakova. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface OutgoingCallViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /CallKit/CallKitObjCSample/CallKit/OutgoingCallViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // OutgoingCallViewController.m 3 | // CallKit 4 | // 5 | // Created by Dobrinka Tabakova on 9/26/16. 6 | // Copyright © 2016 Dobrinka Tabakova. All rights reserved. 7 | // 8 | 9 | #import "OutgoingCallViewController.h" 10 | #import "CallViewController.h" 11 | 12 | 13 | static NSString *const kTitle = @"Dial Call"; 14 | 15 | @interface OutgoingCallViewController () 16 | @property (weak, nonatomic) IBOutlet UIButton *dialButton; 17 | @property (weak, nonatomic) IBOutlet UITextField *phoneNumberTextField; 18 | 19 | @end 20 | 21 | @implementation OutgoingCallViewController 22 | 23 | - (void)viewDidLoad { 24 | [super viewDidLoad]; 25 | self.title = kTitle; 26 | } 27 | 28 | #pragma mark - Actions 29 | 30 | - (IBAction)phoneNumberValueChanged:(UITextField*)sender { 31 | NSString *phoneNumber = [sender.text stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; 32 | self.dialButton.enabled = (phoneNumber.length); 33 | } 34 | 35 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 36 | if ([[segue identifier] isEqualToString:@"ShowDial"]) { 37 | CallViewController* callViewController = [segue destinationViewController]; 38 | callViewController.phoneNumber = self.phoneNumberTextField.text; 39 | } 40 | } 41 | 42 | @end 43 | 44 | -------------------------------------------------------------------------------- /CallKit/CallKitObjCSample/CallKit/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // CallKit 4 | // 5 | // Created by Dobrinka Tabakova on 9/26/16. 6 | // Copyright © 2016 Dobrinka Tabakova. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /CallKit/CallKitObjCSample/CallKit/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // CallKit 4 | // 5 | // Created by Dobrinka Tabakova on 9/26/16. 6 | // Copyright © 2016 Dobrinka Tabakova. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | 11 | 12 | static NSString *const kTitle = @"CallKit"; 13 | 14 | @interface ViewController () 15 | 16 | @end 17 | 18 | 19 | @implementation ViewController 20 | 21 | - (void)viewDidLoad { 22 | [super viewDidLoad]; 23 | self.title = kTitle; 24 | } 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /CallKit/CallKitObjCSample/CallKit/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // CallKit 4 | // 5 | // Created by Dobrinka Tabakova on 9/26/16. 6 | // Copyright © 2016 Dobrinka Tabakova. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /CallKit/CallKitSwiftSample/CallKitSwiftSample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /CallKit/CallKitSwiftSample/CallKitSwiftSample.xcodeproj/project.xcworkspace/xcuserdata/nikolay.andonov.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naandonov-mm/iOS-10-Sampler/5b70e0234bc21cb3acd1250bc234572eacaa7078/CallKit/CallKitSwiftSample/CallKitSwiftSample.xcodeproj/project.xcworkspace/xcuserdata/nikolay.andonov.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /CallKit/CallKitSwiftSample/CallKitSwiftSample.xcodeproj/xcuserdata/nikolay.andonov.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | CallKitSwiftSample.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 4E340E981DDB332F00A484BA 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /CallKit/CallKitSwiftSample/CallKitSwiftSample/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /CallKit/CallKitSwiftSample/CallKitSwiftSample/IncomingCallViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // IncomingCallViewController.swift 3 | // CallKitSwiftSample 4 | // 5 | // Created by Nikolay Andonov on 11/15/16. 6 | // Copyright © 2016 Mentormate. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class IncomingCallViewController: UIViewController { 12 | 13 | private let kTitle = "Incomming Call" 14 | 15 | @IBOutlet weak var phoneNumberTextField: UITextField! 16 | @IBOutlet weak var simualteCallButton: UIButton! 17 | 18 | override func viewDidLoad() { 19 | super.viewDidLoad() 20 | 21 | title = kTitle 22 | } 23 | 24 | // MARK: - Actions 25 | @IBAction func phoneNumberValueChanged(_ sender: UITextField) { 26 | 27 | let phoneNumber = sender.text?.trimmingCharacters(in: .whitespacesAndNewlines) 28 | simualteCallButton.isEnabled = (phoneNumber?.characters.count)! > 0 29 | } 30 | 31 | override func prepare(for segue: UIStoryboardSegue, sender: Any?) { 32 | 33 | if segue.identifier == "ShowCall" { 34 | let callViewController = segue.destination as! CallViewController 35 | callViewController.phoneNumber = phoneNumberTextField.text 36 | callViewController.isIncoming = true 37 | callViewController.uuid = UUID.init() 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /CallKit/CallKitSwiftSample/CallKitSwiftSample/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /CallKit/CallKitSwiftSample/CallKitSwiftSample/OutgoingCallViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // OutgoingCallViewController.swift 3 | // CallKitSwiftSample 4 | // 5 | // Created by Nikolay Andonov on 11/15/16. 6 | // Copyright © 2016 Mentormate. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class OutgoingCallViewController: UIViewController { 12 | 13 | private let kTitle = "Dial Call" 14 | 15 | @IBOutlet weak var phoneNumberTextField: UITextField! 16 | @IBOutlet weak var dialButton: UIButton! 17 | 18 | override func viewDidLoad() { 19 | super.viewDidLoad() 20 | title = kTitle 21 | } 22 | 23 | // MARK: - Actions 24 | 25 | @IBAction func phoneNumberValueChanged(_ sender: UITextField) { 26 | 27 | let phoneNumber = sender.text?.trimmingCharacters(in: .whitespacesAndNewlines) 28 | dialButton.isEnabled = (phoneNumber?.characters.count)! > 0 29 | } 30 | 31 | override func prepare(for segue: UIStoryboardSegue, sender: Any?) { 32 | 33 | if segue.identifier == "ShowDial" { 34 | let callViewController = segue.destination as! CallViewController 35 | callViewController.phoneNumber = phoneNumberTextField.text 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /CallKit/CallKitSwiftSample/CallKitSwiftSample/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // CallKitSwiftSample 4 | // 5 | // Created by Nikolay Andonov on 11/15/16. 6 | // Copyright © 2016 Mentormate. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | 12 | class ViewController: UIViewController { 13 | 14 | private let kTitle = "CallKit" 15 | 16 | override func viewDidLoad() { 17 | super.viewDidLoad() 18 | // Do any additional setup after loading the view, typically from a nib. 19 | title = kTitle 20 | } 21 | 22 | 23 | } 24 | 25 | -------------------------------------------------------------------------------- /NSPersistentContainer/NSPersistentContainerObjCSample/NSPersistentContainerObjCSample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /NSPersistentContainer/NSPersistentContainerObjCSample/NSPersistentContainerObjCSample.xcodeproj/project.xcworkspace/xcuserdata/Dobby.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naandonov-mm/iOS-10-Sampler/5b70e0234bc21cb3acd1250bc234572eacaa7078/NSPersistentContainer/NSPersistentContainerObjCSample/NSPersistentContainerObjCSample.xcodeproj/project.xcworkspace/xcuserdata/Dobby.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /NSPersistentContainer/NSPersistentContainerObjCSample/NSPersistentContainerObjCSample.xcodeproj/project.xcworkspace/xcuserdata/nikolay.andonov.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naandonov-mm/iOS-10-Sampler/5b70e0234bc21cb3acd1250bc234572eacaa7078/NSPersistentContainer/NSPersistentContainerObjCSample/NSPersistentContainerObjCSample.xcodeproj/project.xcworkspace/xcuserdata/nikolay.andonov.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /NSPersistentContainer/NSPersistentContainerObjCSample/NSPersistentContainerObjCSample.xcodeproj/xcuserdata/Dobby.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | NSPersistentContainerObjCSample.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 4E261DD91DAB0CC500E1FCA1 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /NSPersistentContainer/NSPersistentContainerObjCSample/NSPersistentContainerObjCSample.xcodeproj/xcuserdata/nikolay.andonov.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 8 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /NSPersistentContainer/NSPersistentContainerObjCSample/NSPersistentContainerObjCSample.xcodeproj/xcuserdata/nikolay.andonov.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | NSPersistentContainerObjCSample.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 4E261DD91DAB0CC500E1FCA1 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /NSPersistentContainer/NSPersistentContainerObjCSample/NSPersistentContainerObjCSample/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // NSPersistentContainerObjCSample 4 | // 5 | // Created by nikolay.andonov on 10/10/16. 6 | // Copyright © 2016 nikolay.andonov. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /NSPersistentContainer/NSPersistentContainerObjCSample/NSPersistentContainerObjCSample/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /NSPersistentContainer/NSPersistentContainerObjCSample/NSPersistentContainerObjCSample/CoreDataHandler.h: -------------------------------------------------------------------------------- 1 | // 2 | // CoreDataHandler.h 3 | // NSPersistentContainerObjCSample 4 | // 5 | // Created by nikolay.andonov on 10/10/16. 6 | // Copyright © 2016 nikolay.andonov. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "SampleEntity+CoreDataProperties.h" 11 | #import 12 | #import "CoreDataStack.h" 13 | 14 | @interface CoreDataHandler : NSObject 15 | 16 | + (void)loadHardcodedDatabaseIfNeccessary; 17 | + (void)insertSampleEntityWithName:(NSString *)name context:(NSManagedObjectContext *)context; 18 | + (NSArray *)fetchAllSamplesWithContext:(NSManagedObjectContext *)context; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /NSPersistentContainer/NSPersistentContainerObjCSample/NSPersistentContainerObjCSample/CoreDataStack.h: -------------------------------------------------------------------------------- 1 | // 2 | // CoreDataStack.h 3 | // NSPersistentContainerObjCSample 4 | // 5 | // Created by nikolay.andonov on 10/10/16. 6 | // Copyright © 2016 nikolay.andonov. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface CoreDataStack : NSObject 13 | 14 | @property (strong, nonatomic, readonly) NSPersistentContainer *persistentContainer; 15 | 16 | + (instancetype)sharedInstance; 17 | - (void)saveContext; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /NSPersistentContainer/NSPersistentContainerObjCSample/NSPersistentContainerObjCSample/CoreDataStack.m: -------------------------------------------------------------------------------- 1 | // 2 | // CoreDataStack.m 3 | // NSPersistentContainerObjCSample 4 | // 5 | // Created by nikolay.andonov on 10/10/16. 6 | // Copyright © 2016 nikolay.andonov. All rights reserved. 7 | // 8 | 9 | #import "CoreDataStack.h" 10 | 11 | @interface CoreDataStack() 12 | 13 | @property (strong, nonatomic, readwrite) NSPersistentContainer *persistentContainer; 14 | 15 | @end 16 | 17 | @implementation CoreDataStack 18 | 19 | + (instancetype)sharedInstance { 20 | 21 | static CoreDataStack *sharedInstance = nil; 22 | static dispatch_once_t onceToken; 23 | dispatch_once(&onceToken, ^{ 24 | sharedInstance = [[CoreDataStack alloc] init]; 25 | }); 26 | return sharedInstance; 27 | } 28 | 29 | - (NSPersistentContainer *)persistentContainer { 30 | 31 | @synchronized (self) { 32 | if (_persistentContainer) { 33 | return _persistentContainer; 34 | } 35 | 36 | NSPersistentContainer *persistentContainer = [NSPersistentContainer persistentContainerWithName:@"NSPersistentContainerObjCsSampleModel"]; 37 | [persistentContainer loadPersistentStoresWithCompletionHandler:^(NSPersistentStoreDescription *storeDescription, NSError *error) { 38 | if (error) { 39 | NSLog(@"Unresolved Error %@", error); 40 | } 41 | }]; 42 | _persistentContainer = persistentContainer; 43 | return persistentContainer; 44 | } 45 | } 46 | 47 | - (void)saveContext { 48 | NSManagedObjectContext *context = self.persistentContainer.viewContext; 49 | if (context.hasChanges) { 50 | NSError *error = nil; 51 | [context save:&error]; 52 | if (error) { 53 | NSLog(@"Unresolved error %@", error); 54 | } 55 | } 56 | 57 | 58 | } 59 | 60 | 61 | @end 62 | -------------------------------------------------------------------------------- /NSPersistentContainer/NSPersistentContainerObjCSample/NSPersistentContainerObjCSample/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /NSPersistentContainer/NSPersistentContainerObjCSample/NSPersistentContainerObjCSample/NSPersistentContainerObjCSampleModel.xcdatamodeld/NSPersistentContainerObjCSampleModel.xcdatamodel/contents: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /NSPersistentContainer/NSPersistentContainerObjCSample/NSPersistentContainerObjCSample/NSPersistentContainerObjCsSampleModel.xcdatamodeld/NSPersistentContainerObjCsSampleModel.xcdatamodel/contents: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /NSPersistentContainer/NSPersistentContainerObjCSample/NSPersistentContainerObjCSample/SampleEntity+CoreDataClass.h: -------------------------------------------------------------------------------- 1 | // 2 | // SampleEntity+CoreDataClass.h 3 | // NSPersistentContainerObjCSample 4 | // 5 | // Created by nikolay.andonov on 10/10/16. 6 | // Copyright © 2016 nikolay.andonov. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | @interface SampleEntity : NSManagedObject 15 | 16 | @end 17 | 18 | NS_ASSUME_NONNULL_END 19 | 20 | #import "SampleEntity+CoreDataProperties.h" 21 | -------------------------------------------------------------------------------- /NSPersistentContainer/NSPersistentContainerObjCSample/NSPersistentContainerObjCSample/SampleEntity+CoreDataClass.m: -------------------------------------------------------------------------------- 1 | // 2 | // SampleEntity+CoreDataClass.m 3 | // NSPersistentContainerObjCSample 4 | // 5 | // Created by nikolay.andonov on 10/10/16. 6 | // Copyright © 2016 nikolay.andonov. All rights reserved. 7 | // 8 | 9 | #import "SampleEntity+CoreDataClass.h" 10 | 11 | @implementation SampleEntity 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /NSPersistentContainer/NSPersistentContainerObjCSample/NSPersistentContainerObjCSample/SampleEntity+CoreDataProperties.h: -------------------------------------------------------------------------------- 1 | // 2 | // SampleEntity+CoreDataProperties.h 3 | // NSPersistentContainerObjCSample 4 | // 5 | // Created by nikolay.andonov on 10/10/16. 6 | // Copyright © 2016 nikolay.andonov. All rights reserved. 7 | // 8 | 9 | #import "SampleEntity+CoreDataClass.h" 10 | 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | @interface SampleEntity (CoreDataProperties) 15 | 16 | + (NSFetchRequest *)fetchRequest; 17 | 18 | @property (nullable, nonatomic, copy) NSString *name; 19 | 20 | @end 21 | 22 | NS_ASSUME_NONNULL_END 23 | -------------------------------------------------------------------------------- /NSPersistentContainer/NSPersistentContainerObjCSample/NSPersistentContainerObjCSample/SampleEntity+CoreDataProperties.m: -------------------------------------------------------------------------------- 1 | // 2 | // SampleEntity+CoreDataProperties.m 3 | // NSPersistentContainerObjCSample 4 | // 5 | // Created by nikolay.andonov on 10/10/16. 6 | // Copyright © 2016 nikolay.andonov. All rights reserved. 7 | // 8 | 9 | #import "SampleEntity+CoreDataProperties.h" 10 | 11 | @implementation SampleEntity (CoreDataProperties) 12 | 13 | + (NSFetchRequest *)fetchRequest { 14 | return [[NSFetchRequest alloc] initWithEntityName:@"SampleEntity"]; 15 | } 16 | 17 | @dynamic name; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /NSPersistentContainer/NSPersistentContainerObjCSample/NSPersistentContainerObjCSample/SampleTableViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // SampleTableViewController.h 3 | // NSPersistentContainerObjCSample 4 | // 5 | // Created by nikolay.andonov on 10/10/16. 6 | // Copyright © 2016 nikolay.andonov. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface SampleTableViewController : UITableViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /NSPersistentContainer/NSPersistentContainerObjCSample/NSPersistentContainerObjCSample/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // NSPersistentContainerObjCSample 4 | // 5 | // Created by nikolay.andonov on 10/10/16. 6 | // Copyright © 2016 nikolay.andonov. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /NSPersistentContainer/NSPersistentContainerSwiftSample/NSPersistentContainerSwiftSample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /NSPersistentContainer/NSPersistentContainerSwiftSample/NSPersistentContainerSwiftSample.xcodeproj/project.xcworkspace/xcuserdata/nikolay.andonov.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naandonov-mm/iOS-10-Sampler/5b70e0234bc21cb3acd1250bc234572eacaa7078/NSPersistentContainer/NSPersistentContainerSwiftSample/NSPersistentContainerSwiftSample.xcodeproj/project.xcworkspace/xcuserdata/nikolay.andonov.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /NSPersistentContainer/NSPersistentContainerSwiftSample/NSPersistentContainerSwiftSample.xcodeproj/xcuserdata/nikolay.andonov.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 8 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /NSPersistentContainer/NSPersistentContainerSwiftSample/NSPersistentContainerSwiftSample.xcodeproj/xcuserdata/nikolay.andonov.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | NSPersistentContainerSwiftSample.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 4E261DA41DAAE44E00E1FCA1 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /NSPersistentContainer/NSPersistentContainerSwiftSample/NSPersistentContainerSwiftSample/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /NSPersistentContainer/NSPersistentContainerSwiftSample/NSPersistentContainerSwiftSample/CoreDataHandler.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CoreDataHandler.swift 3 | // NSPersistentContainerSwiftSample 4 | // 5 | // Created by nikolay.andonov on 10/10/16. 6 | // Copyright © 2016 nikolay.andonov. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import CoreData 11 | 12 | class CoreDataHandler { 13 | 14 | static func loadHardcodedDatabaseIfNeccessary() { 15 | 16 | let sharedDataStack = CoreDataStack.sharedInstance 17 | let context = sharedDataStack.persistentContainer.viewContext 18 | if let allSamples = fetchAllSamples(context: context) { 19 | if allSamples.count > 0 { 20 | return 21 | } 22 | } 23 | 24 | for i in 1..<10 { 25 | insertSampleEntity(name: "Entity #\(i)", context: context) 26 | } 27 | 28 | context.performAndWait { 29 | sharedDataStack.saveContext() 30 | } 31 | } 32 | 33 | static func insertSampleEntity(name: String, context: NSManagedObjectContext) { 34 | 35 | let sampleEntity = SampleEntity(context: context) 36 | sampleEntity.name = name 37 | } 38 | 39 | static func fetchAllSamples(context: NSManagedObjectContext) -> NSArray? { 40 | 41 | var result : NSArray? = nil 42 | context.performAndWait({ 43 | let request : NSFetchRequest = SampleEntity.fetchRequest() 44 | let nameSortDescriptor = NSSortDescriptor(key: "name", ascending: true) 45 | request.sortDescriptors = [nameSortDescriptor] 46 | result = try! context.fetch(request) as NSArray? 47 | }) 48 | 49 | return result 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /NSPersistentContainer/NSPersistentContainerSwiftSample/NSPersistentContainerSwiftSample/CoreDataStack.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CoreDataStack.swift 3 | // NSPersistentContainerSwiftSample 4 | // 5 | // Created by nikolay.andonov on 10/9/16. 6 | // Copyright © 2016 nikolay.andonov. All rights reserved. 7 | // 8 | 9 | import CoreData 10 | 11 | private let sharedCoreDataStack = CoreDataStack() 12 | 13 | class CoreDataStack { 14 | 15 | class var sharedInstance: CoreDataStack { 16 | return sharedCoreDataStack 17 | } 18 | 19 | lazy var persistentContainer: NSPersistentContainer = { 20 | let container = NSPersistentContainer(name: "NSPersistentContainerSwiftSampleModel") 21 | container.loadPersistentStores(completionHandler: { (storeDescription, error) in 22 | if let error = error { 23 | fatalError("Unresolved error \(error))") 24 | } 25 | }) 26 | return container 27 | }() 28 | 29 | func saveContext() { 30 | let context = persistentContainer.viewContext 31 | if context.hasChanges { 32 | do { 33 | try context.save() 34 | } catch let error as NSError { 35 | fatalError("Unresolved error \(error)") 36 | } 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /NSPersistentContainer/NSPersistentContainerSwiftSample/NSPersistentContainerSwiftSample/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /NSPersistentContainer/NSPersistentContainerSwiftSample/NSPersistentContainerSwiftSample/NSPersistentContainerSwiftSampleModel.xcdatamodeld/NSPersistentContainerSwiftSampleModel.xcdatamodel/contents: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /NSPersistentContainer/NSPersistentContainerSwiftSample/NSPersistentContainerSwiftSample/SampleEntity+CoreDataClass.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SampleEntity+CoreDataClass.swift 3 | // NSPersistentContainerSwiftSample 4 | // 5 | // Created by nikolay.andonov on 10/10/16. 6 | // Copyright © 2016 nikolay.andonov. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import CoreData 11 | 12 | 13 | public class SampleEntity: NSManagedObject { 14 | 15 | } 16 | -------------------------------------------------------------------------------- /NSPersistentContainer/NSPersistentContainerSwiftSample/NSPersistentContainerSwiftSample/SampleEntity+CoreDataProperties.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SampleEntity+CoreDataProperties.swift 3 | // NSPersistentContainerSwiftSample 4 | // 5 | // Created by nikolay.andonov on 10/10/16. 6 | // Copyright © 2016 nikolay.andonov. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import CoreData 11 | 12 | 13 | extension SampleEntity { 14 | 15 | @nonobjc public class func fetchRequest() -> NSFetchRequest { 16 | return NSFetchRequest(entityName: "SampleEntity"); 17 | } 18 | 19 | @NSManaged public var name: String? 20 | 21 | } 22 | -------------------------------------------------------------------------------- /NSQueryGenerationToken/NSQueryGenerationTokenObjCSample/NSQueryGenerationTokenObjCSample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /NSQueryGenerationToken/NSQueryGenerationTokenObjCSample/NSQueryGenerationTokenObjCSample.xcodeproj/project.xcworkspace/xcuserdata/nikolay.andonov.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naandonov-mm/iOS-10-Sampler/5b70e0234bc21cb3acd1250bc234572eacaa7078/NSQueryGenerationToken/NSQueryGenerationTokenObjCSample/NSQueryGenerationTokenObjCSample.xcodeproj/project.xcworkspace/xcuserdata/nikolay.andonov.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /NSQueryGenerationToken/NSQueryGenerationTokenObjCSample/NSQueryGenerationTokenObjCSample.xcodeproj/xcuserdata/nikolay.andonov.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /NSQueryGenerationToken/NSQueryGenerationTokenObjCSample/NSQueryGenerationTokenObjCSample.xcodeproj/xcuserdata/nikolay.andonov.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | NSQueryGenerationTokenObjCSample.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 4E31A58F1DC7F50C00187D0B 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /NSQueryGenerationToken/NSQueryGenerationTokenObjCSample/NSQueryGenerationTokenObjCSample/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // NSQueryGenerationTokenObjCSample 4 | // 5 | // Created by nikolay.andonov on 10/31/16. 6 | // Copyright © 2016 nikolay.andonov. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /NSQueryGenerationToken/NSQueryGenerationTokenObjCSample/NSQueryGenerationTokenObjCSample/CoreDataHandler.h: -------------------------------------------------------------------------------- 1 | // 2 | // CoreDataHandler.h 3 | // NSPersistentContainerObjCSample 4 | // 5 | // Created by nikolay.andonov on 10/10/16. 6 | // Copyright © 2016 nikolay.andonov. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "SampleEntity+CoreDataProperties.h" 11 | #import 12 | #import "CoreDataStack.h" 13 | 14 | @interface CoreDataHandler : NSObject 15 | 16 | + (instancetype)sharedHandler; 17 | 18 | - (void)loadHardcodedDatabase; 19 | - (NSArray *)fetchAllSamplesWithContext:(NSManagedObjectContext *)context; 20 | - (void)setFirstGenerationTokenOnMainContext; 21 | - (void)setCurrentGenerationTokenOnMainContext; 22 | - (void)generateDataUpdate; 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /NSQueryGenerationToken/NSQueryGenerationTokenObjCSample/NSQueryGenerationTokenObjCSample/CoreDataStack.h: -------------------------------------------------------------------------------- 1 | // 2 | // CoreDataStack.h 3 | // NSPersistentContainerObjCSample 4 | // 5 | // Created by nikolay.andonov on 10/10/16. 6 | // Copyright © 2016 nikolay.andonov. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface CoreDataStack : NSObject 13 | 14 | @property (strong, nonatomic, readonly) NSPersistentContainer *persistentContainer; 15 | 16 | + (instancetype)sharedInstance; 17 | - (void)saveContext; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /NSQueryGenerationToken/NSQueryGenerationTokenObjCSample/NSQueryGenerationTokenObjCSample/CoreDataStack.m: -------------------------------------------------------------------------------- 1 | // 2 | // CoreDataStack.m 3 | // NSPersistentContainerObjCSample 4 | // 5 | // Created by nikolay.andonov on 10/10/16. 6 | // Copyright © 2016 nikolay.andonov. All rights reserved. 7 | // 8 | 9 | #import "CoreDataStack.h" 10 | 11 | @interface CoreDataStack() 12 | 13 | @property (strong, nonatomic, readwrite) NSPersistentContainer *persistentContainer; 14 | 15 | @end 16 | 17 | @implementation CoreDataStack 18 | 19 | + (instancetype)sharedInstance { 20 | 21 | static CoreDataStack *sharedInstance = nil; 22 | static dispatch_once_t onceToken; 23 | dispatch_once(&onceToken, ^{ 24 | sharedInstance = [[CoreDataStack alloc] init]; 25 | }); 26 | return sharedInstance; 27 | } 28 | 29 | - (NSPersistentContainer *)persistentContainer { 30 | 31 | @synchronized (self) { 32 | if (_persistentContainer) { 33 | return _persistentContainer; 34 | } 35 | 36 | NSPersistentContainer *persistentContainer = [NSPersistentContainer persistentContainerWithName:@"NSQueryGenerationTokenModel"]; 37 | [persistentContainer loadPersistentStoresWithCompletionHandler:^(NSPersistentStoreDescription *storeDescription, NSError *error) { 38 | if (error) { 39 | NSLog(@"Unresolved Error %@", error); 40 | } 41 | }]; 42 | _persistentContainer = persistentContainer; 43 | return persistentContainer; 44 | } 45 | } 46 | 47 | - (void)saveContext { 48 | NSManagedObjectContext *context = self.persistentContainer.viewContext; 49 | if (context.hasChanges) { 50 | NSError *error = nil; 51 | [context save:&error]; 52 | if (error) { 53 | NSLog(@"Unresolved error %@", error); 54 | } 55 | } 56 | 57 | 58 | } 59 | 60 | 61 | @end 62 | -------------------------------------------------------------------------------- /NSQueryGenerationToken/NSQueryGenerationTokenObjCSample/NSQueryGenerationTokenObjCSample/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /NSQueryGenerationToken/NSQueryGenerationTokenObjCSample/NSQueryGenerationTokenObjCSample/MainTableViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // MainTableViewController.h 3 | // NSQueryGenerationTokenObjCSample 4 | // 5 | // Created by nikolay.andonov on 10/31/16. 6 | // Copyright © 2016 nikolay.andonov. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface MainTableViewController : UITableViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /NSQueryGenerationToken/NSQueryGenerationTokenObjCSample/NSQueryGenerationTokenObjCSample/NSQueryGenerationTokenModel.xcdatamodeld/NSQueryGenerationTokenModel.xcdatamodel/contents: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /NSQueryGenerationToken/NSQueryGenerationTokenObjCSample/NSQueryGenerationTokenObjCSample/QueryGenerationTokenModel.xcdatamodeld/QueryGenerationTokenModel.xcdatamodel/contents: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /NSQueryGenerationToken/NSQueryGenerationTokenObjCSample/NSQueryGenerationTokenObjCSample/SampleEntity+CoreDataClass.h: -------------------------------------------------------------------------------- 1 | // 2 | // SampleEntity+CoreDataClass.h 3 | // NSQueryGenerationTokenObjCSample 4 | // 5 | // Created by nikolay.andonov on 11/1/16. 6 | // Copyright © 2016 nikolay.andonov. All rights reserved. 7 | // This file was automatically generated and should not be edited. 8 | // 9 | 10 | #import 11 | #import 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | @interface SampleEntity : NSManagedObject 16 | 17 | @end 18 | 19 | NS_ASSUME_NONNULL_END 20 | 21 | #import "SampleEntity+CoreDataProperties.h" 22 | -------------------------------------------------------------------------------- /NSQueryGenerationToken/NSQueryGenerationTokenObjCSample/NSQueryGenerationTokenObjCSample/SampleEntity+CoreDataClass.m: -------------------------------------------------------------------------------- 1 | // 2 | // SampleEntity+CoreDataClass.m 3 | // NSQueryGenerationTokenObjCSample 4 | // 5 | // Created by nikolay.andonov on 11/1/16. 6 | // Copyright © 2016 nikolay.andonov. All rights reserved. 7 | // This file was automatically generated and should not be edited. 8 | // 9 | 10 | #import "SampleEntity+CoreDataClass.h" 11 | 12 | @implementation SampleEntity 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /NSQueryGenerationToken/NSQueryGenerationTokenObjCSample/NSQueryGenerationTokenObjCSample/SampleEntity+CoreDataProperties.h: -------------------------------------------------------------------------------- 1 | // 2 | // SampleEntity+CoreDataProperties.h 3 | // NSQueryGenerationTokenObjCSample 4 | // 5 | // Created by nikolay.andonov on 11/1/16. 6 | // Copyright © 2016 nikolay.andonov. All rights reserved. 7 | // This file was automatically generated and should not be edited. 8 | // 9 | 10 | #import "SampleEntity+CoreDataClass.h" 11 | 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | @interface SampleEntity (CoreDataProperties) 16 | 17 | + (NSFetchRequest *)fetchRequest; 18 | 19 | @property (nullable, nonatomic, copy) NSString *name; 20 | 21 | @end 22 | 23 | NS_ASSUME_NONNULL_END 24 | -------------------------------------------------------------------------------- /NSQueryGenerationToken/NSQueryGenerationTokenObjCSample/NSQueryGenerationTokenObjCSample/SampleEntity+CoreDataProperties.m: -------------------------------------------------------------------------------- 1 | // 2 | // SampleEntity+CoreDataProperties.m 3 | // NSQueryGenerationTokenObjCSample 4 | // 5 | // Created by nikolay.andonov on 11/1/16. 6 | // Copyright © 2016 nikolay.andonov. All rights reserved. 7 | // This file was automatically generated and should not be edited. 8 | // 9 | 10 | #import "SampleEntity+CoreDataProperties.h" 11 | 12 | @implementation SampleEntity (CoreDataProperties) 13 | 14 | + (NSFetchRequest *)fetchRequest { 15 | return [[NSFetchRequest alloc] initWithEntityName:@"SampleEntity"]; 16 | } 17 | 18 | @dynamic name; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /NSQueryGenerationToken/NSQueryGenerationTokenObjCSample/NSQueryGenerationTokenObjCSample/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // NSQueryGenerationTokenObjCSample 4 | // 5 | // Created by nikolay.andonov on 10/31/16. 6 | // Copyright © 2016 nikolay.andonov. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /NSQueryGenerationToken/NSQueryGenerationTokenSwiftSample/NSQueryGenerationTokenSwiftSample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /NSQueryGenerationToken/NSQueryGenerationTokenSwiftSample/NSQueryGenerationTokenSwiftSample.xcodeproj/project.xcworkspace/xcuserdata/Dobby.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naandonov-mm/iOS-10-Sampler/5b70e0234bc21cb3acd1250bc234572eacaa7078/NSQueryGenerationToken/NSQueryGenerationTokenSwiftSample/NSQueryGenerationTokenSwiftSample.xcodeproj/project.xcworkspace/xcuserdata/Dobby.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /NSQueryGenerationToken/NSQueryGenerationTokenSwiftSample/NSQueryGenerationTokenSwiftSample.xcodeproj/project.xcworkspace/xcuserdata/nikolay.andonov.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naandonov-mm/iOS-10-Sampler/5b70e0234bc21cb3acd1250bc234572eacaa7078/NSQueryGenerationToken/NSQueryGenerationTokenSwiftSample/NSQueryGenerationTokenSwiftSample.xcodeproj/project.xcworkspace/xcuserdata/nikolay.andonov.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /NSQueryGenerationToken/NSQueryGenerationTokenSwiftSample/NSQueryGenerationTokenSwiftSample.xcodeproj/xcuserdata/Dobby.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | NSQueryGenerationTokenSwiftSample.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 4E664B131DC0C6B400C2419C 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /NSQueryGenerationToken/NSQueryGenerationTokenSwiftSample/NSQueryGenerationTokenSwiftSample.xcodeproj/xcuserdata/nikolay.andonov.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 8 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /NSQueryGenerationToken/NSQueryGenerationTokenSwiftSample/NSQueryGenerationTokenSwiftSample.xcodeproj/xcuserdata/nikolay.andonov.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | NSQueryGenerationTokenSwiftSample.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 4E664B131DC0C6B400C2419C 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /NSQueryGenerationToken/NSQueryGenerationTokenSwiftSample/NSQueryGenerationTokenSwiftSample/CoreDataStack.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CoreDataStack.swift 3 | // NSPersistentContainerSwiftSample 4 | // 5 | // Created by nikolay.andonov on 10/9/16. 6 | // Copyright © 2016 nikolay.andonov. All rights reserved. 7 | // 8 | 9 | import CoreData 10 | 11 | private let sharedCoreDataStack = CoreDataStack() 12 | 13 | class CoreDataStack { 14 | 15 | class var sharedInstance: CoreDataStack { 16 | return sharedCoreDataStack 17 | } 18 | 19 | lazy var persistentContainer: NSPersistentContainer = { 20 | let container = NSPersistentContainer(name: "NSQueryGenerationTokenModel") 21 | container.loadPersistentStores(completionHandler: { (storeDescription, error) in 22 | if let error = error { 23 | fatalError("Unresolved error \(error))") 24 | } 25 | }) 26 | return container 27 | }() 28 | 29 | func saveContext() { 30 | let context = persistentContainer.viewContext 31 | if context.hasChanges { 32 | do { 33 | try context.save() 34 | } catch let error as NSError { 35 | fatalError("Unresolved error \(error)") 36 | } 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /NSQueryGenerationToken/NSQueryGenerationTokenSwiftSample/NSQueryGenerationTokenSwiftSample/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /NSQueryGenerationToken/NSQueryGenerationTokenSwiftSample/NSQueryGenerationTokenSwiftSample/NSPersistentContainerSwiftSampleModel.xcdatamodeld/NSPersistentContainerSwiftSampleModel.xcdatamodel/contents.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /NSQueryGenerationToken/NSQueryGenerationTokenSwiftSample/NSQueryGenerationTokenSwiftSample/NSQueryGenerationTokenModel.xcdatamodeld/NSQueryGenerationTokenModel.xcdatamodel/contents: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /NSQueryGenerationToken/NSQueryGenerationTokenSwiftSample/NSQueryGenerationTokenSwiftSample/SampleEntity+CoreDataClass.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SampleEntity+CoreDataClass.swift 3 | // NSQueryGenerationTokenSwiftSample 4 | // 5 | // Created by Nikolay Andonov on 10/26/16. 6 | // Copyright © 2016 Mentormate. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import CoreData 11 | 12 | 13 | public class SampleEntity: NSManagedObject { 14 | 15 | } 16 | -------------------------------------------------------------------------------- /NSQueryGenerationToken/NSQueryGenerationTokenSwiftSample/NSQueryGenerationTokenSwiftSample/SampleEntity+CoreDataProperties.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SampleEntity+CoreDataProperties.swift 3 | // NSQueryGenerationTokenSwiftSample 4 | // 5 | // Created by Nikolay Andonov on 10/26/16. 6 | // Copyright © 2016 Mentormate. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import CoreData 11 | 12 | 13 | extension SampleEntity { 14 | 15 | @nonobjc public class func fetchRequest() -> NSFetchRequest { 16 | return NSFetchRequest(entityName: "SampleEntity"); 17 | } 18 | 19 | @NSManaged public var name: String? 20 | 21 | } 22 | -------------------------------------------------------------------------------- /Resources/avcapture_photo_output.gif.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naandonov-mm/iOS-10-Sampler/5b70e0234bc21cb3acd1250bc234572eacaa7078/Resources/avcapture_photo_output.gif.gif -------------------------------------------------------------------------------- /Resources/callkit.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naandonov-mm/iOS-10-Sampler/5b70e0234bc21cb3acd1250bc234572eacaa7078/Resources/callkit.gif -------------------------------------------------------------------------------- /Resources/nspersistent_container.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naandonov-mm/iOS-10-Sampler/5b70e0234bc21cb3acd1250bc234572eacaa7078/Resources/nspersistent_container.gif -------------------------------------------------------------------------------- /Resources/nsquery_generation_token.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naandonov-mm/iOS-10-Sampler/5b70e0234bc21cb3acd1250bc234572eacaa7078/Resources/nsquery_generation_token.gif -------------------------------------------------------------------------------- /Resources/sirikit.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naandonov-mm/iOS-10-Sampler/5b70e0234bc21cb3acd1250bc234572eacaa7078/Resources/sirikit.gif -------------------------------------------------------------------------------- /Resources/speech_recognition.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naandonov-mm/iOS-10-Sampler/5b70e0234bc21cb3acd1250bc234572eacaa7078/Resources/speech_recognition.gif -------------------------------------------------------------------------------- /Resources/uicollection_view_data_source_prefetching.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naandonov-mm/iOS-10-Sampler/5b70e0234bc21cb3acd1250bc234572eacaa7078/Resources/uicollection_view_data_source_prefetching.gif -------------------------------------------------------------------------------- /Resources/uigraphics_renderer.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naandonov-mm/iOS-10-Sampler/5b70e0234bc21cb3acd1250bc234572eacaa7078/Resources/uigraphics_renderer.gif -------------------------------------------------------------------------------- /Resources/uipreview_interaction.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naandonov-mm/iOS-10-Sampler/5b70e0234bc21cb3acd1250bc234572eacaa7078/Resources/uipreview_interaction.gif -------------------------------------------------------------------------------- /Resources/uiview_property_animator.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naandonov-mm/iOS-10-Sampler/5b70e0234bc21cb3acd1250bc234572eacaa7078/Resources/uiview_property_animator.gif -------------------------------------------------------------------------------- /Resources/user_notifications.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naandonov-mm/iOS-10-Sampler/5b70e0234bc21cb3acd1250bc234572eacaa7078/Resources/user_notifications.gif -------------------------------------------------------------------------------- /SiriKit/SiriKitObjCSample/SiriKat/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // SiriKat 4 | // 5 | // Created by Dobrinka Tabakova on 12/5/16. 6 | // Copyright © 2016 Dobrinka Tabakova. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /SiriKit/SiriKitObjCSample/SiriKat/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | } 43 | ], 44 | "info" : { 45 | "version" : 1, 46 | "author" : "xcode" 47 | } 48 | } -------------------------------------------------------------------------------- /SiriKit/SiriKitObjCSample/SiriKat/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /SiriKit/SiriKitObjCSample/SiriKat/DetailViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // DetailViewController.h 3 | // SiriKat 4 | // 5 | // Created by Dobrinka Tabakova on 12/5/16. 6 | // Copyright © 2016 Dobrinka Tabakova. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface DetailViewController : UIViewController 12 | 13 | @property (nonatomic, strong) UIImage *image; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /SiriKit/SiriKitObjCSample/SiriKat/DetailViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // DetailViewController.m 3 | // SiriKat 4 | // 5 | // Created by Dobrinka Tabakova on 12/5/16. 6 | // Copyright © 2016 Dobrinka Tabakova. All rights reserved. 7 | // 8 | 9 | #import "DetailViewController.h" 10 | 11 | @interface DetailViewController () 12 | 13 | @property (weak, nonatomic) IBOutlet UIImageView *imageView; 14 | @end 15 | 16 | @implementation DetailViewController 17 | 18 | - (void)viewDidLoad { 19 | [super viewDidLoad]; 20 | // Do any additional setup after loading the view. 21 | 22 | self.imageView.image = self.image; 23 | } 24 | 25 | - (void)didReceiveMemoryWarning { 26 | [super didReceiveMemoryWarning]; 27 | // Dispose of any resources that can be recreated. 28 | } 29 | 30 | #pragma mark - Actions 31 | 32 | - (IBAction)closeButtonTapped:(id)sender { 33 | [self dismissViewControllerAnimated:YES completion:nil]; 34 | } 35 | 36 | @end 37 | 38 | -------------------------------------------------------------------------------- /SiriKit/SiriKitObjCSample/SiriKat/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | Siri Cat 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UIStatusBarHidden 34 | 35 | UISupportedInterfaceOrientations 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationLandscapeLeft 39 | UIInterfaceOrientationLandscapeRight 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /SiriKit/SiriKitObjCSample/SiriKat/PhotosProvider.h: -------------------------------------------------------------------------------- 1 | // 2 | // PhotosProvider.h 3 | // SiriKat 4 | // 5 | // Created by Dobrinka Tabakova on 12/5/16. 6 | // Copyright © 2016 Dobrinka Tabakova. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | 13 | @interface PhotosProvider : NSObject 14 | 15 | + (instancetype)sharedInstance; 16 | - (NSArray*)allPhotos; 17 | - (UIImage*)photoForSearchTerm:(NSString*)term; 18 | - (BOOL)containsPhotoForSearchTerm:(NSString*)term; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /SiriKit/SiriKitObjCSample/SiriKat/PhotosProvider.m: -------------------------------------------------------------------------------- 1 | // 2 | // PhotosProvider.m 3 | // SiriKat 4 | // 5 | // Created by Dobrinka Tabakova on 12/5/16. 6 | // Copyright © 2016 Dobrinka Tabakova. All rights reserved. 7 | // 8 | 9 | #import "PhotosProvider.h" 10 | 11 | 12 | @interface PhotosProvider () { 13 | NSDictionary *photos; 14 | } 15 | 16 | @end 17 | 18 | @implementation PhotosProvider 19 | 20 | + (instancetype)sharedInstance { 21 | static PhotosProvider *sharedInstance = nil; 22 | static dispatch_once_t onceToken; 23 | dispatch_once(&onceToken, ^{ 24 | sharedInstance = [[PhotosProvider alloc] init]; 25 | }); 26 | return sharedInstance; 27 | } 28 | 29 | - (id)init { 30 | self = [super init]; 31 | if (self) { 32 | NSArray *keys = @[@"cat", @"dog", @"duck", @"pig", @"seal"]; 33 | NSMutableDictionary *result = [[NSMutableDictionary alloc] init]; 34 | for (NSString *key in keys) { 35 | NSString *imageName = [NSString stringWithFormat:@"%@.jpg", key]; 36 | result[key] = [UIImage imageNamed:imageName]; 37 | } 38 | photos = [[NSDictionary alloc] initWithDictionary:result]; 39 | } 40 | return self; 41 | } 42 | 43 | - (NSArray*)allPhotos { 44 | return photos.allKeys; 45 | } 46 | 47 | - (UIImage*)photoForSearchTerm:(NSString*)term { 48 | return photos[term]; 49 | } 50 | 51 | - (BOOL)containsPhotoForSearchTerm:(NSString*)term { 52 | return (photos[term] != nil); 53 | } 54 | 55 | @end 56 | 57 | -------------------------------------------------------------------------------- /SiriKit/SiriKitObjCSample/SiriKat/SiriKat.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.developer.siri 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /SiriKit/SiriKitObjCSample/SiriKat/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // SiriKat 4 | // 5 | // Created by Dobrinka Tabakova on 12/5/16. 6 | // Copyright © 2016 Dobrinka Tabakova. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | - (void)showPhotoForSearchTerm:(NSString*)searchTerm; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /SiriKit/SiriKitObjCSample/SiriKat/cat.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naandonov-mm/iOS-10-Sampler/5b70e0234bc21cb3acd1250bc234572eacaa7078/SiriKit/SiriKitObjCSample/SiriKat/cat.jpg -------------------------------------------------------------------------------- /SiriKit/SiriKitObjCSample/SiriKat/dog.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naandonov-mm/iOS-10-Sampler/5b70e0234bc21cb3acd1250bc234572eacaa7078/SiriKit/SiriKitObjCSample/SiriKat/dog.jpg -------------------------------------------------------------------------------- /SiriKit/SiriKitObjCSample/SiriKat/duck.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naandonov-mm/iOS-10-Sampler/5b70e0234bc21cb3acd1250bc234572eacaa7078/SiriKit/SiriKitObjCSample/SiriKat/duck.jpg -------------------------------------------------------------------------------- /SiriKit/SiriKitObjCSample/SiriKat/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // SiriKat 4 | // 5 | // Created by Dobrinka Tabakova on 12/5/16. 6 | // Copyright © 2016 Dobrinka Tabakova. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /SiriKit/SiriKitObjCSample/SiriKat/pig.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naandonov-mm/iOS-10-Sampler/5b70e0234bc21cb3acd1250bc234572eacaa7078/SiriKit/SiriKitObjCSample/SiriKat/pig.jpg -------------------------------------------------------------------------------- /SiriKit/SiriKitObjCSample/SiriKat/seal.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naandonov-mm/iOS-10-Sampler/5b70e0234bc21cb3acd1250bc234572eacaa7078/SiriKit/SiriKitObjCSample/SiriKat/seal.jpg -------------------------------------------------------------------------------- /SiriKit/SiriKitObjCSample/SiriKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /SiriKit/SiriKitObjCSample/SiriKit.xcodeproj/project.xcworkspace/xcuserdata/Dobby.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naandonov-mm/iOS-10-Sampler/5b70e0234bc21cb3acd1250bc234572eacaa7078/SiriKit/SiriKitObjCSample/SiriKit.xcodeproj/project.xcworkspace/xcuserdata/Dobby.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /SiriKit/SiriKitObjCSample/SiriKit.xcodeproj/xcuserdata/Dobby.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | SiriKat.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | SiriKitExtension.xcscheme 13 | 14 | orderHint 15 | 1 16 | 17 | SiriKitExtensionUI.xcscheme 18 | 19 | orderHint 20 | 2 21 | 22 | 23 | SuppressBuildableAutocreation 24 | 25 | C7269FDD1DF4CB5F00CDCBD4 26 | 27 | primary 28 | 29 | 30 | C7269FFC1DF4CDB300CDCBD4 31 | 32 | primary 33 | 34 | 35 | C726A0061DF4CDB300CDCBD4 36 | 37 | primary 38 | 39 | 40 | C726A0231DF4CE5B00CDCBD4 41 | 42 | primary 43 | 44 | 45 | C726A02D1DF4CE5B00CDCBD4 46 | 47 | primary 48 | 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /SiriKit/SiriKitObjCSample/SiriKitExtension/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | SiriKitExtension 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | XPC! 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleVersion 22 | 1 23 | NSExtension 24 | 25 | NSExtensionAttributes 26 | 27 | IntentsRestrictedWhileLocked 28 | 29 | IntentsSupported 30 | 31 | INSearchForPhotosIntent 32 | 33 | 34 | NSExtensionPointIdentifier 35 | com.apple.intents-service 36 | NSExtensionPrincipalClass 37 | IntentHandler 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /SiriKit/SiriKitObjCSample/SiriKitExtension/IntentHandler.h: -------------------------------------------------------------------------------- 1 | // 2 | // IntentHandler.h 3 | // SiriKitExtension 4 | // 5 | // Created by Dobrinka Tabakova on 12/5/16. 6 | // Copyright © 2016 Dobrinka Tabakova. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface IntentHandler : INExtension 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /SiriKit/SiriKitObjCSample/SiriKitExtension/IntentHandler.m: -------------------------------------------------------------------------------- 1 | // 2 | // IntentHandler.m 3 | // SiriKitExtension 4 | // 5 | // Created by Dobrinka Tabakova on 12/5/16. 6 | // Copyright © 2016 Dobrinka Tabakova. All rights reserved. 7 | // 8 | 9 | #import "IntentHandler.h" 10 | #import "PhotosProvider.h" 11 | 12 | 13 | @interface IntentHandler () 14 | 15 | @end 16 | 17 | @implementation IntentHandler 18 | 19 | - (id)handlerForIntent:(INIntent *)intent { 20 | // This is the default implementation. If you want different objects to handle different intents, 21 | // you can override this and return the handler you want for that particular intent. 22 | 23 | return self; 24 | } 25 | 26 | - (void)handleSearchForPhotos:(INSearchForPhotosIntent *)intent completion:(void (^)(INSearchForPhotosIntentResponse * _Nonnull))completion { 27 | NSLog(@"%@", intent.searchTerms); 28 | NSLog(@"%@", intent.albumName); 29 | 30 | BOOL hasResult = NO; 31 | if (intent.searchTerms.count) { 32 | NSString *searchTerm = intent.searchTerms.firstObject; 33 | if (searchTerm) { 34 | hasResult = [[PhotosProvider sharedInstance] containsPhotoForSearchTerm:searchTerm]; 35 | } 36 | } 37 | 38 | INSearchForPhotosIntentResponse *response; 39 | if (hasResult) { 40 | NSUserActivity *userActivity = [[NSUserActivity alloc] initWithActivityType:@"INSearchForPhotosIntent"]; 41 | userActivity.userInfo = @{@"searchTerm":intent.searchTerms.firstObject}; 42 | response = [[INSearchForPhotosIntentResponse alloc] initWithCode:INSearchForPhotosIntentResponseCodeContinueInApp userActivity:userActivity]; 43 | } else { 44 | response = [[INSearchForPhotosIntentResponse alloc] initWithCode:INSearchForPhotosIntentResponseCodeFailure userActivity:nil]; 45 | 46 | } 47 | completion(response); 48 | } 49 | 50 | @end 51 | 52 | 53 | -------------------------------------------------------------------------------- /SiriKit/SiriKitSwiftSample/SiriKitExtension/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | SiriKitExtension 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | XPC! 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleVersion 22 | 1 23 | NSExtension 24 | 25 | NSExtensionAttributes 26 | 27 | IntentsRestrictedWhileLocked 28 | 29 | IntentsSupported 30 | 31 | INSendMessageIntent 32 | INSearchForMessagesIntent 33 | INSetMessageAttributeIntent 34 | 35 | 36 | NSExtensionPointIdentifier 37 | com.apple.intents-service 38 | NSExtensionPrincipalClass 39 | $(PRODUCT_MODULE_NAME).IntentHandler 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /SiriKit/SiriKitSwiftSample/SiriKitSwiftSample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /SiriKit/SiriKitSwiftSample/SiriKitSwiftSample.xcodeproj/project.xcworkspace/xcuserdata/nikolay.andonov.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naandonov-mm/iOS-10-Sampler/5b70e0234bc21cb3acd1250bc234572eacaa7078/SiriKit/SiriKitSwiftSample/SiriKitSwiftSample.xcodeproj/project.xcworkspace/xcuserdata/nikolay.andonov.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /SiriKit/SiriKitSwiftSample/SiriKitSwiftSample.xcodeproj/xcuserdata/nikolay.andonov.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /SiriKit/SiriKitSwiftSample/SiriKitSwiftSample.xcodeproj/xcuserdata/nikolay.andonov.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | SiriKitExtension.xcscheme 8 | 9 | orderHint 10 | 1 11 | 12 | SiriKitSwiftSample.xcscheme 13 | 14 | orderHint 15 | 0 16 | 17 | 18 | SuppressBuildableAutocreation 19 | 20 | 4EB8E6701DF99AE400756524 21 | 22 | primary 23 | 24 | 25 | 4EED56681DF87A27008884D4 26 | 27 | primary 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /SiriKit/SiriKitSwiftSample/SiriKitSwiftSample/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /SiriKit/SiriKitSwiftSample/SiriKitSwiftSample/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /SiriKit/SiriKitSwiftSample/SiriKitSwiftSample/DetailViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DetailViewController.swift 3 | // SiriKitSwiftSample 4 | // 5 | // Created by Nikolay Andonov on 12/8/16. 6 | // Copyright © 2016 Mentormate. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class DetailViewController: UIViewController { 12 | @IBOutlet private weak var imageView: UIImageView! 13 | var image: UIImage? 14 | 15 | 16 | override func viewDidLoad() { 17 | super.viewDidLoad() 18 | 19 | imageView.image = image 20 | } 21 | 22 | //MARK: - Actions 23 | 24 | @IBAction func closeButtonTapped(_ sender: Any) { 25 | dismiss(animated: true, completion: nil) 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /SiriKit/SiriKitSwiftSample/SiriKitSwiftSample/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | Siri Cat 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /SiriKit/SiriKitSwiftSample/SiriKitSwiftSample/PhotosProvider.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PhotosProvider.swift 3 | // SiriKitSwiftSample 4 | // 5 | // Created by Nikolay Andonov on 12/7/16. 6 | // Copyright © 2016 Mentormate. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | private let sharedProvider = PhotosProvider() 12 | 13 | class PhotosProvider: NSObject { 14 | 15 | var photos : Dictionary 16 | 17 | class var sharedInstance: PhotosProvider { 18 | return sharedProvider; 19 | } 20 | 21 | override init() { 22 | 23 | let keys = ["cat","dog","pig","seal"] 24 | var result : Dictionary = [:] 25 | for key in keys { 26 | let imageName = "\(key).jpg" 27 | result[key] = UIImage.init(named: imageName) 28 | } 29 | photos = result 30 | 31 | super.init() 32 | } 33 | 34 | func allPhotos() -> Array { 35 | return photos.keys.sorted() 36 | } 37 | 38 | func photoForSearchTerm(term: String) -> UIImage? { 39 | return photos[term] 40 | } 41 | 42 | func containsPhotoForSearchTerm(term: String) -> Bool { 43 | return photos[term] != nil 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /SiriKit/SiriKitSwiftSample/SiriKitSwiftSample/SiriKitSwiftSample.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.developer.siri 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /SiriKit/SiriKitSwiftSample/SiriKitSwiftSample/cat.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naandonov-mm/iOS-10-Sampler/5b70e0234bc21cb3acd1250bc234572eacaa7078/SiriKit/SiriKitSwiftSample/SiriKitSwiftSample/cat.jpg -------------------------------------------------------------------------------- /SiriKit/SiriKitSwiftSample/SiriKitSwiftSample/dog.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naandonov-mm/iOS-10-Sampler/5b70e0234bc21cb3acd1250bc234572eacaa7078/SiriKit/SiriKitSwiftSample/SiriKitSwiftSample/dog.jpg -------------------------------------------------------------------------------- /SiriKit/SiriKitSwiftSample/SiriKitSwiftSample/duck.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naandonov-mm/iOS-10-Sampler/5b70e0234bc21cb3acd1250bc234572eacaa7078/SiriKit/SiriKitSwiftSample/SiriKitSwiftSample/duck.jpg -------------------------------------------------------------------------------- /SiriKit/SiriKitSwiftSample/SiriKitSwiftSample/pig.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naandonov-mm/iOS-10-Sampler/5b70e0234bc21cb3acd1250bc234572eacaa7078/SiriKit/SiriKitSwiftSample/SiriKitSwiftSample/pig.jpg -------------------------------------------------------------------------------- /SiriKit/SiriKitSwiftSample/SiriKitSwiftSample/seal.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naandonov-mm/iOS-10-Sampler/5b70e0234bc21cb3acd1250bc234572eacaa7078/SiriKit/SiriKitSwiftSample/SiriKitSwiftSample/seal.jpg -------------------------------------------------------------------------------- /SpeechRecognition/SpeechRecognitionObjCSample/SpeechRecognitionObjCSample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /SpeechRecognition/SpeechRecognitionObjCSample/SpeechRecognitionObjCSample.xcodeproj/project.xcworkspace/xcuserdata/nikolay.andonov.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naandonov-mm/iOS-10-Sampler/5b70e0234bc21cb3acd1250bc234572eacaa7078/SpeechRecognition/SpeechRecognitionObjCSample/SpeechRecognitionObjCSample.xcodeproj/project.xcworkspace/xcuserdata/nikolay.andonov.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /SpeechRecognition/SpeechRecognitionObjCSample/SpeechRecognitionObjCSample.xcodeproj/xcuserdata/nikolay.andonov.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /SpeechRecognition/SpeechRecognitionObjCSample/SpeechRecognitionObjCSample.xcodeproj/xcuserdata/nikolay.andonov.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | SpeechRecognitionObjCSample.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 4E1AB76E1DC6AFBC00E84E1F 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /SpeechRecognition/SpeechRecognitionObjCSample/SpeechRecognitionObjCSample/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // SpeechRecognitionObjCSample 4 | // 5 | // Created by nikolay.andonov on 10/31/16. 6 | // Copyright © 2016 nikolay.andonov. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /SpeechRecognition/SpeechRecognitionObjCSample/SpeechRecognitionObjCSample/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /SpeechRecognition/SpeechRecognitionObjCSample/SpeechRecognitionObjCSample/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /SpeechRecognition/SpeechRecognitionObjCSample/SpeechRecognitionObjCSample/MainViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // MainViewController.h 3 | // SpeechRecognitionObjCSample 4 | // 5 | // Created by nikolay.andonov on 10/31/16. 6 | // Copyright © 2016 nikolay.andonov. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface MainViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /SpeechRecognition/SpeechRecognitionObjCSample/SpeechRecognitionObjCSample/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // SpeechRecognitionObjCSample 4 | // 5 | // Created by nikolay.andonov on 10/31/16. 6 | // Copyright © 2016 nikolay.andonov. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /SpeechRecognition/SpeechRecognitionSwiftSample/SpeechRecognitionSwiftSample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /SpeechRecognition/SpeechRecognitionSwiftSample/SpeechRecognitionSwiftSample.xcodeproj/project.xcworkspace/xcuserdata/nikolay.andonov.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naandonov-mm/iOS-10-Sampler/5b70e0234bc21cb3acd1250bc234572eacaa7078/SpeechRecognition/SpeechRecognitionSwiftSample/SpeechRecognitionSwiftSample.xcodeproj/project.xcworkspace/xcuserdata/nikolay.andonov.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /SpeechRecognition/SpeechRecognitionSwiftSample/SpeechRecognitionSwiftSample.xcodeproj/xcuserdata/nikolay.andonov.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /SpeechRecognition/SpeechRecognitionSwiftSample/SpeechRecognitionSwiftSample.xcodeproj/xcuserdata/nikolay.andonov.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | SpeechRecognitionSwiftSample.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 4E1AB74D1DC6ABEF00E84E1F 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /SpeechRecognition/SpeechRecognitionSwiftSample/SpeechRecognitionSwiftSample/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /SpeechRecognition/SpeechRecognitionSwiftSample/SpeechRecognitionSwiftSample/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /UICollectionViewDataSourcePrefetching/UICollectionViewDataSourcePrefetchingObjCSample/UICollectionViewDataSourcePrefetchingObjCSample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /UICollectionViewDataSourcePrefetching/UICollectionViewDataSourcePrefetchingObjCSample/UICollectionViewDataSourcePrefetchingObjCSample.xcodeproj/project.xcworkspace/xcuserdata/Dobby.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naandonov-mm/iOS-10-Sampler/5b70e0234bc21cb3acd1250bc234572eacaa7078/UICollectionViewDataSourcePrefetching/UICollectionViewDataSourcePrefetchingObjCSample/UICollectionViewDataSourcePrefetchingObjCSample.xcodeproj/project.xcworkspace/xcuserdata/Dobby.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /UICollectionViewDataSourcePrefetching/UICollectionViewDataSourcePrefetchingObjCSample/UICollectionViewDataSourcePrefetchingObjCSample.xcodeproj/project.xcworkspace/xcuserdata/nikolay.andonov.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naandonov-mm/iOS-10-Sampler/5b70e0234bc21cb3acd1250bc234572eacaa7078/UICollectionViewDataSourcePrefetching/UICollectionViewDataSourcePrefetchingObjCSample/UICollectionViewDataSourcePrefetchingObjCSample.xcodeproj/project.xcworkspace/xcuserdata/nikolay.andonov.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /UICollectionViewDataSourcePrefetching/UICollectionViewDataSourcePrefetchingObjCSample/UICollectionViewDataSourcePrefetchingObjCSample.xcodeproj/xcuserdata/Dobby.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | UICollectionViewDataSourcePrefetchingObjCSample.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 4EA9EE8D1DB7C90B000D2138 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /UICollectionViewDataSourcePrefetching/UICollectionViewDataSourcePrefetchingObjCSample/UICollectionViewDataSourcePrefetchingObjCSample.xcodeproj/xcuserdata/nikolay.andonov.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 8 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /UICollectionViewDataSourcePrefetching/UICollectionViewDataSourcePrefetchingObjCSample/UICollectionViewDataSourcePrefetchingObjCSample.xcodeproj/xcuserdata/nikolay.andonov.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | UICollectionViewDataSourcePrefetchingObjCSample.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 4EA9EE8D1DB7C90B000D2138 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /UICollectionViewDataSourcePrefetching/UICollectionViewDataSourcePrefetchingObjCSample/UICollectionViewDataSourcePrefetchingObjCSample/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // UICollectionViewDataSourcePrefetchingObjCSample 4 | // 5 | // Created by Nikolay Andonov on 10/19/16. 6 | // Copyright © 2016 Mentormate. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /UICollectionViewDataSourcePrefetching/UICollectionViewDataSourcePrefetchingObjCSample/UICollectionViewDataSourcePrefetchingObjCSample/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /UICollectionViewDataSourcePrefetching/UICollectionViewDataSourcePrefetchingObjCSample/UICollectionViewDataSourcePrefetchingObjCSample/MainCollectionViewCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // MainCollectionViewCell.h 3 | // UICollectionViewDataSourcePrefetchingObjCSample 4 | // 5 | // Created by Nikolay Andonov on 10/19/16. 6 | // Copyright © 2016 Mentormate. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface MainCollectionViewCell : UICollectionViewCell 12 | 13 | @property (weak, nonatomic) IBOutlet UIImageView *imageView; 14 | @property (weak, nonatomic) IBOutlet UIActivityIndicatorView *activityIndicator; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /UICollectionViewDataSourcePrefetching/UICollectionViewDataSourcePrefetchingObjCSample/UICollectionViewDataSourcePrefetchingObjCSample/MainCollectionViewCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // MainCollectionViewCell.m 3 | // UICollectionViewDataSourcePrefetchingObjCSample 4 | // 5 | // Created by Nikolay Andonov on 10/19/16. 6 | // Copyright © 2016 Mentormate. All rights reserved. 7 | // 8 | 9 | #import "MainCollectionViewCell.h" 10 | 11 | @implementation MainCollectionViewCell 12 | 13 | - (void)prepareForReuse { 14 | [self.activityIndicator startAnimating]; 15 | self.imageView.image = nil; 16 | } 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /UICollectionViewDataSourcePrefetching/UICollectionViewDataSourcePrefetchingObjCSample/UICollectionViewDataSourcePrefetchingObjCSample/MainCollectionViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // MainCollectionViewController.h 3 | // UICollectionViewDataSourcePrefetchingObjCSample 4 | // 5 | // Created by Nikolay Andonov on 10/19/16. 6 | // Copyright © 2016 Mentormate. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface MainCollectionViewController : UICollectionViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /UICollectionViewDataSourcePrefetching/UICollectionViewDataSourcePrefetchingObjCSample/UICollectionViewDataSourcePrefetchingObjCSample/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // UICollectionViewDataSourcePrefetchingObjCSample 4 | // 5 | // Created by Nikolay Andonov on 10/19/16. 6 | // Copyright © 2016 Mentormate. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /UICollectionViewDataSourcePrefetching/UICollectionViewDataSourcePrefetchingSwiftSample/UICollectionViewDataSourcePrefetchingSwiftSample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /UICollectionViewDataSourcePrefetching/UICollectionViewDataSourcePrefetchingSwiftSample/UICollectionViewDataSourcePrefetchingSwiftSample.xcodeproj/project.xcworkspace/xcuserdata/nikolay.andonov.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naandonov-mm/iOS-10-Sampler/5b70e0234bc21cb3acd1250bc234572eacaa7078/UICollectionViewDataSourcePrefetching/UICollectionViewDataSourcePrefetchingSwiftSample/UICollectionViewDataSourcePrefetchingSwiftSample.xcodeproj/project.xcworkspace/xcuserdata/nikolay.andonov.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /UICollectionViewDataSourcePrefetching/UICollectionViewDataSourcePrefetchingSwiftSample/UICollectionViewDataSourcePrefetchingSwiftSample.xcodeproj/xcuserdata/nikolay.andonov.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /UICollectionViewDataSourcePrefetching/UICollectionViewDataSourcePrefetchingSwiftSample/UICollectionViewDataSourcePrefetchingSwiftSample.xcodeproj/xcuserdata/nikolay.andonov.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | UICollectionViewDataSourcePrefetchingSwiftSample.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 4E31CA751DBE25FA001A8DBA 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /UICollectionViewDataSourcePrefetching/UICollectionViewDataSourcePrefetchingSwiftSample/UICollectionViewDataSourcePrefetchingSwiftSample/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /UICollectionViewDataSourcePrefetching/UICollectionViewDataSourcePrefetchingSwiftSample/UICollectionViewDataSourcePrefetchingSwiftSample/MainCollectionViewCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MainCollectionViewCell.swift 3 | // UICollectionViewDataSourcePrefetchingSwiftSample 4 | // 5 | // Created by Nikolay Andonov on 10/24/16. 6 | // Copyright © 2016 Mentormate. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class MainCollectionViewCell: UICollectionViewCell { 12 | 13 | @IBOutlet weak var imageView: UIImageView! 14 | @IBOutlet weak var activityIndicator: UIActivityIndicatorView! 15 | 16 | override func prepareForReuse() { 17 | imageView.image = nil 18 | activityIndicator.startAnimating() 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /UIGraphicsRenderer/UIGraphicsRendererObjectiveC/GraphicsRenderer.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /UIGraphicsRenderer/UIGraphicsRendererObjectiveC/GraphicsRenderer.xcodeproj/project.xcworkspace/xcuserdata/dobrinka.tabakova.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naandonov-mm/iOS-10-Sampler/5b70e0234bc21cb3acd1250bc234572eacaa7078/UIGraphicsRenderer/UIGraphicsRendererObjectiveC/GraphicsRenderer.xcodeproj/project.xcworkspace/xcuserdata/dobrinka.tabakova.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /UIGraphicsRenderer/UIGraphicsRendererObjectiveC/GraphicsRenderer.xcodeproj/project.xcworkspace/xcuserdata/nikolay.andonov.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naandonov-mm/iOS-10-Sampler/5b70e0234bc21cb3acd1250bc234572eacaa7078/UIGraphicsRenderer/UIGraphicsRendererObjectiveC/GraphicsRenderer.xcodeproj/project.xcworkspace/xcuserdata/nikolay.andonov.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /UIGraphicsRenderer/UIGraphicsRendererObjectiveC/GraphicsRenderer.xcodeproj/xcuserdata/dobrinka.tabakova.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /UIGraphicsRenderer/UIGraphicsRendererObjectiveC/GraphicsRenderer.xcodeproj/xcuserdata/dobrinka.tabakova.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | GraphicsRenderer.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 94D041EB1DF9CB440026E2A7 16 | 17 | primary 18 | 19 | 20 | 94D042041DF9CB440026E2A7 21 | 22 | primary 23 | 24 | 25 | 94D0420F1DF9CB440026E2A7 26 | 27 | primary 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /UIGraphicsRenderer/UIGraphicsRendererObjectiveC/GraphicsRenderer.xcodeproj/xcuserdata/nikolay.andonov.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | GraphicsRenderer.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 94D041EB1DF9CB440026E2A7 16 | 17 | primary 18 | 19 | 20 | 94D042041DF9CB440026E2A7 21 | 22 | primary 23 | 24 | 25 | 94D0420F1DF9CB440026E2A7 26 | 27 | primary 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /UIGraphicsRenderer/UIGraphicsRendererObjectiveC/GraphicsRenderer/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // GraphicsRenderer 4 | // 5 | // Created by Dobrinka Tabakova on 12/8/16. 6 | // Copyright © 2016 Dobrinka Tabakova. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /UIGraphicsRenderer/UIGraphicsRendererObjectiveC/GraphicsRenderer/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /UIGraphicsRenderer/UIGraphicsRendererObjectiveC/GraphicsRenderer/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /UIGraphicsRenderer/UIGraphicsRendererObjectiveC/GraphicsRenderer/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /UIGraphicsRenderer/UIGraphicsRendererObjectiveC/GraphicsRenderer/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // GraphicsRenderer 4 | // 5 | // Created by Dobrinka Tabakova on 12/8/16. 6 | // Copyright © 2016 Dobrinka Tabakova. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /UIGraphicsRenderer/UIGraphicsRendererObjectiveC/GraphicsRenderer/black-cat.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naandonov-mm/iOS-10-Sampler/5b70e0234bc21cb3acd1250bc234572eacaa7078/UIGraphicsRenderer/UIGraphicsRendererObjectiveC/GraphicsRenderer/black-cat.jpg -------------------------------------------------------------------------------- /UIGraphicsRenderer/UIGraphicsRendererObjectiveC/GraphicsRenderer/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // GraphicsRenderer 4 | // 5 | // Created by Dobrinka Tabakova on 12/8/16. 6 | // Copyright © 2016 Dobrinka Tabakova. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /UIGraphicsRenderer/UIGraphicsRendererObjectiveC/GraphicsRendererTests/GraphicsRendererTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // GraphicsRendererTests.m 3 | // GraphicsRendererTests 4 | // 5 | // Created by Dobrinka Tabakova on 12/8/16. 6 | // Copyright © 2016 Dobrinka Tabakova. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface GraphicsRendererTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation GraphicsRendererTests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | // Put setup code here. This method is called before the invocation of each test method in the class. 20 | } 21 | 22 | - (void)tearDown { 23 | // Put teardown code here. This method is called after the invocation of each test method in the class. 24 | [super tearDown]; 25 | } 26 | 27 | - (void)testExample { 28 | // This is an example of a functional test case. 29 | // Use XCTAssert and related functions to verify your tests produce the correct results. 30 | } 31 | 32 | - (void)testPerformanceExample { 33 | // This is an example of a performance test case. 34 | [self measureBlock:^{ 35 | // Put the code you want to measure the time of here. 36 | }]; 37 | } 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /UIGraphicsRenderer/UIGraphicsRendererObjectiveC/GraphicsRendererTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /UIGraphicsRenderer/UIGraphicsRendererObjectiveC/GraphicsRendererUITests/GraphicsRendererUITests.m: -------------------------------------------------------------------------------- 1 | // 2 | // GraphicsRendererUITests.m 3 | // GraphicsRendererUITests 4 | // 5 | // Created by Dobrinka Tabakova on 12/8/16. 6 | // Copyright © 2016 Dobrinka Tabakova. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface GraphicsRendererUITests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation GraphicsRendererUITests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | 22 | // In UI tests it is usually best to stop immediately when a failure occurs. 23 | self.continueAfterFailure = NO; 24 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 25 | [[[XCUIApplication alloc] init] launch]; 26 | 27 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 28 | } 29 | 30 | - (void)tearDown { 31 | // Put teardown code here. This method is called after the invocation of each test method in the class. 32 | [super tearDown]; 33 | } 34 | 35 | - (void)testExample { 36 | // Use recording to get started writing UI tests. 37 | // Use XCTAssert and related functions to verify your tests produce the correct results. 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /UIGraphicsRenderer/UIGraphicsRendererObjectiveC/GraphicsRendererUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /UIGraphicsRenderer/UIGraphicsRendererSwift/GraphicsRendererSwift.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /UIGraphicsRenderer/UIGraphicsRendererSwift/GraphicsRendererSwift.xcodeproj/project.xcworkspace/xcuserdata/dobrinka.tabakova.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naandonov-mm/iOS-10-Sampler/5b70e0234bc21cb3acd1250bc234572eacaa7078/UIGraphicsRenderer/UIGraphicsRendererSwift/GraphicsRendererSwift.xcodeproj/project.xcworkspace/xcuserdata/dobrinka.tabakova.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /UIGraphicsRenderer/UIGraphicsRendererSwift/GraphicsRendererSwift.xcodeproj/xcuserdata/dobrinka.tabakova.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | GraphicsRendererSwift.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 94445D841DFB0073003A68F1 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /UIGraphicsRenderer/UIGraphicsRendererSwift/GraphicsRendererSwift/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /UIGraphicsRenderer/UIGraphicsRendererSwift/GraphicsRendererSwift/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /UIGraphicsRenderer/UIGraphicsRendererSwift/GraphicsRendererSwift/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /UIGraphicsRenderer/UIGraphicsRendererSwift/GraphicsRendererSwift/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // GraphicsRendererSwift 4 | // 5 | // Created by Dobrinka Tabakova on 12/9/16. 6 | // Copyright © 2016 Dobrinka Tabakova. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ViewController: UIViewController { 12 | 13 | @IBOutlet weak var webView: UIWebView! 14 | @IBOutlet weak var activityIndicator: UIActivityIndicatorView! 15 | 16 | 17 | override func viewDidLoad() { 18 | super.viewDidLoad() 19 | // Do any additional setup after loading the view, typically from a nib. 20 | 21 | DispatchQueue.global(qos: .default).async { 22 | let pdfData = UIGraphicsPDFRenderer(bounds: self.view.bounds).pdfData(actions: { (rendererContext) in 23 | let pageCount = 500 24 | let image = UIImage(named: "black-cat.jpg") 25 | let pdfPageBounds = CGRect(x: 0, y: 0, width: (image?.size.width)!, height: (image?.size.height)!) 26 | for _ in 0.. 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /UIPreviewInteraction/UIPreviewInteractionObjCSample/UIPreviewInteractionObjCSample.xcodeproj/project.xcworkspace/xcuserdata/nikolay.andonov.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naandonov-mm/iOS-10-Sampler/5b70e0234bc21cb3acd1250bc234572eacaa7078/UIPreviewInteraction/UIPreviewInteractionObjCSample/UIPreviewInteractionObjCSample.xcodeproj/project.xcworkspace/xcuserdata/nikolay.andonov.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /UIPreviewInteraction/UIPreviewInteractionObjCSample/UIPreviewInteractionObjCSample.xcodeproj/xcuserdata/nikolay.andonov.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | UIPreviewInteractionObjCSample.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 4E886D3B1DB46622008B865A 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /UIPreviewInteraction/UIPreviewInteractionObjCSample/UIPreviewInteractionObjCSample/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // UIPreviewInteractionObjCSample 4 | // 5 | // Created by nikolay.andonov on 10/17/16. 6 | // Copyright © 2016 nikolay.andonov. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /UIPreviewInteraction/UIPreviewInteractionObjCSample/UIPreviewInteractionObjCSample/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /UIPreviewInteraction/UIPreviewInteractionObjCSample/UIPreviewInteractionObjCSample/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /UIPreviewInteraction/UIPreviewInteractionObjCSample/UIPreviewInteractionObjCSample/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /UIPreviewInteraction/UIPreviewInteractionObjCSample/UIPreviewInteractionObjCSample/PreviewInteractionMainViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // PreviewInteractionMainViewController.h 3 | // UIPreviewInteractionObjCSample 4 | // 5 | // Created by nikolay.andonov on 10/17/16. 6 | // Copyright © 2016 nikolay.andonov. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface PreviewInteractionMainViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /UIPreviewInteraction/UIPreviewInteractionObjCSample/UIPreviewInteractionObjCSample/PreviewInteractionPopViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // PreviewInteractionPopViewController.h 3 | // UIPreviewInteractionObjCSample 4 | // 5 | // Created by nikolay.andonov on 10/17/16. 6 | // Copyright © 2016 nikolay.andonov. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface PreviewInteractionPopViewController : UIViewController 12 | 13 | @property (weak, nonatomic) IBOutlet UILabel *progressLabel; 14 | @property (weak, nonatomic) IBOutlet UILabel *statusLabel; 15 | @property (strong, nonatomic) UIViewPropertyAnimator *animator; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /UIPreviewInteraction/UIPreviewInteractionObjCSample/UIPreviewInteractionObjCSample/PreviewInteractionPopViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // PreviewInteractionPopViewController.m 3 | // UIPreviewInteractionObjCSample 4 | // 5 | // Created by nikolay.andonov on 10/17/16. 6 | // Copyright © 2016 nikolay.andonov. All rights reserved. 7 | // 8 | 9 | #import "PreviewInteractionPopViewController.h" 10 | 11 | @interface PreviewInteractionPopViewController () 12 | @property (weak, nonatomic) IBOutlet UIImageView *sampleImageView; 13 | @property (weak, nonatomic) IBOutlet UIVisualEffectView *effectView; 14 | 15 | @end 16 | 17 | @implementation PreviewInteractionPopViewController 18 | 19 | - (void)viewDidLoad { 20 | [super viewDidLoad]; 21 | 22 | self.progressLabel.text = @""; 23 | self.statusLabel.text = @""; 24 | 25 | __weak typeof(self) weakSelf = self; 26 | self.animator = [[UIViewPropertyAnimator alloc] initWithDuration:0 curve:UIViewAnimationCurveLinear animations:^{ 27 | weakSelf.effectView.effect = nil; 28 | }]; 29 | 30 | UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapGestureRecognizerAction:)]; 31 | [self.sampleImageView addGestureRecognizer:tapGesture]; 32 | } 33 | 34 | - (void)viewWillAppear:(BOOL)animated { 35 | [super viewWillAppear:animated]; 36 | 37 | self.animator.fractionComplete = 0; 38 | } 39 | 40 | - (void)tapGestureRecognizerAction:(UITapGestureRecognizer *)recognizer { 41 | 42 | [self dismissViewControllerAnimated:YES completion:nil]; 43 | } 44 | 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /UIPreviewInteraction/UIPreviewInteractionObjCSample/UIPreviewInteractionObjCSample/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // UIPreviewInteractionObjCSample 4 | // 5 | // Created by nikolay.andonov on 10/17/16. 6 | // Copyright © 2016 nikolay.andonov. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /UIPreviewInteraction/UIPreviewInteractionObjCSample/UIPreviewInteractionObjCSample/sample.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naandonov-mm/iOS-10-Sampler/5b70e0234bc21cb3acd1250bc234572eacaa7078/UIPreviewInteraction/UIPreviewInteractionObjCSample/UIPreviewInteractionObjCSample/sample.jpg -------------------------------------------------------------------------------- /UIPreviewInteraction/UIPreviewInteractionSwiftSample/UIPreviewInteractionSwiftSample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /UIPreviewInteraction/UIPreviewInteractionSwiftSample/UIPreviewInteractionSwiftSample.xcodeproj/project.xcworkspace/xcuserdata/nikolay.andonov.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naandonov-mm/iOS-10-Sampler/5b70e0234bc21cb3acd1250bc234572eacaa7078/UIPreviewInteraction/UIPreviewInteractionSwiftSample/UIPreviewInteractionSwiftSample.xcodeproj/project.xcworkspace/xcuserdata/nikolay.andonov.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /UIPreviewInteraction/UIPreviewInteractionSwiftSample/UIPreviewInteractionSwiftSample.xcodeproj/xcuserdata/nikolay.andonov.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /UIPreviewInteraction/UIPreviewInteractionSwiftSample/UIPreviewInteractionSwiftSample.xcodeproj/xcuserdata/nikolay.andonov.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | UIPreviewInteractionSwiftSample.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 4E147BBD1DB451D6008BE235 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /UIPreviewInteraction/UIPreviewInteractionSwiftSample/UIPreviewInteractionSwiftSample/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | 35 | UISupportedInterfaceOrientations~ipad 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationPortraitUpsideDown 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /UIPreviewInteraction/UIPreviewInteractionSwiftSample/UIPreviewInteractionSwiftSample/PreviewInteractionPopViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PreviewInteractionPopViewController.swift 3 | // UIPreviewInteractionSwiftSample 4 | // 5 | // Created by nikolay.andonov on 10/17/16. 6 | // Copyright © 2016 nikolay.andonov. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class PreviewInteractionPopViewController: UIViewController { 12 | 13 | @IBOutlet weak var statusLabel: UILabel! 14 | @IBOutlet weak var progressLabel: UILabel! 15 | @IBOutlet weak var effectView: UIVisualEffectView! 16 | @IBOutlet weak var sampleImageView: UIImageView! 17 | 18 | internal var animator: UIViewPropertyAnimator! 19 | 20 | override func viewDidLoad() { 21 | super.viewDidLoad() 22 | 23 | progressLabel.text = "" 24 | statusLabel.text = "" 25 | 26 | weak var weakSelf = self 27 | animator = UIViewPropertyAnimator(duration: 0, curve: .linear) { 28 | weakSelf?.effectView.effect = nil 29 | } 30 | 31 | let tapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(self.tapGestureRecognizerAction(recognizer:))) 32 | sampleImageView.addGestureRecognizer(tapGestureRecognizer) 33 | 34 | } 35 | 36 | override func viewWillAppear(_ animated: Bool) { 37 | super.viewWillAppear(animated) 38 | 39 | animator.fractionComplete = 0 40 | } 41 | 42 | func tapGestureRecognizerAction(recognizer: UITapGestureRecognizer) { 43 | 44 | self.dismiss(animated: true, completion: nil) 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /UIPreviewInteraction/UIPreviewInteractionSwiftSample/UIPreviewInteractionSwiftSample/sample.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naandonov-mm/iOS-10-Sampler/5b70e0234bc21cb3acd1250bc234572eacaa7078/UIPreviewInteraction/UIPreviewInteractionSwiftSample/UIPreviewInteractionSwiftSample/sample.jpg -------------------------------------------------------------------------------- /UIViewPropertyAnimator/UIViewPropertyAnimatorObjCSample/UIViewPropertyAnimatorObjCSample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /UIViewPropertyAnimator/UIViewPropertyAnimatorObjCSample/UIViewPropertyAnimatorObjCSample.xcodeproj/project.xcworkspace/xcuserdata/nikolay.andonov.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naandonov-mm/iOS-10-Sampler/5b70e0234bc21cb3acd1250bc234572eacaa7078/UIViewPropertyAnimator/UIViewPropertyAnimatorObjCSample/UIViewPropertyAnimatorObjCSample.xcodeproj/project.xcworkspace/xcuserdata/nikolay.andonov.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /UIViewPropertyAnimator/UIViewPropertyAnimatorObjCSample/UIViewPropertyAnimatorObjCSample.xcodeproj/xcuserdata/nikolay.andonov.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /UIViewPropertyAnimator/UIViewPropertyAnimatorObjCSample/UIViewPropertyAnimatorObjCSample.xcodeproj/xcuserdata/nikolay.andonov.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | UIViewPropertyAnimatorObjCSample.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 4EEB61191DA1D093009AB39A 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /UIViewPropertyAnimator/UIViewPropertyAnimatorObjCSample/UIViewPropertyAnimatorObjCSample/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // UIViewPropertyAnimatorObjCSample 4 | // 5 | // Created by nikolay.andonov on 10/3/16. 6 | // Copyright © 2016 nikolay.andonov. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /UIViewPropertyAnimator/UIViewPropertyAnimatorObjCSample/UIViewPropertyAnimatorObjCSample/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /UIViewPropertyAnimator/UIViewPropertyAnimatorObjCSample/UIViewPropertyAnimatorObjCSample/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | PropertyAnimatorStoryboard 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /UIViewPropertyAnimator/UIViewPropertyAnimatorObjCSample/UIViewPropertyAnimatorObjCSample/PropertyAnimatorViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // UIViewPropertyAnimatorObjCSample 4 | // 5 | // Created by nikolay.andonov on 10/3/16. 6 | // Copyright © 2016 nikolay.andonov. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface PropertyAnimatorViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /UIViewPropertyAnimator/UIViewPropertyAnimatorObjCSample/UIViewPropertyAnimatorObjCSample/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // UIViewPropertyAnimatorObjCSample 4 | // 5 | // Created by nikolay.andonov on 10/3/16. 6 | // Copyright © 2016 nikolay.andonov. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /UIViewPropertyAnimator/UIViewPropertyAnimatorSwiftSample/UIViewPropertyAnimatorSwiftSample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /UIViewPropertyAnimator/UIViewPropertyAnimatorSwiftSample/UIViewPropertyAnimatorSwiftSample.xcodeproj/project.xcworkspace/xcuserdata/nikolay.andonov.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naandonov-mm/iOS-10-Sampler/5b70e0234bc21cb3acd1250bc234572eacaa7078/UIViewPropertyAnimator/UIViewPropertyAnimatorSwiftSample/UIViewPropertyAnimatorSwiftSample.xcodeproj/project.xcworkspace/xcuserdata/nikolay.andonov.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /UIViewPropertyAnimator/UIViewPropertyAnimatorSwiftSample/UIViewPropertyAnimatorSwiftSample.xcodeproj/xcuserdata/nikolay.andonov.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /UIViewPropertyAnimator/UIViewPropertyAnimatorSwiftSample/UIViewPropertyAnimatorSwiftSample.xcodeproj/xcuserdata/nikolay.andonov.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | UIViewPropertyAnimatorSwiftSample.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 4E0D0C0E1DA1C3B100C77040 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /UIViewPropertyAnimator/UIViewPropertyAnimatorSwiftSample/UIViewPropertyAnimatorSwiftSample/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /UIViewPropertyAnimator/UIViewPropertyAnimatorSwiftSample/UIViewPropertyAnimatorSwiftSample/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | PropertyAnimatorStoryboard 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /UserNotifications/UserNotificationsObjCSample/UserNotificationsObjCSample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /UserNotifications/UserNotificationsObjCSample/UserNotificationsObjCSample.xcodeproj/project.xcworkspace/xcuserdata/nikolay.andonov.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naandonov-mm/iOS-10-Sampler/5b70e0234bc21cb3acd1250bc234572eacaa7078/UserNotifications/UserNotificationsObjCSample/UserNotificationsObjCSample.xcodeproj/project.xcworkspace/xcuserdata/nikolay.andonov.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /UserNotifications/UserNotificationsObjCSample/UserNotificationsObjCSample.xcodeproj/xcuserdata/nikolay.andonov.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /UserNotifications/UserNotificationsObjCSample/UserNotificationsObjCSample.xcodeproj/xcuserdata/nikolay.andonov.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | UserNotificationsObjCSample.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 4EEC810C1DD3557F00FFF660 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /UserNotifications/UserNotificationsObjCSample/UserNotificationsObjCSample/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // UserNotificationsObjCSample 4 | // 5 | // Created by Nikolay Andonov on 11/9/16. 6 | // Copyright © 2016 Mentormate. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /UserNotifications/UserNotificationsObjCSample/UserNotificationsObjCSample/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /UserNotifications/UserNotificationsObjCSample/UserNotificationsObjCSample/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /UserNotifications/UserNotificationsObjCSample/UserNotificationsObjCSample/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /UserNotifications/UserNotificationsObjCSample/UserNotificationsObjCSample/MainViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // MainViewController.h 3 | // UserNotificationsObjCSample 4 | // 5 | // Created by Nikolay Andonov on 11/9/16. 6 | // Copyright © 2016 Mentormate. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface MainViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /UserNotifications/UserNotificationsObjCSample/UserNotificationsObjCSample/MainViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // MainViewController.m 3 | // UserNotificationsObjCSample 4 | // 5 | // Created by Nikolay Andonov on 11/9/16. 6 | // Copyright © 2016 Mentormate. All rights reserved. 7 | // 8 | 9 | #import "MainViewController.h" 10 | #import "UserNotificationsHandler.h" 11 | 12 | @interface MainViewController () 13 | @property (weak, nonatomic) IBOutlet UIDatePicker *datePicker; 14 | 15 | @end 16 | 17 | @implementation MainViewController 18 | 19 | - (void)viewDidLoad { 20 | [super viewDidLoad]; 21 | } 22 | 23 | - (IBAction)scheduleButtonAction:(id)sender { 24 | 25 | NSDate *selectedDate = self.datePicker.date; 26 | NSLog(@"Selected date: %@",selectedDate); 27 | [[UserNotificationsHandler sharedHandler] scheduleNotificationAtDate:selectedDate]; 28 | UIAlertController *alert = [UIAlertController alertControllerWithTitle:nil message:@"The reminder was scheduled!" preferredStyle:UIAlertControllerStyleAlert]; 29 | [alert addAction:[UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:nil]]; 30 | [self presentViewController:alert animated:YES completion:nil]; 31 | } 32 | 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /UserNotifications/UserNotificationsObjCSample/UserNotificationsObjCSample/UserNotificationsHandler.h: -------------------------------------------------------------------------------- 1 | // 2 | // UserNotificationsHandler.h 3 | // UserNotificationsObjCSample 4 | // 5 | // Created by Nikolay Andonov on 11/9/16. 6 | // Copyright © 2016 Mentormate. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UserNotificationsHandler : NSObject 12 | 13 | + (instancetype)sharedHandler; 14 | - (void)userNotificationsInitialSetup; 15 | - (void)scheduleNotificationAtDate:(NSDate *)date; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /UserNotifications/UserNotificationsObjCSample/UserNotificationsObjCSample/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naandonov-mm/iOS-10-Sampler/5b70e0234bc21cb3acd1250bc234572eacaa7078/UserNotifications/UserNotificationsObjCSample/UserNotificationsObjCSample/logo.png -------------------------------------------------------------------------------- /UserNotifications/UserNotificationsObjCSample/UserNotificationsObjCSample/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // UserNotificationsObjCSample 4 | // 5 | // Created by Nikolay Andonov on 11/9/16. 6 | // Copyright © 2016 Mentormate. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /UserNotifications/UserNotificationsSwiftSample/UserNotificationsSwiftSample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /UserNotifications/UserNotificationsSwiftSample/UserNotificationsSwiftSample.xcodeproj/project.xcworkspace/xcuserdata/nikolay.andonov.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naandonov-mm/iOS-10-Sampler/5b70e0234bc21cb3acd1250bc234572eacaa7078/UserNotifications/UserNotificationsSwiftSample/UserNotificationsSwiftSample.xcodeproj/project.xcworkspace/xcuserdata/nikolay.andonov.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /UserNotifications/UserNotificationsSwiftSample/UserNotificationsSwiftSample.xcodeproj/xcuserdata/nikolay.andonov.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /UserNotifications/UserNotificationsSwiftSample/UserNotificationsSwiftSample.xcodeproj/xcuserdata/nikolay.andonov.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | UserNotificationsSwiftSample.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 4E0FCECC1DD333D1000098A5 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /UserNotifications/UserNotificationsSwiftSample/UserNotificationsSwiftSample/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /UserNotifications/UserNotificationsSwiftSample/UserNotificationsSwiftSample/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /UserNotifications/UserNotificationsSwiftSample/UserNotificationsSwiftSample/MainViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MainViewController.swift 3 | // UserNotificationsSwiftSample 4 | // 5 | // Created by Nikolay Andonov on 11/9/16. 6 | // Copyright © 2016 Mentormate. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class MainViewController: UIViewController { 12 | 13 | @IBOutlet weak var datePicker: UIDatePicker! 14 | 15 | override func viewDidLoad() { 16 | super.viewDidLoad() 17 | 18 | } 19 | 20 | @IBAction func scheduleButtonAction(_ sender: Any) { 21 | 22 | let selectedDate = datePicker.date 23 | print("Selected date: \(selectedDate)") 24 | UserNotificationsHandler.sharedHandler.scheduleNotification(at: selectedDate) 25 | 26 | let alert = UIAlertController(title: nil, message: "The reminder was schedule!", preferredStyle: UIAlertControllerStyle.alert) 27 | alert.addAction(UIAlertAction(title: "OK", style: UIAlertActionStyle.default, handler: nil)) 28 | self.present(alert, animated: true, completion: nil) 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /UserNotifications/UserNotificationsSwiftSample/UserNotificationsSwiftSample/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naandonov-mm/iOS-10-Sampler/5b70e0234bc21cb3acd1250bc234572eacaa7078/UserNotifications/UserNotificationsSwiftSample/UserNotificationsSwiftSample/logo.png --------------------------------------------------------------------------------