├── .DS_Store ├── CustomCamera.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcuserdata │ │ └── kingpin.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcuserdata │ └── kingpin.xcuserdatad │ ├── xcdebugger │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ ├── CustomCamera.xcscheme │ └── xcschememanagement.plist ├── CustomCamera.xcworkspace ├── contents.xcworkspacedata └── xcuserdata │ └── kingpin.xcuserdatad │ ├── UserInterfaceState.xcuserstate │ └── xcdebugger │ └── Breakpoints_v2.xcbkptlist ├── CustomCamera ├── AppDelegate.swift ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ ├── Contents.json │ ├── ico_close.imageset │ │ ├── Contents.json │ │ ├── ic_cross.png │ │ ├── ic_cross_2x.png │ │ └── ic_cross_3x.png │ ├── ico_flash_button.imageset │ │ ├── Contents.json │ │ ├── flash@2x.png │ │ └── flash@3x.png │ ├── ico_flip_button.imageset │ │ ├── Contents.json │ │ ├── rotate@2x.png │ │ └── rotate@3x.png │ ├── shutter_button.imageset │ │ ├── Contents.json │ │ ├── ic_radio_button_checked_white_24px.png │ │ ├── ic_radio_button_checked_white_24px@2x.png │ │ └── ic_radio_button_checked_white_24px@3x.png │ ├── video_button.imageset │ │ ├── Contents.json │ │ ├── ic_Add.png │ │ ├── ic_Add_2x.png │ │ └── ic_Add_3x.png │ └── video_button_rec.imageset │ │ ├── Contents.json │ │ ├── ic_Add.png │ │ ├── ic_Add_2x.png │ │ └── ic_Add_3x.png ├── BBDarkThemedViewController.swift ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── Info.plist ├── VideoEditorViewController.swift └── ViewController.swift ├── CustomCameraTests ├── CustomCameraTests.swift └── Info.plist ├── CustomCameraUITests ├── CustomCameraUITests.swift └── Info.plist ├── Podfile ├── Podfile.lock ├── Pods ├── Fusuma │ ├── LICENSE │ ├── README.md │ └── Sources │ │ ├── Assets.xcassets │ │ ├── Contents.json │ │ ├── ic_check.imageset │ │ │ ├── Contents.json │ │ │ ├── ic_check_white_48pt.png │ │ │ ├── ic_check_white_48pt_2x.png │ │ │ └── ic_check_white_48pt_3x.png │ │ ├── ic_close.imageset │ │ │ ├── Contents.json │ │ │ ├── ic_close_white_48pt.png │ │ │ ├── ic_close_white_48pt_2x.png │ │ │ └── ic_close_white_48pt_3x.png │ │ ├── ic_flash_auto.imageset │ │ │ ├── Contents.json │ │ │ ├── ic_flash_auto_white_48pt.png │ │ │ ├── ic_flash_auto_white_48pt_2x.png │ │ │ └── ic_flash_auto_white_48pt_3x.png │ │ ├── ic_flash_off.imageset │ │ │ ├── Contents.json │ │ │ ├── ic_flash_off_white_48pt.png │ │ │ ├── ic_flash_off_white_48pt_2x.png │ │ │ └── ic_flash_off_white_48pt_3x.png │ │ ├── ic_flash_on.imageset │ │ │ ├── Contents.json │ │ │ ├── ic_flash_on_white_48pt.png │ │ │ ├── ic_flash_on_white_48pt_2x.png │ │ │ └── ic_flash_on_white_48pt_3x.png │ │ ├── ic_insert_photo.imageset │ │ │ ├── Contents.json │ │ │ ├── ic_photo_white_36pt.png │ │ │ ├── ic_photo_white_36pt_2x.png │ │ │ └── ic_photo_white_36pt_3x.png │ │ ├── ic_loop.imageset │ │ │ ├── Contents.json │ │ │ ├── ic_loop_white_48pt.png │ │ │ ├── ic_loop_white_48pt_2x.png │ │ │ └── ic_loop_white_48pt_3x.png │ │ ├── ic_photo_camera.imageset │ │ │ ├── Contents.json │ │ │ ├── ic_photo_camera_white_36pt.png │ │ │ ├── ic_photo_camera_white_36pt_2x.png │ │ │ └── ic_photo_camera_white_36pt_3x.png │ │ ├── ic_radio_button_checked.imageset │ │ │ ├── Contents.json │ │ │ ├── ic_radio_button_checked_white_24px.png │ │ │ ├── ic_radio_button_checked_white_24px@2x.png │ │ │ └── ic_radio_button_checked_white_24px@3x.png │ │ ├── ic_videocam.imageset │ │ │ ├── Contents.json │ │ │ ├── ic_videocam_white_36dp-1.png │ │ │ ├── ic_videocam_white_36dp-2.png │ │ │ └── ic_videocam_white_36dp.png │ │ ├── shutter_button.imageset │ │ │ ├── Contents.json │ │ │ ├── ic_radio_button_checked_white_24px.png │ │ │ ├── ic_radio_button_checked_white_24px@2x.png │ │ │ └── ic_radio_button_checked_white_24px@3x.png │ │ ├── video_button.imageset │ │ │ ├── Contents.json │ │ │ ├── button copy 2.png │ │ │ ├── button copy.png │ │ │ └── button.png │ │ └── video_button_rec.imageset │ │ │ ├── Contents.json │ │ │ ├── button_recording copy 2.png │ │ │ ├── button_recording copy.png │ │ │ └── button_recording.png │ │ ├── FSAlbumView.swift │ │ ├── FSAlbumView.xib │ │ ├── FSAlbumViewCell.swift │ │ ├── FSAlbumViewCell.xib │ │ ├── FSCameraView.swift │ │ ├── FSCameraView.xib │ │ ├── FSConstants.swift │ │ ├── FSImageCropView.swift │ │ ├── FSVideoCameraView.swift │ │ ├── FSVideoCameraView.xib │ │ ├── FusumaViewController.swift │ │ ├── FusumaViewController.swift.orig │ │ └── FusumaViewController.xib ├── Manifest.lock ├── Pods.xcodeproj │ ├── project.pbxproj │ └── xcuserdata │ │ └── kingpin.xcuserdatad │ │ └── xcschemes │ │ ├── Fusuma.xcscheme │ │ ├── Pods-CustomCamera.xcscheme │ │ ├── Pods-CustomCameraTests.xcscheme │ │ ├── Pods-CustomCameraUITests.xcscheme │ │ └── xcschememanagement.plist └── Target Support Files │ ├── Fusuma │ ├── Fusuma-dummy.m │ ├── Fusuma-prefix.pch │ ├── Fusuma-umbrella.h │ ├── Fusuma.modulemap │ ├── Fusuma.xcconfig │ └── Info.plist │ ├── Pods-CustomCamera │ ├── Info.plist │ ├── Pods-CustomCamera-acknowledgements.markdown │ ├── Pods-CustomCamera-acknowledgements.plist │ ├── Pods-CustomCamera-dummy.m │ ├── Pods-CustomCamera-frameworks.sh │ ├── Pods-CustomCamera-resources.sh │ ├── Pods-CustomCamera-umbrella.h │ ├── Pods-CustomCamera.debug.xcconfig │ ├── Pods-CustomCamera.modulemap │ └── Pods-CustomCamera.release.xcconfig │ ├── Pods-CustomCameraTests │ ├── Info.plist │ ├── Pods-CustomCameraTests-acknowledgements.markdown │ ├── Pods-CustomCameraTests-acknowledgements.plist │ ├── Pods-CustomCameraTests-dummy.m │ ├── Pods-CustomCameraTests-frameworks.sh │ ├── Pods-CustomCameraTests-resources.sh │ ├── Pods-CustomCameraTests-umbrella.h │ ├── Pods-CustomCameraTests.debug.xcconfig │ ├── Pods-CustomCameraTests.modulemap │ └── Pods-CustomCameraTests.release.xcconfig │ └── Pods-CustomCameraUITests │ ├── Info.plist │ ├── Pods-CustomCameraUITests-acknowledgements.markdown │ ├── Pods-CustomCameraUITests-acknowledgements.plist │ ├── Pods-CustomCameraUITests-dummy.m │ ├── Pods-CustomCameraUITests-frameworks.sh │ ├── Pods-CustomCameraUITests-resources.sh │ ├── Pods-CustomCameraUITests-umbrella.h │ ├── Pods-CustomCameraUITests.debug.xcconfig │ ├── Pods-CustomCameraUITests.modulemap │ └── Pods-CustomCameraUITests.release.xcconfig └── README.md /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankit0812/CustomCamera/05a74c830a70e373f3c93aa6ee4a30e740d71be8/.DS_Store -------------------------------------------------------------------------------- /CustomCamera.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /CustomCamera.xcodeproj/project.xcworkspace/xcuserdata/kingpin.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankit0812/CustomCamera/05a74c830a70e373f3c93aa6ee4a30e740d71be8/CustomCamera.xcodeproj/project.xcworkspace/xcuserdata/kingpin.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /CustomCamera.xcodeproj/xcuserdata/kingpin.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /CustomCamera.xcodeproj/xcuserdata/kingpin.xcuserdatad/xcschemes/CustomCamera.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 43 | 49 | 50 | 51 | 52 | 53 | 59 | 60 | 61 | 62 | 63 | 64 | 74 | 76 | 82 | 83 | 84 | 85 | 86 | 87 | 93 | 95 | 101 | 102 | 103 | 104 | 106 | 107 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /CustomCamera.xcodeproj/xcuserdata/kingpin.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | CustomCamera.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 9FD01F401E9B6A1200439295 16 | 17 | primary 18 | 19 | 20 | 9FD01F541E9B6A1200439295 21 | 22 | primary 23 | 24 | 25 | 9FD01F5F1E9B6A1200439295 26 | 27 | primary 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /CustomCamera.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /CustomCamera.xcworkspace/xcuserdata/kingpin.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankit0812/CustomCamera/05a74c830a70e373f3c93aa6ee4a30e740d71be8/CustomCamera.xcworkspace/xcuserdata/kingpin.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /CustomCamera.xcworkspace/xcuserdata/kingpin.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 8 | 20 | 21 | 22 | 24 | 36 | 37 | 38 | 40 | 52 | 53 | 54 | 56 | 66 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /CustomCamera/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // CustomCamera 4 | // 5 | // Created by KingpiN on 10/04/17. 6 | // Copyright © 2017 KingpiN. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 18 | // Override point for customization after application launch. 19 | 20 | print (UIDevice.current.identifierForVendor!.uuidString) 21 | return true 22 | } 23 | 24 | func applicationWillResignActive(_ application: UIApplication) { 25 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 26 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 27 | } 28 | 29 | func applicationDidEnterBackground(_ application: UIApplication) { 30 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 31 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 32 | } 33 | 34 | func applicationWillEnterForeground(_ application: UIApplication) { 35 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 36 | } 37 | 38 | func applicationDidBecomeActive(_ application: UIApplication) { 39 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 40 | } 41 | 42 | func applicationWillTerminate(_ application: UIApplication) { 43 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /CustomCamera/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 | } -------------------------------------------------------------------------------- /CustomCamera/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /CustomCamera/Assets.xcassets/ico_close.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "ic_cross.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "ic_cross_2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "ic_cross_3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /CustomCamera/Assets.xcassets/ico_close.imageset/ic_cross.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankit0812/CustomCamera/05a74c830a70e373f3c93aa6ee4a30e740d71be8/CustomCamera/Assets.xcassets/ico_close.imageset/ic_cross.png -------------------------------------------------------------------------------- /CustomCamera/Assets.xcassets/ico_close.imageset/ic_cross_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankit0812/CustomCamera/05a74c830a70e373f3c93aa6ee4a30e740d71be8/CustomCamera/Assets.xcassets/ico_close.imageset/ic_cross_2x.png -------------------------------------------------------------------------------- /CustomCamera/Assets.xcassets/ico_close.imageset/ic_cross_3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankit0812/CustomCamera/05a74c830a70e373f3c93aa6ee4a30e740d71be8/CustomCamera/Assets.xcassets/ico_close.imageset/ic_cross_3x.png -------------------------------------------------------------------------------- /CustomCamera/Assets.xcassets/ico_flash_button.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "flash@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "filename" : "flash@3x.png", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /CustomCamera/Assets.xcassets/ico_flash_button.imageset/flash@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankit0812/CustomCamera/05a74c830a70e373f3c93aa6ee4a30e740d71be8/CustomCamera/Assets.xcassets/ico_flash_button.imageset/flash@2x.png -------------------------------------------------------------------------------- /CustomCamera/Assets.xcassets/ico_flash_button.imageset/flash@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankit0812/CustomCamera/05a74c830a70e373f3c93aa6ee4a30e740d71be8/CustomCamera/Assets.xcassets/ico_flash_button.imageset/flash@3x.png -------------------------------------------------------------------------------- /CustomCamera/Assets.xcassets/ico_flip_button.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "rotate@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "filename" : "rotate@3x.png", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /CustomCamera/Assets.xcassets/ico_flip_button.imageset/rotate@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankit0812/CustomCamera/05a74c830a70e373f3c93aa6ee4a30e740d71be8/CustomCamera/Assets.xcassets/ico_flip_button.imageset/rotate@2x.png -------------------------------------------------------------------------------- /CustomCamera/Assets.xcassets/ico_flip_button.imageset/rotate@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankit0812/CustomCamera/05a74c830a70e373f3c93aa6ee4a30e740d71be8/CustomCamera/Assets.xcassets/ico_flip_button.imageset/rotate@3x.png -------------------------------------------------------------------------------- /CustomCamera/Assets.xcassets/shutter_button.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "ic_radio_button_checked_white_24px.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "ic_radio_button_checked_white_24px@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "ic_radio_button_checked_white_24px@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /CustomCamera/Assets.xcassets/shutter_button.imageset/ic_radio_button_checked_white_24px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankit0812/CustomCamera/05a74c830a70e373f3c93aa6ee4a30e740d71be8/CustomCamera/Assets.xcassets/shutter_button.imageset/ic_radio_button_checked_white_24px.png -------------------------------------------------------------------------------- /CustomCamera/Assets.xcassets/shutter_button.imageset/ic_radio_button_checked_white_24px@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankit0812/CustomCamera/05a74c830a70e373f3c93aa6ee4a30e740d71be8/CustomCamera/Assets.xcassets/shutter_button.imageset/ic_radio_button_checked_white_24px@2x.png -------------------------------------------------------------------------------- /CustomCamera/Assets.xcassets/shutter_button.imageset/ic_radio_button_checked_white_24px@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankit0812/CustomCamera/05a74c830a70e373f3c93aa6ee4a30e740d71be8/CustomCamera/Assets.xcassets/shutter_button.imageset/ic_radio_button_checked_white_24px@3x.png -------------------------------------------------------------------------------- /CustomCamera/Assets.xcassets/video_button.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "ic_Add.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "ic_Add_2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "ic_Add_3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /CustomCamera/Assets.xcassets/video_button.imageset/ic_Add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankit0812/CustomCamera/05a74c830a70e373f3c93aa6ee4a30e740d71be8/CustomCamera/Assets.xcassets/video_button.imageset/ic_Add.png -------------------------------------------------------------------------------- /CustomCamera/Assets.xcassets/video_button.imageset/ic_Add_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankit0812/CustomCamera/05a74c830a70e373f3c93aa6ee4a30e740d71be8/CustomCamera/Assets.xcassets/video_button.imageset/ic_Add_2x.png -------------------------------------------------------------------------------- /CustomCamera/Assets.xcassets/video_button.imageset/ic_Add_3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankit0812/CustomCamera/05a74c830a70e373f3c93aa6ee4a30e740d71be8/CustomCamera/Assets.xcassets/video_button.imageset/ic_Add_3x.png -------------------------------------------------------------------------------- /CustomCamera/Assets.xcassets/video_button_rec.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "ic_Add.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "ic_Add_2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "ic_Add_3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /CustomCamera/Assets.xcassets/video_button_rec.imageset/ic_Add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankit0812/CustomCamera/05a74c830a70e373f3c93aa6ee4a30e740d71be8/CustomCamera/Assets.xcassets/video_button_rec.imageset/ic_Add.png -------------------------------------------------------------------------------- /CustomCamera/Assets.xcassets/video_button_rec.imageset/ic_Add_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankit0812/CustomCamera/05a74c830a70e373f3c93aa6ee4a30e740d71be8/CustomCamera/Assets.xcassets/video_button_rec.imageset/ic_Add_2x.png -------------------------------------------------------------------------------- /CustomCamera/Assets.xcassets/video_button_rec.imageset/ic_Add_3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankit0812/CustomCamera/05a74c830a70e373f3c93aa6ee4a30e740d71be8/CustomCamera/Assets.xcassets/video_button_rec.imageset/ic_Add_3x.png -------------------------------------------------------------------------------- /CustomCamera/BBDarkThemedViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BBDarkThemedViewController.swift 3 | // CustomCamera 4 | // 5 | // Created by KingpiN on 10/04/17. 6 | // Copyright © 2017 KingpiN. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class BBDarkThemedViewController: UIViewController { 12 | 13 | override func viewDidLoad() { 14 | super.viewDidLoad() 15 | 16 | // Do any additional setup after loading the view. 17 | self.navigationController?.navigationBar.barTintColor = UIColor.init(red: 34/255, green: 34/255, blue: 34/255, alpha: 1) 18 | self.navigationController?.navigationBar.tintColor = UIColor.white 19 | 20 | self.navigationController?.navigationBar.titleTextAttributes = 21 | [NSForegroundColorAttributeName:UIColor.white,NSFontAttributeName: UIFont.systemFont(ofSize: 17)] 22 | self.navigationController?.navigationBar.isTranslucent = false 23 | self.navigationController?.navigationBar.barStyle = UIBarStyle.black 24 | self.navigationController?.navigationBar.shadowImage = UIImage() 25 | } 26 | 27 | override func didReceiveMemoryWarning() { 28 | super.didReceiveMemoryWarning() 29 | // Dispose of any resources that can be recreated. 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /CustomCamera/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 | -------------------------------------------------------------------------------- /CustomCamera/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 | 38 | 39 | -------------------------------------------------------------------------------- /CustomCamera/VideoEditorViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // VideoEditorViewController.swift 3 | // CustomCamera 4 | // 5 | // Created by KingpiN on 12/04/17. 6 | // Copyright © 2017 KingpiN. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import AVKit 11 | import AVFoundation 12 | 13 | class VideoEditorViewController: UIViewController { 14 | 15 | @IBOutlet weak var videoPlayingView: UIView! 16 | var assetsURL: URL! 17 | 18 | override func viewDidLoad() { 19 | super.viewDidLoad() 20 | 21 | // Do any additional setup after loading the view. 22 | videoPlayingView.layoutIfNeeded() 23 | } 24 | 25 | override func didReceiveMemoryWarning() { 26 | super.didReceiveMemoryWarning() 27 | // Dispose of any resources that can be recreated. 28 | } 29 | 30 | override func viewDidAppear(_ animated: Bool) { 31 | super.viewDidAppear(animated) 32 | let player = AVPlayer(url: assetsURL!) 33 | let playerLayer = AVPlayerLayer(player: player) 34 | playerLayer.backgroundColor = UIColor.brown.cgColor 35 | playerLayer.frame = videoPlayingView.bounds 36 | videoPlayingView.layer.addSublayer(playerLayer) 37 | player.play() 38 | videoPlayingView.layoutIfNeeded() 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /CustomCamera/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // CustomCamera 4 | // 5 | // Created by KingpiN on 10/04/17. 6 | // Copyright © 2017 KingpiN. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import AVFoundation 11 | 12 | class ViewController: BBDarkThemedViewController { 13 | 14 | @IBOutlet weak var cameraView: UIView! 15 | @IBOutlet weak var toolbarView: UIView! 16 | 17 | @IBOutlet weak var flashButtonOutlet: UIButton! 18 | @IBOutlet weak var flipButtonOutlet: UIButton! 19 | 20 | @IBOutlet weak var recordButtonOutlet: UIButton! 21 | 22 | @IBOutlet weak var timerLabel: UILabel! 23 | @IBOutlet weak var recordingLabel: UILabel! 24 | 25 | 26 | var session: AVCaptureSession? 27 | var device: AVCaptureDevice? 28 | var videoInput: AVCaptureDeviceInput? 29 | var videoOutput: AVCaptureMovieFileOutput? 30 | 31 | var flashOffImage: UIImage? 32 | var flashOnImage: UIImage? 33 | var videoStartImage: UIImage? 34 | var videoStopImage: UIImage? 35 | var isRecording = false 36 | 37 | var transform = CGAffineTransform(a: -0.598460069057858, b: -0.801152635733831, c: 0.801152635733831, d: -0.598460069057858, tx: 0.0, ty: 0.0) 38 | 39 | override func viewDidLoad() { 40 | super.viewDidLoad() 41 | // Do any additional setup after loading the view, typically from a nib 42 | // AVCapture 43 | 44 | self.toolbarView.backgroundColor = self.navigationController?.navigationBar.barTintColor 45 | session = AVCaptureSession() 46 | 47 | self.navigationController?.title = "Camera" 48 | 49 | for device in AVCaptureDevice.devices() { 50 | if let device = device as? AVCaptureDevice , device.position == AVCaptureDevicePosition.back { 51 | self.device = device 52 | } 53 | } 54 | 55 | do { 56 | 57 | if let session = session { 58 | 59 | videoInput = try AVCaptureDeviceInput(device: device) 60 | 61 | session.addInput(videoInput) 62 | 63 | // Don't allow use of microphone 64 | session.usesApplicationAudioSession = false 65 | 66 | videoOutput = AVCaptureMovieFileOutput() 67 | let totalSeconds = 15.0 //Total Seconds of capture time 68 | let timeScale: Int32 = 30 //FPS 69 | 70 | let maxDuration = CMTimeMakeWithSeconds(totalSeconds, timeScale) 71 | 72 | videoOutput?.maxRecordedDuration = maxDuration 73 | videoOutput?.minFreeDiskSpaceLimit = 1024 * 1024 //SET MIN FREE SPACE IN BYTES FOR RECORDING TO CONTINUE ON A VOLUME 74 | 75 | if session.canAddOutput(videoOutput) { 76 | session.addOutput(videoOutput) 77 | } 78 | 79 | let videoLayer = AVCaptureVideoPreviewLayer(session: session) 80 | videoLayer?.frame = self.cameraView.bounds 81 | videoLayer?.videoGravity = AVLayerVideoGravityResizeAspectFill 82 | 83 | self.cameraView.layer.addSublayer(videoLayer!) 84 | session.startRunning() 85 | } 86 | cameraView.bringSubview(toFront: flashButtonOutlet) 87 | cameraView.bringSubview(toFront: flipButtonOutlet) 88 | 89 | videoStartImage = UIImage(named: "video_button") 90 | videoStopImage = UIImage(named: "video_button_rec") 91 | } catch { 92 | print ("error occured kutreya") 93 | } 94 | flashConfiguration() 95 | self.startCamera() 96 | } 97 | 98 | func startCamera() { 99 | let status = AVCaptureDevice.authorizationStatus(forMediaType: AVMediaTypeVideo) 100 | if status == AVAuthorizationStatus.authorized { 101 | session?.startRunning() 102 | } else if status == AVAuthorizationStatus.denied || status == AVAuthorizationStatus.restricted { 103 | session?.stopRunning() 104 | } 105 | } 106 | 107 | func stopCamera() { 108 | if self.isRecording { 109 | self.toggleRecording() 110 | } 111 | session?.stopRunning() 112 | } 113 | 114 | func toggleRecording() { 115 | guard let videoOutput = videoOutput else { 116 | return 117 | } 118 | 119 | self.isRecording = !self.isRecording 120 | 121 | let shotImage: UIImage? 122 | if self.isRecording { 123 | shotImage = videoStopImage 124 | } else { 125 | shotImage = videoStartImage 126 | } 127 | recordButtonOutlet.setImage(shotImage, for: UIControlState()) 128 | 129 | if self.isRecording { 130 | 131 | let outputPath = "\(NSTemporaryDirectory())originalVideo.mov" 132 | let outputURL = URL(fileURLWithPath: outputPath) 133 | 134 | let fileManager = FileManager.default 135 | if fileManager.fileExists(atPath: outputPath) { 136 | do { 137 | try fileManager.removeItem(atPath: outputPath) 138 | } catch { 139 | print("error removing item at path: \(outputPath)") 140 | self.isRecording = false 141 | return 142 | } 143 | } 144 | flipButtonOutlet.isEnabled = false 145 | flashButtonOutlet.isEnabled = false 146 | videoOutput.startRecording(toOutputFileURL: outputURL, recordingDelegate: self) 147 | } else { 148 | videoOutput.stopRecording() 149 | flipButtonOutlet.isEnabled = true 150 | flashButtonOutlet.isEnabled = true 151 | } 152 | return 153 | } 154 | 155 | func flashConfiguration() { 156 | do { 157 | if let device = device { 158 | try device.lockForConfiguration() 159 | device.flashMode = AVCaptureFlashMode.off 160 | flashButtonOutlet.setImage(UIImage(named: "ico_flash_button"), for: .normal) 161 | device.unlockForConfiguration() 162 | } 163 | } catch _ { 164 | return 165 | } 166 | } 167 | 168 | override func didReceiveMemoryWarning() { 169 | super.didReceiveMemoryWarning() 170 | // Dispose of any resources that can be recreated. 171 | } 172 | 173 | @IBAction func flashButtonAction(_ sender: Any) { 174 | do { 175 | if let device = device { 176 | try device.lockForConfiguration() 177 | let mode = device.flashMode 178 | if mode == AVCaptureFlashMode.off { 179 | device.flashMode = AVCaptureFlashMode.on 180 | flashButtonOutlet.setImage(UIImage(named: "ico_flash_button"), for: .normal) 181 | } else if mode == AVCaptureFlashMode.on { 182 | device.flashMode = AVCaptureFlashMode.off 183 | flashButtonOutlet.setImage(UIImage(named: "ico_flash_button"), for: .normal) 184 | } 185 | device.unlockForConfiguration() 186 | } 187 | } catch _ { 188 | flashButtonOutlet.setImage(UIImage(named: "ico_flash_button"), for: .normal) 189 | return 190 | } 191 | 192 | } 193 | 194 | 195 | @IBAction func flipButtonAction(_ sender: Any) { 196 | let button = sender as! UIButton 197 | print(button.transform) 198 | UIView.animate(withDuration: 0.3, delay: 0, usingSpringWithDamping: 1, initialSpringVelocity: 0.1, options: UIViewAnimationOptions.allowAnimatedContent, animations: { 199 | 200 | button.transform = self.transform 201 | self.transform = self.transform == CGAffineTransform(a: -0.598460069057858, b: -0.801152635733831, c: 0.801152635733831, d: -0.598460069057858, tx: 0.0, ty: 0.0) ? CGAffineTransform(a: 1.0, b: 0.0, c: 0.0, d: 1.0, tx: 0.0, ty: 0.0) : CGAffineTransform(a: -0.598460069057858, b: -0.801152635733831, c: 0.801152635733831, d: -0.598460069057858, tx: 0.0, ty: 0.0) 202 | self.session?.stopRunning() 203 | do { 204 | self.session?.beginConfiguration() 205 | if let session = self.session { 206 | for input in session.inputs { 207 | session.removeInput(input as! AVCaptureInput) 208 | } 209 | let position = (self.videoInput?.device.position == AVCaptureDevicePosition.front) ? AVCaptureDevicePosition.back : AVCaptureDevicePosition.front 210 | for device in AVCaptureDevice.devices(withMediaType: AVMediaTypeVideo) { 211 | if let device = device as? AVCaptureDevice , device.position == position { 212 | self.videoInput = try AVCaptureDeviceInput(device: device) 213 | session.addInput(self.videoInput) 214 | } 215 | } 216 | } 217 | self.session?.commitConfiguration() 218 | } catch { 219 | } 220 | self.session?.startRunning() 221 | }, completion: nil) 222 | } 223 | 224 | @IBAction func recordButtonPressed(_ sender: Any) { 225 | toggleRecording() 226 | } 227 | 228 | func manageCroppingToSquare(filePath: URL , completion: @escaping (_ outputURL : URL?) -> ()) { 229 | 230 | // output file 231 | let documentsURL = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first 232 | let outputPath = documentsURL?.appendingPathComponent("squareVideo.mov") 233 | if FileManager.default.fileExists(atPath: (outputPath?.path)!) { 234 | do { 235 | try FileManager.default.removeItem(atPath: (outputPath?.path)!) 236 | } 237 | catch { 238 | print ("Error deleting file") 239 | } 240 | } 241 | 242 | //input file 243 | let asset = AVAsset.init(url: filePath) 244 | print (asset) 245 | let composition = AVMutableComposition.init() 246 | composition.addMutableTrack(withMediaType: AVMediaTypeVideo, preferredTrackID: kCMPersistentTrackID_Invalid) 247 | 248 | //input clip 249 | let clipVideoTrack = asset.tracks(withMediaType: AVMediaTypeVideo)[0] 250 | 251 | //make it square 252 | let videoComposition = AVMutableVideoComposition() 253 | videoComposition.renderSize = CGSize(width: CGFloat(clipVideoTrack.naturalSize.height), height: CGFloat(clipVideoTrack.naturalSize.height)) 254 | videoComposition.frameDuration = CMTimeMake(1, 30) 255 | let instruction = AVMutableVideoCompositionInstruction() 256 | instruction.timeRange = CMTimeRangeMake(kCMTimeZero, CMTimeMakeWithSeconds(60, 30)) 257 | 258 | //rotate to potrait 259 | let transformer = AVMutableVideoCompositionLayerInstruction(assetTrack: clipVideoTrack) 260 | let t1 = CGAffineTransform(translationX: clipVideoTrack.naturalSize.height, y: -(clipVideoTrack.naturalSize.width - clipVideoTrack.naturalSize.height) / 2) 261 | let t2: CGAffineTransform = t1.rotated(by: .pi/2) 262 | let finalTransform: CGAffineTransform = t2 263 | transformer.setTransform(finalTransform, at: kCMTimeZero) 264 | instruction.layerInstructions = [transformer] 265 | videoComposition.instructions = [instruction] 266 | 267 | //exporter 268 | let exporter = AVAssetExportSession.init(asset: asset, presetName: AVAssetExportPresetMediumQuality) 269 | exporter?.outputFileType = AVFileTypeQuickTimeMovie 270 | exporter?.outputURL = outputPath 271 | exporter?.videoComposition = videoComposition 272 | 273 | exporter?.exportAsynchronously() { handler -> Void in 274 | if exporter?.status == .completed { 275 | print("Export complete") 276 | DispatchQueue.main.async(execute: { 277 | completion(outputPath) 278 | }) 279 | return 280 | } else if exporter?.status == .failed { 281 | print("Export failed - \(String(describing: exporter?.error))") 282 | } 283 | completion(nil) 284 | return 285 | } 286 | } 287 | } 288 | 289 | extension ViewController : AVCaptureFileOutputRecordingDelegate { 290 | 291 | func capture(_ captureOutput: AVCaptureFileOutput!, didStartRecordingToOutputFileAt fileURL: URL!, fromConnections connections: [Any]!) { 292 | print("started recording to: \(fileURL)") 293 | } 294 | 295 | func capture(_ captureOutput: AVCaptureFileOutput!, didFinishRecordingToOutputFileAt outputFileURL: URL!, fromConnections connections: [Any]!, error: Error!) { 296 | print("finished recording to: \(outputFileURL)") 297 | manageCroppingToSquare(filePath: outputFileURL) { (url) in 298 | let vcNew = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "VideoEditorViewController") as! VideoEditorViewController 299 | vcNew.assetsURL = url 300 | self.navigationController?.pushViewController(vcNew, animated: true) 301 | } 302 | } 303 | } 304 | -------------------------------------------------------------------------------- /CustomCameraTests/CustomCameraTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CustomCameraTests.swift 3 | // CustomCameraTests 4 | // 5 | // Created by KingpiN on 10/04/17. 6 | // Copyright © 2017 KingpiN. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | @testable import CustomCamera 11 | 12 | class CustomCameraTests: XCTestCase { 13 | 14 | override func setUp() { 15 | super.setUp() 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | } 18 | 19 | override func tearDown() { 20 | // Put teardown code here. This method is called after the invocation of each test method in the class. 21 | super.tearDown() 22 | } 23 | 24 | func testExample() { 25 | // This is an example of a functional test case. 26 | // Use XCTAssert and related functions to verify your tests produce the correct results. 27 | } 28 | 29 | func testPerformanceExample() { 30 | // This is an example of a performance test case. 31 | self.measure { 32 | // Put the code you want to measure the time of here. 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /CustomCameraTests/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 | -------------------------------------------------------------------------------- /CustomCameraUITests/CustomCameraUITests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CustomCameraUITests.swift 3 | // CustomCameraUITests 4 | // 5 | // Created by KingpiN on 10/04/17. 6 | // Copyright © 2017 KingpiN. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class CustomCameraUITests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | 18 | // In UI tests it is usually best to stop immediately when a failure occurs. 19 | continueAfterFailure = false 20 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 21 | XCUIApplication().launch() 22 | 23 | // 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. 24 | } 25 | 26 | override func tearDown() { 27 | // Put teardown code here. This method is called after the invocation of each test method in the class. 28 | super.tearDown() 29 | } 30 | 31 | func testExample() { 32 | // Use recording to get started writing UI tests. 33 | // Use XCTAssert and related functions to verify your tests produce the correct results. 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /CustomCameraUITests/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 | -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment the next line to define a global platform for your project 2 | # platform :ios, '9.0' 3 | 4 | target 'CustomCamera' do 5 | # Comment the next line if you're not using Swift and don't want to use dynamic frameworks 6 | use_frameworks! 7 | 8 | # Pods for CustomCamera 9 | pod 'Fusuma' 10 | 11 | target 'CustomCameraTests' do 12 | inherit! :search_paths 13 | # Pods for testing 14 | end 15 | 16 | target 'CustomCameraUITests' do 17 | inherit! :search_paths 18 | # Pods for testing 19 | end 20 | 21 | end 22 | -------------------------------------------------------------------------------- /Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Fusuma (1.0.3) 3 | 4 | DEPENDENCIES: 5 | - Fusuma 6 | 7 | SPEC CHECKSUMS: 8 | Fusuma: 60ed1dd51a3b3610960219df9862c83f03304ce1 9 | 10 | PODFILE CHECKSUM: 2af4e82e6dfe1ba710e5e6fabe8166d627947fcd 11 | 12 | COCOAPODS: 1.1.1 13 | -------------------------------------------------------------------------------- /Pods/Fusuma/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 ytakzk 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Pods/Fusuma/README.md: -------------------------------------------------------------------------------- 1 | ## Fusuma 2 | 3 | Fusuma is a Swift library that provides an Instagram-like photo browser with a camera feature using only a few lines of code. 4 | You can use Fusuma instead of UIImagePickerController. It also has a feature to take a square-sized photo. 5 | 6 | [![Version](https://img.shields.io/cocoapods/v/Fusuma.svg?style=flat)](http://cocoapods.org/pods/Fusuma) 7 | [![Platform](https://img.shields.io/cocoapods/p/Fusuma.svg?style=flat)](http://cocoapods.org/pods/Fusuma) 8 | [![CI Status](http://img.shields.io/travis/ytakzk/Fusuma.svg?style=flat)](https://travis-ci.org/ytakzk/Fusuma) 9 | [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) 10 | [![codebeat](https://codebeat.co/badges/287ff7b1-4cda-4384-8780-88e1dbff95cd)](https://codebeat.co/projects/github-com-ytakzk-fusuma) 11 | 12 | ## Preview 13 | 14 | 15 | ## Images 16 | 17 | 18 | 19 | ## Features 20 | - [x] UIImagePickerController alternative 21 | - [x] Cropping images in camera roll 22 | - [x] Taking a square-sized photo and a video using AVFoundation 23 | - [x] Flash: On & Off 24 | - [x] Camera Mode: Front & Back 25 | - [x] Video Mode 26 | - [x] Colors fully customizable 27 | 28 | Those features are available just with a few lines of code! 29 | 30 | ## Installation 31 | 32 | #### Manual installation 33 | 34 | Download and drop the 'Classes' folder into your Xcode project. 35 | 36 | #### Using [CocoaPods](http://cocoapods.org/) 37 | 38 | Add `pod 'Fusuma'` to your `Podfile` and run `pod install`. Also add `use_frameworks!` to the `Podfile`. 39 | 40 | ``` 41 | use_frameworks! 42 | pod 'Fusuma' 43 | ``` 44 | 45 | #### Using [Carthage](https://github.com/Carthage/Carthage) 46 | 47 | Add `github "ytakzk/Fusuma"` to your `Cartfile` and run `carthage update`. If unfamiliar with Carthage then checkout their [Getting Started section](https://github.com/Carthage/Carthage#getting-started). 48 | 49 | ``` 50 | github "ytakzk/Fusuma" 51 | ``` 52 | 53 | ## Fusuma Usage 54 | Import Fusuma ```import Fusuma``` then use the following codes in some function except for viewDidLoad and give FusumaDelegate to the view controller. 55 | 56 | ```Swift 57 | let fusuma = FusumaViewController() 58 | fusuma.delegate = self 59 | fusuma.hasVideo = true // If you want to let the users allow to use video. 60 | self.presentViewController(fusuma, animated: true, completion: nil) 61 | ``` 62 | 63 | #### Delegate methods 64 | 65 | ```Swift 66 | // Return the image which is selected from camera roll or is taken via the camera. 67 | func fusumaImageSelected(image: UIImage) { 68 | 69 | print("Image selected") 70 | } 71 | 72 | // Return the image but called after is dismissed. 73 | func fusumaDismissedWithImage(image: UIImage) { 74 | 75 | print("Called just after FusumaViewController is dismissed.") 76 | } 77 | 78 | func fusumaVideoCompleted(withFileURL fileURL: NSURL) { 79 | 80 | print("Called just after a video has been selected.") 81 | } 82 | 83 | // When camera roll is not authorized, this method is called. 84 | func fusumaCameraRollUnauthorized() { 85 | 86 | print("Camera roll unauthorized") 87 | } 88 | ``` 89 | 90 | #### Colors 91 | 92 | ```Swift 93 | fusumaTintColor: UIColor // tint color 94 | 95 | fusumaBackgroundColor: UIColor // background color 96 | ``` 97 | 98 | #### Customize Image Output 99 | You can deselect image crop mode with: 100 | 101 | ```Swift 102 | fusumaCropImage:Bool // default is true for cropping the image 103 | ``` 104 | 105 | ## Fusuma for Xamarin 106 | Cheesebaron developed Chafu for Xamarin. 107 | https://github.com/Cheesebaron/Chafu 108 | 109 | ## Author 110 | ytakzk 111 | [http://ytakzk.me](http://ytakzk.me) 112 | 113 | ## Donation 114 | Your support is welcome through Bitcoin 16485BTK9EoQUqkMmSecJ9xN6E9nhW8ePd 115 | 116 | ## License 117 | Fusuma is released under the MIT license. 118 | See LICENSE for details. 119 | -------------------------------------------------------------------------------- /Pods/Fusuma/Sources/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Pods/Fusuma/Sources/Assets.xcassets/ic_check.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "ic_check_white_48pt.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "ic_check_white_48pt_2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "ic_check_white_48pt_3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Pods/Fusuma/Sources/Assets.xcassets/ic_check.imageset/ic_check_white_48pt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankit0812/CustomCamera/05a74c830a70e373f3c93aa6ee4a30e740d71be8/Pods/Fusuma/Sources/Assets.xcassets/ic_check.imageset/ic_check_white_48pt.png -------------------------------------------------------------------------------- /Pods/Fusuma/Sources/Assets.xcassets/ic_check.imageset/ic_check_white_48pt_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankit0812/CustomCamera/05a74c830a70e373f3c93aa6ee4a30e740d71be8/Pods/Fusuma/Sources/Assets.xcassets/ic_check.imageset/ic_check_white_48pt_2x.png -------------------------------------------------------------------------------- /Pods/Fusuma/Sources/Assets.xcassets/ic_check.imageset/ic_check_white_48pt_3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankit0812/CustomCamera/05a74c830a70e373f3c93aa6ee4a30e740d71be8/Pods/Fusuma/Sources/Assets.xcassets/ic_check.imageset/ic_check_white_48pt_3x.png -------------------------------------------------------------------------------- /Pods/Fusuma/Sources/Assets.xcassets/ic_close.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "ic_close_white_48pt.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "ic_close_white_48pt_2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "ic_close_white_48pt_3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Pods/Fusuma/Sources/Assets.xcassets/ic_close.imageset/ic_close_white_48pt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankit0812/CustomCamera/05a74c830a70e373f3c93aa6ee4a30e740d71be8/Pods/Fusuma/Sources/Assets.xcassets/ic_close.imageset/ic_close_white_48pt.png -------------------------------------------------------------------------------- /Pods/Fusuma/Sources/Assets.xcassets/ic_close.imageset/ic_close_white_48pt_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankit0812/CustomCamera/05a74c830a70e373f3c93aa6ee4a30e740d71be8/Pods/Fusuma/Sources/Assets.xcassets/ic_close.imageset/ic_close_white_48pt_2x.png -------------------------------------------------------------------------------- /Pods/Fusuma/Sources/Assets.xcassets/ic_close.imageset/ic_close_white_48pt_3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankit0812/CustomCamera/05a74c830a70e373f3c93aa6ee4a30e740d71be8/Pods/Fusuma/Sources/Assets.xcassets/ic_close.imageset/ic_close_white_48pt_3x.png -------------------------------------------------------------------------------- /Pods/Fusuma/Sources/Assets.xcassets/ic_flash_auto.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "ic_flash_auto_white_48pt.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "ic_flash_auto_white_48pt_2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "ic_flash_auto_white_48pt_3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Pods/Fusuma/Sources/Assets.xcassets/ic_flash_auto.imageset/ic_flash_auto_white_48pt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankit0812/CustomCamera/05a74c830a70e373f3c93aa6ee4a30e740d71be8/Pods/Fusuma/Sources/Assets.xcassets/ic_flash_auto.imageset/ic_flash_auto_white_48pt.png -------------------------------------------------------------------------------- /Pods/Fusuma/Sources/Assets.xcassets/ic_flash_auto.imageset/ic_flash_auto_white_48pt_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankit0812/CustomCamera/05a74c830a70e373f3c93aa6ee4a30e740d71be8/Pods/Fusuma/Sources/Assets.xcassets/ic_flash_auto.imageset/ic_flash_auto_white_48pt_2x.png -------------------------------------------------------------------------------- /Pods/Fusuma/Sources/Assets.xcassets/ic_flash_auto.imageset/ic_flash_auto_white_48pt_3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankit0812/CustomCamera/05a74c830a70e373f3c93aa6ee4a30e740d71be8/Pods/Fusuma/Sources/Assets.xcassets/ic_flash_auto.imageset/ic_flash_auto_white_48pt_3x.png -------------------------------------------------------------------------------- /Pods/Fusuma/Sources/Assets.xcassets/ic_flash_off.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "ic_flash_off_white_48pt.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "ic_flash_off_white_48pt_2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "ic_flash_off_white_48pt_3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Pods/Fusuma/Sources/Assets.xcassets/ic_flash_off.imageset/ic_flash_off_white_48pt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankit0812/CustomCamera/05a74c830a70e373f3c93aa6ee4a30e740d71be8/Pods/Fusuma/Sources/Assets.xcassets/ic_flash_off.imageset/ic_flash_off_white_48pt.png -------------------------------------------------------------------------------- /Pods/Fusuma/Sources/Assets.xcassets/ic_flash_off.imageset/ic_flash_off_white_48pt_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankit0812/CustomCamera/05a74c830a70e373f3c93aa6ee4a30e740d71be8/Pods/Fusuma/Sources/Assets.xcassets/ic_flash_off.imageset/ic_flash_off_white_48pt_2x.png -------------------------------------------------------------------------------- /Pods/Fusuma/Sources/Assets.xcassets/ic_flash_off.imageset/ic_flash_off_white_48pt_3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankit0812/CustomCamera/05a74c830a70e373f3c93aa6ee4a30e740d71be8/Pods/Fusuma/Sources/Assets.xcassets/ic_flash_off.imageset/ic_flash_off_white_48pt_3x.png -------------------------------------------------------------------------------- /Pods/Fusuma/Sources/Assets.xcassets/ic_flash_on.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "ic_flash_on_white_48pt.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "ic_flash_on_white_48pt_2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "ic_flash_on_white_48pt_3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Pods/Fusuma/Sources/Assets.xcassets/ic_flash_on.imageset/ic_flash_on_white_48pt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankit0812/CustomCamera/05a74c830a70e373f3c93aa6ee4a30e740d71be8/Pods/Fusuma/Sources/Assets.xcassets/ic_flash_on.imageset/ic_flash_on_white_48pt.png -------------------------------------------------------------------------------- /Pods/Fusuma/Sources/Assets.xcassets/ic_flash_on.imageset/ic_flash_on_white_48pt_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankit0812/CustomCamera/05a74c830a70e373f3c93aa6ee4a30e740d71be8/Pods/Fusuma/Sources/Assets.xcassets/ic_flash_on.imageset/ic_flash_on_white_48pt_2x.png -------------------------------------------------------------------------------- /Pods/Fusuma/Sources/Assets.xcassets/ic_flash_on.imageset/ic_flash_on_white_48pt_3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankit0812/CustomCamera/05a74c830a70e373f3c93aa6ee4a30e740d71be8/Pods/Fusuma/Sources/Assets.xcassets/ic_flash_on.imageset/ic_flash_on_white_48pt_3x.png -------------------------------------------------------------------------------- /Pods/Fusuma/Sources/Assets.xcassets/ic_insert_photo.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "ic_photo_white_36pt.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "ic_photo_white_36pt_2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "ic_photo_white_36pt_3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Pods/Fusuma/Sources/Assets.xcassets/ic_insert_photo.imageset/ic_photo_white_36pt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankit0812/CustomCamera/05a74c830a70e373f3c93aa6ee4a30e740d71be8/Pods/Fusuma/Sources/Assets.xcassets/ic_insert_photo.imageset/ic_photo_white_36pt.png -------------------------------------------------------------------------------- /Pods/Fusuma/Sources/Assets.xcassets/ic_insert_photo.imageset/ic_photo_white_36pt_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankit0812/CustomCamera/05a74c830a70e373f3c93aa6ee4a30e740d71be8/Pods/Fusuma/Sources/Assets.xcassets/ic_insert_photo.imageset/ic_photo_white_36pt_2x.png -------------------------------------------------------------------------------- /Pods/Fusuma/Sources/Assets.xcassets/ic_insert_photo.imageset/ic_photo_white_36pt_3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankit0812/CustomCamera/05a74c830a70e373f3c93aa6ee4a30e740d71be8/Pods/Fusuma/Sources/Assets.xcassets/ic_insert_photo.imageset/ic_photo_white_36pt_3x.png -------------------------------------------------------------------------------- /Pods/Fusuma/Sources/Assets.xcassets/ic_loop.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "ic_loop_white_48pt.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "ic_loop_white_48pt_2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "ic_loop_white_48pt_3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Pods/Fusuma/Sources/Assets.xcassets/ic_loop.imageset/ic_loop_white_48pt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankit0812/CustomCamera/05a74c830a70e373f3c93aa6ee4a30e740d71be8/Pods/Fusuma/Sources/Assets.xcassets/ic_loop.imageset/ic_loop_white_48pt.png -------------------------------------------------------------------------------- /Pods/Fusuma/Sources/Assets.xcassets/ic_loop.imageset/ic_loop_white_48pt_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankit0812/CustomCamera/05a74c830a70e373f3c93aa6ee4a30e740d71be8/Pods/Fusuma/Sources/Assets.xcassets/ic_loop.imageset/ic_loop_white_48pt_2x.png -------------------------------------------------------------------------------- /Pods/Fusuma/Sources/Assets.xcassets/ic_loop.imageset/ic_loop_white_48pt_3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankit0812/CustomCamera/05a74c830a70e373f3c93aa6ee4a30e740d71be8/Pods/Fusuma/Sources/Assets.xcassets/ic_loop.imageset/ic_loop_white_48pt_3x.png -------------------------------------------------------------------------------- /Pods/Fusuma/Sources/Assets.xcassets/ic_photo_camera.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "ic_photo_camera_white_36pt.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "ic_photo_camera_white_36pt_2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "ic_photo_camera_white_36pt_3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Pods/Fusuma/Sources/Assets.xcassets/ic_photo_camera.imageset/ic_photo_camera_white_36pt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankit0812/CustomCamera/05a74c830a70e373f3c93aa6ee4a30e740d71be8/Pods/Fusuma/Sources/Assets.xcassets/ic_photo_camera.imageset/ic_photo_camera_white_36pt.png -------------------------------------------------------------------------------- /Pods/Fusuma/Sources/Assets.xcassets/ic_photo_camera.imageset/ic_photo_camera_white_36pt_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankit0812/CustomCamera/05a74c830a70e373f3c93aa6ee4a30e740d71be8/Pods/Fusuma/Sources/Assets.xcassets/ic_photo_camera.imageset/ic_photo_camera_white_36pt_2x.png -------------------------------------------------------------------------------- /Pods/Fusuma/Sources/Assets.xcassets/ic_photo_camera.imageset/ic_photo_camera_white_36pt_3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankit0812/CustomCamera/05a74c830a70e373f3c93aa6ee4a30e740d71be8/Pods/Fusuma/Sources/Assets.xcassets/ic_photo_camera.imageset/ic_photo_camera_white_36pt_3x.png -------------------------------------------------------------------------------- /Pods/Fusuma/Sources/Assets.xcassets/ic_radio_button_checked.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "ic_radio_button_checked_white_24px.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "ic_radio_button_checked_white_24px@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "ic_radio_button_checked_white_24px@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Pods/Fusuma/Sources/Assets.xcassets/ic_radio_button_checked.imageset/ic_radio_button_checked_white_24px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankit0812/CustomCamera/05a74c830a70e373f3c93aa6ee4a30e740d71be8/Pods/Fusuma/Sources/Assets.xcassets/ic_radio_button_checked.imageset/ic_radio_button_checked_white_24px.png -------------------------------------------------------------------------------- /Pods/Fusuma/Sources/Assets.xcassets/ic_radio_button_checked.imageset/ic_radio_button_checked_white_24px@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankit0812/CustomCamera/05a74c830a70e373f3c93aa6ee4a30e740d71be8/Pods/Fusuma/Sources/Assets.xcassets/ic_radio_button_checked.imageset/ic_radio_button_checked_white_24px@2x.png -------------------------------------------------------------------------------- /Pods/Fusuma/Sources/Assets.xcassets/ic_radio_button_checked.imageset/ic_radio_button_checked_white_24px@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankit0812/CustomCamera/05a74c830a70e373f3c93aa6ee4a30e740d71be8/Pods/Fusuma/Sources/Assets.xcassets/ic_radio_button_checked.imageset/ic_radio_button_checked_white_24px@3x.png -------------------------------------------------------------------------------- /Pods/Fusuma/Sources/Assets.xcassets/ic_videocam.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "ic_videocam_white_36dp.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "ic_videocam_white_36dp-1.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "ic_videocam_white_36dp-2.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Pods/Fusuma/Sources/Assets.xcassets/ic_videocam.imageset/ic_videocam_white_36dp-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankit0812/CustomCamera/05a74c830a70e373f3c93aa6ee4a30e740d71be8/Pods/Fusuma/Sources/Assets.xcassets/ic_videocam.imageset/ic_videocam_white_36dp-1.png -------------------------------------------------------------------------------- /Pods/Fusuma/Sources/Assets.xcassets/ic_videocam.imageset/ic_videocam_white_36dp-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankit0812/CustomCamera/05a74c830a70e373f3c93aa6ee4a30e740d71be8/Pods/Fusuma/Sources/Assets.xcassets/ic_videocam.imageset/ic_videocam_white_36dp-2.png -------------------------------------------------------------------------------- /Pods/Fusuma/Sources/Assets.xcassets/ic_videocam.imageset/ic_videocam_white_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankit0812/CustomCamera/05a74c830a70e373f3c93aa6ee4a30e740d71be8/Pods/Fusuma/Sources/Assets.xcassets/ic_videocam.imageset/ic_videocam_white_36dp.png -------------------------------------------------------------------------------- /Pods/Fusuma/Sources/Assets.xcassets/shutter_button.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "ic_radio_button_checked_white_24px.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "ic_radio_button_checked_white_24px@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "ic_radio_button_checked_white_24px@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Pods/Fusuma/Sources/Assets.xcassets/shutter_button.imageset/ic_radio_button_checked_white_24px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankit0812/CustomCamera/05a74c830a70e373f3c93aa6ee4a30e740d71be8/Pods/Fusuma/Sources/Assets.xcassets/shutter_button.imageset/ic_radio_button_checked_white_24px.png -------------------------------------------------------------------------------- /Pods/Fusuma/Sources/Assets.xcassets/shutter_button.imageset/ic_radio_button_checked_white_24px@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankit0812/CustomCamera/05a74c830a70e373f3c93aa6ee4a30e740d71be8/Pods/Fusuma/Sources/Assets.xcassets/shutter_button.imageset/ic_radio_button_checked_white_24px@2x.png -------------------------------------------------------------------------------- /Pods/Fusuma/Sources/Assets.xcassets/shutter_button.imageset/ic_radio_button_checked_white_24px@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankit0812/CustomCamera/05a74c830a70e373f3c93aa6ee4a30e740d71be8/Pods/Fusuma/Sources/Assets.xcassets/shutter_button.imageset/ic_radio_button_checked_white_24px@3x.png -------------------------------------------------------------------------------- /Pods/Fusuma/Sources/Assets.xcassets/video_button.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "button copy 2.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "button copy.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "button.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | }, 23 | "properties" : { 24 | "template-rendering-intent" : "original" 25 | } 26 | } -------------------------------------------------------------------------------- /Pods/Fusuma/Sources/Assets.xcassets/video_button.imageset/button copy 2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankit0812/CustomCamera/05a74c830a70e373f3c93aa6ee4a30e740d71be8/Pods/Fusuma/Sources/Assets.xcassets/video_button.imageset/button copy 2.png -------------------------------------------------------------------------------- /Pods/Fusuma/Sources/Assets.xcassets/video_button.imageset/button copy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankit0812/CustomCamera/05a74c830a70e373f3c93aa6ee4a30e740d71be8/Pods/Fusuma/Sources/Assets.xcassets/video_button.imageset/button copy.png -------------------------------------------------------------------------------- /Pods/Fusuma/Sources/Assets.xcassets/video_button.imageset/button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankit0812/CustomCamera/05a74c830a70e373f3c93aa6ee4a30e740d71be8/Pods/Fusuma/Sources/Assets.xcassets/video_button.imageset/button.png -------------------------------------------------------------------------------- /Pods/Fusuma/Sources/Assets.xcassets/video_button_rec.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "button_recording copy 2.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "button_recording copy.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "button_recording.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | }, 23 | "properties" : { 24 | "template-rendering-intent" : "original" 25 | } 26 | } -------------------------------------------------------------------------------- /Pods/Fusuma/Sources/Assets.xcassets/video_button_rec.imageset/button_recording copy 2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankit0812/CustomCamera/05a74c830a70e373f3c93aa6ee4a30e740d71be8/Pods/Fusuma/Sources/Assets.xcassets/video_button_rec.imageset/button_recording copy 2.png -------------------------------------------------------------------------------- /Pods/Fusuma/Sources/Assets.xcassets/video_button_rec.imageset/button_recording copy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankit0812/CustomCamera/05a74c830a70e373f3c93aa6ee4a30e740d71be8/Pods/Fusuma/Sources/Assets.xcassets/video_button_rec.imageset/button_recording copy.png -------------------------------------------------------------------------------- /Pods/Fusuma/Sources/Assets.xcassets/video_button_rec.imageset/button_recording.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ankit0812/CustomCamera/05a74c830a70e373f3c93aa6ee4a30e740d71be8/Pods/Fusuma/Sources/Assets.xcassets/video_button_rec.imageset/button_recording.png -------------------------------------------------------------------------------- /Pods/Fusuma/Sources/FSAlbumView.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 84 | 85 | 86 | -------------------------------------------------------------------------------- /Pods/Fusuma/Sources/FSAlbumViewCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // FSAlbumViewCell.swift 3 | // Fusuma 4 | // 5 | // Created by Yuta Akizuki on 2015/11/14. 6 | // Copyright © 2015年 ytakzk. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import Photos 11 | 12 | final class FSAlbumViewCell: UICollectionViewCell { 13 | 14 | @IBOutlet weak var imageView: UIImageView! 15 | 16 | var image: UIImage? { 17 | 18 | didSet { 19 | 20 | self.imageView.image = image 21 | } 22 | } 23 | 24 | override func awakeFromNib() { 25 | super.awakeFromNib() 26 | self.isSelected = false 27 | } 28 | 29 | override var isSelected : Bool { 30 | didSet { 31 | self.layer.borderColor = isSelected ? fusumaTintColor.cgColor : UIColor.clear.cgColor 32 | self.layer.borderWidth = isSelected ? 2 : 0 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Pods/Fusuma/Sources/FSAlbumViewCell.xib: -------------------------------------------------------------------------------- 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 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /Pods/Fusuma/Sources/FSCameraView.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | -------------------------------------------------------------------------------- /Pods/Fusuma/Sources/FSConstants.swift: -------------------------------------------------------------------------------- 1 | // 2 | // FSConstants.swift 3 | // Fusuma 4 | // 5 | // Created by Yuta Akizuki on 2015/08/31. 6 | // Copyright © 2015年 ytakzk. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | // Extension 12 | internal extension UIColor { 13 | 14 | class func hex (_ hexStr : NSString, alpha : CGFloat) -> UIColor { 15 | 16 | let realHexStr = hexStr.replacingOccurrences(of: "#", with: "") 17 | let scanner = Scanner(string: realHexStr as String) 18 | var color: UInt32 = 0 19 | if scanner.scanHexInt32(&color) { 20 | let r = CGFloat((color & 0xFF0000) >> 16) / 255.0 21 | let g = CGFloat((color & 0x00FF00) >> 8) / 255.0 22 | let b = CGFloat(color & 0x0000FF) / 255.0 23 | return UIColor(red:r,green:g,blue:b,alpha:alpha) 24 | } else { 25 | print("invalid hex string", terminator: "") 26 | return UIColor.white 27 | } 28 | } 29 | } 30 | 31 | extension UIView { 32 | 33 | func addBottomBorder(_ color: UIColor, width: CGFloat) { 34 | let border = CALayer() 35 | border.borderColor = color.cgColor 36 | border.frame = CGRect(x: 0, y: self.frame.size.height - width, width: self.frame.size.width, height: width) 37 | border.borderWidth = width 38 | self.layer.addSublayer(border) 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /Pods/Fusuma/Sources/FSImageCropView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // FZImageCropView.swift 3 | // Fusuma 4 | // 5 | // Created by Yuta Akizuki on 2015/11/16. 6 | // Copyright © 2015年 ytakzk. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | final class FSImageCropView: UIScrollView, UIScrollViewDelegate { 12 | 13 | var imageView = UIImageView() 14 | 15 | var imageSize: CGSize? 16 | 17 | var image: UIImage! = nil { 18 | 19 | didSet { 20 | 21 | if image != nil { 22 | 23 | if !imageView.isDescendant(of: self) { 24 | self.imageView.alpha = 1.0 25 | self.addSubview(imageView) 26 | } 27 | 28 | } else { 29 | 30 | imageView.image = nil 31 | return 32 | } 33 | 34 | if !fusumaCropImage { 35 | // Disable scroll view and set image to fit in view 36 | imageView.frame = self.frame 37 | imageView.contentMode = .scaleAspectFit 38 | self.isUserInteractionEnabled = false 39 | 40 | imageView.image = image 41 | return 42 | } 43 | 44 | let imageSize = self.imageSize ?? image.size 45 | 46 | let ratioW = frame.width / imageSize.width // 400 / 1000 => 0.4 47 | let ratioH = frame.height / imageSize.height // 300 / 500 => 0.6 48 | 49 | if ratioH > ratioW { 50 | imageView.frame = CGRect( 51 | origin: CGPoint.zero, 52 | size: CGSize(width: imageSize.width * ratioH, height: frame.height) 53 | ) 54 | } else { 55 | imageView.frame = CGRect( 56 | origin: CGPoint.zero, 57 | size: CGSize(width: frame.width, height: imageSize.height * ratioW) 58 | ) 59 | } 60 | 61 | self.contentOffset = CGPoint( 62 | x: imageView.center.x - self.center.x, 63 | y: imageView.center.y - self.center.y 64 | ) 65 | 66 | self.contentSize = CGSize(width: imageView.frame.width + 1, height: imageView.frame.height + 1) 67 | 68 | imageView.image = image 69 | 70 | self.zoomScale = 1.0 71 | 72 | } 73 | 74 | } 75 | 76 | required init?(coder aDecoder: NSCoder) { 77 | 78 | super.init(coder: aDecoder)! 79 | 80 | self.backgroundColor = fusumaBackgroundColor 81 | self.frame.size = CGSize.zero 82 | self.clipsToBounds = true 83 | self.imageView.alpha = 0.0 84 | 85 | imageView.frame = CGRect(origin: CGPoint.zero, size: CGSize.zero) 86 | 87 | self.maximumZoomScale = 2.0 88 | self.minimumZoomScale = 0.8 89 | self.showsHorizontalScrollIndicator = false 90 | self.showsVerticalScrollIndicator = false 91 | self.bouncesZoom = true 92 | self.bounces = true 93 | self.scrollsToTop = false 94 | 95 | self.delegate = self 96 | } 97 | 98 | 99 | func changeScrollable(_ isScrollable: Bool) { 100 | 101 | self.isScrollEnabled = isScrollable 102 | } 103 | 104 | // MARK: UIScrollViewDelegate Protocol 105 | func viewForZooming(in scrollView: UIScrollView) -> UIView? { 106 | 107 | return imageView 108 | 109 | } 110 | 111 | func scrollViewDidZoom(_ scrollView: UIScrollView) { 112 | 113 | let boundsSize = scrollView.bounds.size 114 | var contentsFrame = imageView.frame 115 | 116 | if contentsFrame.size.width < boundsSize.width { 117 | 118 | contentsFrame.origin.x = (boundsSize.width - contentsFrame.size.width) / 2.0 119 | 120 | } else { 121 | contentsFrame.origin.x = 0.0 122 | } 123 | 124 | if contentsFrame.size.height < boundsSize.height { 125 | 126 | contentsFrame.origin.y = (boundsSize.height - contentsFrame.size.height) / 2.0 127 | } else { 128 | 129 | contentsFrame.origin.y = 0.0 130 | } 131 | 132 | imageView.frame = contentsFrame 133 | 134 | } 135 | 136 | func scrollViewDidEndZooming(_ scrollView: UIScrollView, with view: UIView?, atScale scale: CGFloat) { 137 | 138 | self.contentSize = CGSize(width: imageView.frame.width + 1, height: imageView.frame.height + 1) 139 | } 140 | 141 | } 142 | -------------------------------------------------------------------------------- /Pods/Fusuma/Sources/FSVideoCameraView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // FSVideoCameraView.swift 3 | // Fusuma 4 | // 5 | // Created by Brendan Kirchner on 3/18/16. 6 | // Copyright © 2016 CocoaPods. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import AVFoundation 11 | 12 | @objc protocol FSVideoCameraViewDelegate: class { 13 | func videoFinished(withFileURL fileURL: URL) 14 | } 15 | 16 | final class FSVideoCameraView: UIView { 17 | 18 | @IBOutlet weak var previewViewContainer: UIView! 19 | @IBOutlet weak var shotButton: UIButton! 20 | @IBOutlet weak var flashButton: UIButton! 21 | @IBOutlet weak var flipButton: UIButton! 22 | 23 | weak var delegate: FSVideoCameraViewDelegate? = nil 24 | 25 | var session: AVCaptureSession? 26 | var device: AVCaptureDevice? 27 | var videoInput: AVCaptureDeviceInput? 28 | var videoOutput: AVCaptureMovieFileOutput? 29 | var focusView: UIView? 30 | 31 | var flashOffImage: UIImage? 32 | var flashOnImage: UIImage? 33 | var videoStartImage: UIImage? 34 | var videoStopImage: UIImage? 35 | 36 | 37 | fileprivate var isRecording = false 38 | 39 | static func instance() -> FSVideoCameraView { 40 | 41 | return UINib(nibName: "FSVideoCameraView", bundle: Bundle(for: self.classForCoder())).instantiate(withOwner: self, options: nil)[0] as! FSVideoCameraView 42 | } 43 | 44 | func initialize() { 45 | 46 | if session != nil { 47 | 48 | return 49 | } 50 | 51 | self.backgroundColor = fusumaBackgroundColor 52 | 53 | self.isHidden = false 54 | 55 | // AVCapture 56 | session = AVCaptureSession() 57 | 58 | for device in AVCaptureDevice.devices() { 59 | 60 | if let device = device as? AVCaptureDevice , device.position == AVCaptureDevicePosition.back { 61 | 62 | self.device = device 63 | } 64 | } 65 | 66 | do { 67 | 68 | if let session = session { 69 | 70 | videoInput = try AVCaptureDeviceInput(device: device) 71 | 72 | session.addInput(videoInput) 73 | 74 | videoOutput = AVCaptureMovieFileOutput() 75 | let totalSeconds = 60.0 //Total Seconds of capture time 76 | let timeScale: Int32 = 30 //FPS 77 | 78 | let maxDuration = CMTimeMakeWithSeconds(totalSeconds, timeScale) 79 | 80 | videoOutput?.maxRecordedDuration = maxDuration 81 | videoOutput?.minFreeDiskSpaceLimit = 1024 * 1024 //SET MIN FREE SPACE IN BYTES FOR RECORDING TO CONTINUE ON A VOLUME 82 | 83 | if session.canAddOutput(videoOutput) { 84 | session.addOutput(videoOutput) 85 | } 86 | 87 | let videoLayer = AVCaptureVideoPreviewLayer(session: session) 88 | videoLayer?.frame = self.previewViewContainer.bounds 89 | videoLayer?.videoGravity = AVLayerVideoGravityResizeAspectFill 90 | 91 | self.previewViewContainer.layer.addSublayer(videoLayer!) 92 | 93 | session.startRunning() 94 | 95 | } 96 | 97 | // Focus View 98 | self.focusView = UIView(frame: CGRect(x: 0, y: 0, width: 90, height: 90)) 99 | let tapRecognizer = UITapGestureRecognizer(target: self, action: #selector(FSVideoCameraView.focus(_:))) 100 | self.previewViewContainer.addGestureRecognizer(tapRecognizer) 101 | 102 | } catch { 103 | 104 | } 105 | 106 | 107 | let bundle = Bundle(for: self.classForCoder) 108 | 109 | flashOnImage = fusumaFlashOnImage != nil ? fusumaFlashOnImage : UIImage(named: "ic_flash_on", in: bundle, compatibleWith: nil) 110 | flashOffImage = fusumaFlashOffImage != nil ? fusumaFlashOffImage : UIImage(named: "ic_flash_off", in: bundle, compatibleWith: nil) 111 | let flipImage = fusumaFlipImage != nil ? fusumaFlipImage : UIImage(named: "ic_loop", in: bundle, compatibleWith: nil) 112 | videoStartImage = fusumaVideoStartImage != nil ? fusumaVideoStartImage : UIImage(named: "video_button", in: bundle, compatibleWith: nil) 113 | videoStopImage = fusumaVideoStopImage != nil ? fusumaVideoStopImage : UIImage(named: "video_button_rec", in: bundle, compatibleWith: nil) 114 | 115 | 116 | if(fusumaTintIcons) { 117 | flashButton.tintColor = fusumaBaseTintColor 118 | flipButton.tintColor = fusumaBaseTintColor 119 | shotButton.tintColor = fusumaBaseTintColor 120 | 121 | flashButton.setImage(flashOffImage?.withRenderingMode(.alwaysTemplate), for: UIControlState()) 122 | flipButton.setImage(flipImage?.withRenderingMode(.alwaysTemplate), for: UIControlState()) 123 | shotButton.setImage(videoStartImage?.withRenderingMode(.alwaysTemplate), for: UIControlState()) 124 | } else { 125 | flashButton.setImage(flashOffImage, for: UIControlState()) 126 | flipButton.setImage(flipImage, for: UIControlState()) 127 | shotButton.setImage(videoStartImage, for: UIControlState()) 128 | } 129 | 130 | flashConfiguration() 131 | 132 | self.startCamera() 133 | } 134 | 135 | deinit { 136 | 137 | NotificationCenter.default.removeObserver(self) 138 | } 139 | 140 | func startCamera() { 141 | 142 | let status = AVCaptureDevice.authorizationStatus(forMediaType: AVMediaTypeVideo) 143 | 144 | if status == AVAuthorizationStatus.authorized { 145 | 146 | session?.startRunning() 147 | 148 | } else if status == AVAuthorizationStatus.denied || status == AVAuthorizationStatus.restricted { 149 | 150 | session?.stopRunning() 151 | } 152 | } 153 | 154 | func stopCamera() { 155 | if self.isRecording { 156 | self.toggleRecording() 157 | } 158 | session?.stopRunning() 159 | } 160 | 161 | @IBAction func shotButtonPressed(_ sender: UIButton) { 162 | 163 | self.toggleRecording() 164 | } 165 | 166 | fileprivate func toggleRecording() { 167 | guard let videoOutput = videoOutput else { 168 | return 169 | } 170 | 171 | self.isRecording = !self.isRecording 172 | 173 | let shotImage: UIImage? 174 | if self.isRecording { 175 | shotImage = videoStopImage 176 | } else { 177 | shotImage = videoStartImage 178 | } 179 | self.shotButton.setImage(shotImage, for: UIControlState()) 180 | 181 | if self.isRecording { 182 | let outputPath = "\(NSTemporaryDirectory())output.mov" 183 | let outputURL = URL(fileURLWithPath: outputPath) 184 | 185 | let fileManager = FileManager.default 186 | if fileManager.fileExists(atPath: outputPath) { 187 | do { 188 | try fileManager.removeItem(atPath: outputPath) 189 | } catch { 190 | print("error removing item at path: \(outputPath)") 191 | self.isRecording = false 192 | return 193 | } 194 | } 195 | self.flipButton.isEnabled = false 196 | self.flashButton.isEnabled = false 197 | videoOutput.startRecording(toOutputFileURL: outputURL, recordingDelegate: self) 198 | } else { 199 | videoOutput.stopRecording() 200 | self.flipButton.isEnabled = true 201 | self.flashButton.isEnabled = true 202 | } 203 | return 204 | } 205 | 206 | @IBAction func flipButtonPressed(_ sender: UIButton) { 207 | 208 | session?.stopRunning() 209 | 210 | do { 211 | 212 | session?.beginConfiguration() 213 | 214 | if let session = session { 215 | 216 | for input in session.inputs { 217 | 218 | session.removeInput(input as! AVCaptureInput) 219 | } 220 | 221 | let position = (videoInput?.device.position == AVCaptureDevicePosition.front) ? AVCaptureDevicePosition.back : AVCaptureDevicePosition.front 222 | 223 | for device in AVCaptureDevice.devices(withMediaType: AVMediaTypeVideo) { 224 | 225 | if let device = device as? AVCaptureDevice , device.position == position { 226 | 227 | videoInput = try AVCaptureDeviceInput(device: device) 228 | session.addInput(videoInput) 229 | 230 | } 231 | } 232 | 233 | } 234 | 235 | session?.commitConfiguration() 236 | 237 | 238 | } catch { 239 | 240 | } 241 | 242 | session?.startRunning() 243 | } 244 | 245 | @IBAction func flashButtonPressed(_ sender: UIButton) { 246 | 247 | do { 248 | 249 | if let device = device { 250 | 251 | try device.lockForConfiguration() 252 | 253 | let mode = device.flashMode 254 | 255 | if mode == AVCaptureFlashMode.off { 256 | 257 | device.flashMode = AVCaptureFlashMode.on 258 | flashButton.setImage(flashOnImage, for: UIControlState()) 259 | 260 | } else if mode == AVCaptureFlashMode.on { 261 | 262 | device.flashMode = AVCaptureFlashMode.off 263 | flashButton.setImage(flashOffImage, for: UIControlState()) 264 | } 265 | 266 | device.unlockForConfiguration() 267 | 268 | } 269 | 270 | } catch _ { 271 | 272 | flashButton.setImage(flashOffImage, for: UIControlState()) 273 | return 274 | } 275 | 276 | } 277 | 278 | } 279 | 280 | extension FSVideoCameraView: AVCaptureFileOutputRecordingDelegate { 281 | 282 | func capture(_ captureOutput: AVCaptureFileOutput!, didStartRecordingToOutputFileAt fileURL: URL!, fromConnections connections: [Any]!) { 283 | print("started recording to: \(fileURL)") 284 | } 285 | 286 | func capture(_ captureOutput: AVCaptureFileOutput!, didFinishRecordingToOutputFileAt outputFileURL: URL!, fromConnections connections: [Any]!, error: Error!) { 287 | print("finished recording to: \(outputFileURL)") 288 | self.delegate?.videoFinished(withFileURL: outputFileURL) 289 | } 290 | 291 | } 292 | 293 | extension FSVideoCameraView { 294 | 295 | func focus(_ recognizer: UITapGestureRecognizer) { 296 | 297 | let point = recognizer.location(in: self) 298 | let viewsize = self.bounds.size 299 | let newPoint = CGPoint(x: point.y/viewsize.height, y: 1.0-point.x/viewsize.width) 300 | 301 | let device = AVCaptureDevice.defaultDevice(withMediaType: AVMediaTypeVideo) 302 | 303 | do { 304 | 305 | try device?.lockForConfiguration() 306 | 307 | } catch _ { 308 | 309 | return 310 | } 311 | 312 | if device?.isFocusModeSupported(AVCaptureFocusMode.autoFocus) == true { 313 | 314 | device?.focusMode = AVCaptureFocusMode.autoFocus 315 | device?.focusPointOfInterest = newPoint 316 | } 317 | 318 | if device?.isExposureModeSupported(AVCaptureExposureMode.continuousAutoExposure) == true { 319 | 320 | device?.exposureMode = AVCaptureExposureMode.continuousAutoExposure 321 | device?.exposurePointOfInterest = newPoint 322 | } 323 | 324 | device?.unlockForConfiguration() 325 | 326 | self.focusView?.alpha = 0.0 327 | self.focusView?.center = point 328 | self.focusView?.backgroundColor = UIColor.clear 329 | self.focusView?.layer.borderColor = UIColor.white.cgColor 330 | self.focusView?.layer.borderWidth = 1.0 331 | self.focusView!.transform = CGAffineTransform(scaleX: 1.0, y: 1.0) 332 | self.addSubview(self.focusView!) 333 | 334 | UIView.animate(withDuration: 0.8, delay: 0.0, usingSpringWithDamping: 0.8, 335 | initialSpringVelocity: 3.0, options: UIViewAnimationOptions.curveEaseIn, // UIViewAnimationOptions.BeginFromCurrentState 336 | animations: { 337 | self.focusView!.alpha = 1.0 338 | self.focusView!.transform = CGAffineTransform(scaleX: 0.7, y: 0.7) 339 | }, completion: {(finished) in 340 | self.focusView!.transform = CGAffineTransform(scaleX: 1.0, y: 1.0) 341 | self.focusView!.removeFromSuperview() 342 | }) 343 | } 344 | 345 | func flashConfiguration() { 346 | 347 | do { 348 | 349 | if let device = device { 350 | 351 | try device.lockForConfiguration() 352 | 353 | device.flashMode = AVCaptureFlashMode.off 354 | flashButton.setImage(flashOffImage, for: UIControlState()) 355 | 356 | device.unlockForConfiguration() 357 | 358 | } 359 | 360 | } catch _ { 361 | 362 | return 363 | } 364 | } 365 | } 366 | -------------------------------------------------------------------------------- /Pods/Fusuma/Sources/FSVideoCameraView.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | -------------------------------------------------------------------------------- /Pods/Fusuma/Sources/FusumaViewController.swift.orig: -------------------------------------------------------------------------------- 1 | // 2 | // FusumaViewController.swift 3 | // Fusuma 4 | // 5 | // Created by Yuta Akizuki on 2015/11/14. 6 | // Copyright © 2015年 ytakzk. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @objc public protocol FusumaDelegate: class { 12 | 13 | func fusumaImageSelected(image: UIImage) 14 | optional func fusumaDismissedWithImage(image: UIImage) 15 | func fusumaVideoCompleted(withFileURL fileURL: NSURL) 16 | func fusumaCameraRollUnauthorized() 17 | 18 | optional func fusumaClosed() 19 | } 20 | 21 | public var fusumaBaseTintColor = UIColor.hex("#FFFFFF", alpha: 1.0) 22 | public var fusumaTintColor = UIColor.hex("#009688", alpha: 1.0) 23 | public var fusumaBackgroundColor = UIColor.hex("#212121", alpha: 1.0) 24 | 25 | <<<<<<< HEAD 26 | public var fusumaCropImage: Bool = true 27 | 28 | ======= 29 | public var fusumaAlbumImage : UIImage? = nil 30 | public var fusumaCameraImage : UIImage? = nil 31 | public var fusumaVideoImage : UIImage? = nil 32 | public var fusumaCheckImage : UIImage? = nil 33 | public var fusumaCloseImage : UIImage? = nil 34 | public var fusumaFlashOnImage : UIImage? = nil 35 | public var fusumaFlashOffImage : UIImage? = nil 36 | public var fusumaFlipImage : UIImage? = nil 37 | public var fusumaShotImage : UIImage? = nil 38 | >>>>>>> upstream/master 39 | 40 | public var fusumaVideoStartImage : UIImage? = nil 41 | public var fusumaVideoStopImage : UIImage? = nil 42 | 43 | 44 | public var fusumaCameraRollTitle = "CAMERA ROLL" 45 | public var fusumaCameraTitle = "PHOTO" 46 | public var fusumaVideoTitle = "VIDEO" 47 | 48 | public var fusumaTintIcons : Bool = true 49 | 50 | public enum FusumaModeOrder { 51 | case CameraFirst 52 | case LibraryFirst 53 | } 54 | 55 | //@objc public class FusumaViewController: UIViewController, FSCameraViewDelegate, FSAlbumViewDelegate { 56 | public final class FusumaViewController: UIViewController { 57 | 58 | enum Mode { 59 | case Camera 60 | case Library 61 | case Video 62 | } 63 | 64 | var mode: Mode = Mode.Camera 65 | public var modeOrder: FusumaModeOrder = .LibraryFirst 66 | var willFilter = true 67 | 68 | @IBOutlet weak var photoLibraryViewerContainer: UIView! 69 | @IBOutlet weak var cameraShotContainer: UIView! 70 | @IBOutlet weak var videoShotContainer: UIView! 71 | 72 | @IBOutlet weak var titleLabel: UILabel! 73 | @IBOutlet weak var menuView: UIView! 74 | @IBOutlet weak var closeButton: UIButton! 75 | @IBOutlet weak var libraryButton: UIButton! 76 | @IBOutlet weak var cameraButton: UIButton! 77 | @IBOutlet weak var videoButton: UIButton! 78 | @IBOutlet weak var doneButton: UIButton! 79 | 80 | @IBOutlet var libraryFirstConstraints: [NSLayoutConstraint]! 81 | @IBOutlet var cameraFirstConstraints: [NSLayoutConstraint]! 82 | 83 | var albumView = FSAlbumView.instance() 84 | var cameraView = FSCameraView.instance() 85 | var videoView = FSVideoCameraView.instance() 86 | 87 | public weak var delegate: FusumaDelegate? = nil 88 | 89 | override public func loadView() { 90 | 91 | if let view = UINib(nibName: "FusumaViewController", bundle: NSBundle(forClass: self.classForCoder)).instantiateWithOwner(self, options: nil).first as? UIView { 92 | 93 | self.view = view 94 | } 95 | } 96 | 97 | override public func viewDidLoad() { 98 | super.viewDidLoad() 99 | 100 | self.view.backgroundColor = fusumaBackgroundColor 101 | 102 | cameraView.delegate = self 103 | albumView.delegate = self 104 | videoView.delegate = self 105 | 106 | menuView.backgroundColor = fusumaBackgroundColor 107 | menuView.addBottomBorder(UIColor.blackColor(), width: 1.0) 108 | 109 | let bundle = NSBundle(forClass: self.classForCoder) 110 | 111 | // Get the custom button images if they're set 112 | let albumImage = fusumaAlbumImage != nil ? fusumaAlbumImage : UIImage(named: "ic_insert_photo", inBundle: bundle, compatibleWithTraitCollection: nil) 113 | let cameraImage = fusumaCameraImage != nil ? fusumaCameraImage : UIImage(named: "ic_photo_camera", inBundle: bundle, compatibleWithTraitCollection: nil) 114 | 115 | let videoImage = fusumaVideoImage != nil ? fusumaVideoImage : UIImage(named: "ic_videocam", inBundle: bundle, compatibleWithTraitCollection: nil) 116 | 117 | 118 | let checkImage = fusumaCheckImage != nil ? fusumaCheckImage : UIImage(named: "ic_check", inBundle: bundle, compatibleWithTraitCollection: nil) 119 | let closeImage = fusumaCloseImage != nil ? fusumaCloseImage : UIImage(named: "ic_close", inBundle: bundle, compatibleWithTraitCollection: nil) 120 | 121 | if(fusumaTintIcons) { 122 | libraryButton.setImage(albumImage?.imageWithRenderingMode(.AlwaysTemplate), forState: .Normal) 123 | libraryButton.setImage(albumImage?.imageWithRenderingMode(.AlwaysTemplate), forState: .Highlighted) 124 | libraryButton.setImage(albumImage?.imageWithRenderingMode(.AlwaysTemplate), forState: .Selected) 125 | libraryButton.tintColor = fusumaTintColor 126 | libraryButton.adjustsImageWhenHighlighted = false 127 | 128 | cameraButton.setImage(cameraImage?.imageWithRenderingMode(.AlwaysTemplate), forState: .Normal) 129 | cameraButton.setImage(cameraImage?.imageWithRenderingMode(.AlwaysTemplate), forState: .Highlighted) 130 | cameraButton.setImage(cameraImage?.imageWithRenderingMode(.AlwaysTemplate), forState: .Selected) 131 | cameraButton.tintColor = fusumaTintColor 132 | cameraButton.adjustsImageWhenHighlighted = false 133 | 134 | closeButton.setImage(closeImage?.imageWithRenderingMode(.AlwaysTemplate), forState: .Normal) 135 | closeButton.setImage(closeImage?.imageWithRenderingMode(.AlwaysTemplate), forState: .Highlighted) 136 | closeButton.setImage(closeImage?.imageWithRenderingMode(.AlwaysTemplate), forState: .Selected) 137 | closeButton.tintColor = fusumaBaseTintColor 138 | 139 | videoButton.setImage(videoImage, forState: .Normal) 140 | videoButton.setImage(videoImage, forState: .Highlighted) 141 | videoButton.setImage(videoImage, forState: .Selected) 142 | videoButton.tintColor = fusumaTintColor 143 | videoButton.adjustsImageWhenHighlighted = false 144 | 145 | doneButton.setImage(checkImage?.imageWithRenderingMode(.AlwaysTemplate), forState: .Normal) 146 | doneButton.tintColor = fusumaBaseTintColor 147 | 148 | } else { 149 | libraryButton.setImage(albumImage, forState: .Normal) 150 | libraryButton.setImage(albumImage, forState: .Highlighted) 151 | libraryButton.setImage(albumImage, forState: .Selected) 152 | libraryButton.tintColor = nil 153 | 154 | cameraButton.setImage(cameraImage, forState: .Normal) 155 | cameraButton.setImage(cameraImage, forState: .Highlighted) 156 | cameraButton.setImage(cameraImage, forState: .Selected) 157 | cameraButton.tintColor = nil 158 | 159 | videoButton.setImage(videoImage, forState: .Normal) 160 | videoButton.setImage(videoImage, forState: .Highlighted) 161 | videoButton.setImage(videoImage, forState: .Selected) 162 | videoButton.tintColor = nil 163 | 164 | closeButton.setImage(closeImage, forState: .Normal) 165 | doneButton.setImage(checkImage, forState: .Normal) 166 | } 167 | 168 | cameraButton.clipsToBounds = true 169 | libraryButton.clipsToBounds = true 170 | videoButton.clipsToBounds = true 171 | 172 | changeMode(Mode.Library) 173 | 174 | photoLibraryViewerContainer.addSubview(albumView) 175 | cameraShotContainer.addSubview(cameraView) 176 | videoShotContainer.addSubview(videoView) 177 | 178 | titleLabel.textColor = fusumaBaseTintColor 179 | 180 | // if modeOrder != .LibraryFirst { 181 | // libraryFirstConstraints.forEach { $0.priority = 250 } 182 | // cameraFirstConstraints.forEach { $0.priority = 1000 } 183 | // } 184 | } 185 | 186 | override public func viewWillAppear(animated: Bool) { 187 | super.viewWillAppear(animated) 188 | 189 | } 190 | 191 | override public func viewDidAppear(animated: Bool) { 192 | super.viewDidAppear(animated) 193 | 194 | albumView.frame = CGRect(origin: CGPointZero, size: photoLibraryViewerContainer.frame.size) 195 | albumView.layoutIfNeeded() 196 | cameraView.frame = CGRect(origin: CGPointZero, size: cameraShotContainer.frame.size) 197 | cameraView.layoutIfNeeded() 198 | videoView.frame = CGRect(origin: CGPointZero, size: videoShotContainer.frame.size) 199 | videoView.layoutIfNeeded() 200 | 201 | albumView.initialize() 202 | cameraView.initialize() 203 | videoView.initialize() 204 | } 205 | 206 | public override func viewWillDisappear(animated: Bool) { 207 | super.viewWillDisappear(animated) 208 | self.stopAll() 209 | } 210 | 211 | override public func prefersStatusBarHidden() -> Bool { 212 | 213 | return true 214 | } 215 | 216 | @IBAction func closeButtonPressed(sender: UIButton) { 217 | self.dismissViewControllerAnimated(true, completion: { 218 | 219 | self.delegate?.fusumaClosed?() 220 | }) 221 | } 222 | 223 | @IBAction func libraryButtonPressed(sender: UIButton) { 224 | 225 | changeMode(Mode.Library) 226 | } 227 | 228 | @IBAction func photoButtonPressed(sender: UIButton) { 229 | 230 | changeMode(Mode.Camera) 231 | } 232 | 233 | @IBAction func videoButtonPressed(sender: UIButton) { 234 | 235 | changeMode(Mode.Video) 236 | } 237 | 238 | @IBAction func doneButtonPressed(sender: UIButton) { 239 | 240 | let view = albumView.imageCropView 241 | let image:UIImage 242 | 243 | if fusumaCropImage { 244 | UIGraphicsBeginImageContextWithOptions(view.frame.size, true, 0) 245 | let context = UIGraphicsGetCurrentContext() 246 | CGContextTranslateCTM(context, -albumView.imageCropView.contentOffset.x, -albumView.imageCropView.contentOffset.y) 247 | view.layer.renderInContext(context!) 248 | image = UIGraphicsGetImageFromCurrentImageContext() 249 | UIGraphicsEndImageContext() 250 | } else { 251 | print("no image crop ") 252 | image = view.image 253 | } 254 | 255 | delegate?.fusumaImageSelected(image) 256 | 257 | self.dismissViewControllerAnimated(true, completion: { 258 | self.delegate?.fusumaDismissedWithImage?(image) 259 | }) 260 | } 261 | 262 | } 263 | 264 | extension FusumaViewController: FSAlbumViewDelegate, FSCameraViewDelegate, FSVideoCameraViewDelegate { 265 | 266 | // MARK: FSCameraViewDelegate 267 | func cameraShotFinished(image: UIImage) { 268 | 269 | delegate?.fusumaImageSelected(image) 270 | self.dismissViewControllerAnimated(true, completion: { 271 | 272 | self.delegate?.fusumaDismissedWithImage?(image) 273 | }) 274 | } 275 | 276 | // MARK: FSAlbumViewDelegate 277 | public func albumViewCameraRollUnauthorized() { 278 | delegate?.fusumaCameraRollUnauthorized() 279 | } 280 | 281 | func videoFinished(withFileURL fileURL: NSURL) { 282 | delegate?.fusumaVideoCompleted(withFileURL: fileURL) 283 | self.dismissViewControllerAnimated(true, completion: nil) 284 | } 285 | 286 | } 287 | 288 | private extension FusumaViewController { 289 | 290 | func stopAll() { 291 | self.videoView.stopCamera() 292 | self.cameraView.stopCamera() 293 | } 294 | 295 | func changeMode(mode: Mode) { 296 | 297 | if self.mode == mode { 298 | return 299 | } 300 | 301 | //operate this switch before changing mode to stop cameras 302 | switch self.mode { 303 | case .Library: 304 | break 305 | case .Camera: 306 | self.cameraView.stopCamera() 307 | case .Video: 308 | self.videoView.stopCamera() 309 | } 310 | 311 | self.mode = mode 312 | 313 | dishighlightButtons() 314 | 315 | switch mode { 316 | case .Library: 317 | titleLabel.text = NSLocalizedString(fusumaCameraRollTitle, comment: fusumaCameraRollTitle) 318 | doneButton.hidden = false 319 | 320 | highlightButton(libraryButton) 321 | self.view.bringSubviewToFront(photoLibraryViewerContainer) 322 | case .Camera: 323 | titleLabel.text = NSLocalizedString(fusumaCameraTitle, comment: fusumaCameraTitle) 324 | doneButton.hidden = true 325 | 326 | highlightButton(cameraButton) 327 | self.view.bringSubviewToFront(cameraShotContainer) 328 | cameraView.startCamera() 329 | case .Video: 330 | titleLabel.text = fusumaVideoTitle 331 | doneButton.hidden = true 332 | 333 | highlightButton(videoButton) 334 | self.view.bringSubviewToFront(videoShotContainer) 335 | videoView.startCamera() 336 | } 337 | self.view.bringSubviewToFront(menuView) 338 | } 339 | 340 | 341 | func dishighlightButtons() { 342 | cameraButton.tintColor = fusumaBaseTintColor 343 | libraryButton.tintColor = fusumaBaseTintColor 344 | videoButton.tintColor = fusumaBaseTintColor 345 | 346 | if cameraButton.layer.sublayers?.count > 1 { 347 | 348 | for layer in cameraButton.layer.sublayers! { 349 | 350 | if let borderColor = layer.borderColor where UIColor(CGColor: borderColor) == fusumaTintColor { 351 | 352 | layer.removeFromSuperlayer() 353 | } 354 | 355 | } 356 | } 357 | 358 | if libraryButton.layer.sublayers?.count > 1 { 359 | 360 | for layer in libraryButton.layer.sublayers! { 361 | 362 | if let borderColor = layer.borderColor where UIColor(CGColor: borderColor) == fusumaTintColor { 363 | 364 | layer.removeFromSuperlayer() 365 | } 366 | 367 | } 368 | } 369 | 370 | if videoButton.layer.sublayers?.count > 1 { 371 | 372 | for layer in videoButton.layer.sublayers! { 373 | 374 | if let borderColor = layer.borderColor where UIColor(CGColor: borderColor) == fusumaTintColor { 375 | 376 | layer.removeFromSuperlayer() 377 | } 378 | 379 | } 380 | } 381 | 382 | } 383 | 384 | func highlightButton(button: UIButton) { 385 | 386 | button.tintColor = fusumaTintColor 387 | 388 | button.addBottomBorder(fusumaTintColor, width: 3) 389 | } 390 | } 391 | -------------------------------------------------------------------------------- /Pods/Fusuma/Sources/FusumaViewController.xib: -------------------------------------------------------------------------------- 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 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 61 | 75 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 110 | 123 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | -------------------------------------------------------------------------------- /Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Fusuma (1.0.3) 3 | 4 | DEPENDENCIES: 5 | - Fusuma 6 | 7 | SPEC CHECKSUMS: 8 | Fusuma: 60ed1dd51a3b3610960219df9862c83f03304ce1 9 | 10 | PODFILE CHECKSUM: 2af4e82e6dfe1ba710e5e6fabe8166d627947fcd 11 | 12 | COCOAPODS: 1.1.1 13 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/kingpin.xcuserdatad/xcschemes/Fusuma.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 45 | 46 | 52 | 53 | 55 | 56 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/kingpin.xcuserdatad/xcschemes/Pods-CustomCamera.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 45 | 46 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 66 | 67 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/kingpin.xcuserdatad/xcschemes/Pods-CustomCameraTests.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 45 | 46 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 66 | 67 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/kingpin.xcuserdatad/xcschemes/Pods-CustomCameraUITests.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 45 | 46 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 66 | 67 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/kingpin.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Fusuma.xcscheme 8 | 9 | isShown 10 | 11 | 12 | Pods-CustomCamera.xcscheme 13 | 14 | isShown 15 | 16 | 17 | Pods-CustomCameraTests.xcscheme 18 | 19 | isShown 20 | 21 | 22 | Pods-CustomCameraUITests.xcscheme 23 | 24 | isShown 25 | 26 | 27 | 28 | SuppressBuildableAutocreation 29 | 30 | 3E0D8640A124012AB6F0A9F775A38285 31 | 32 | primary 33 | 34 | 35 | 54D877A5F196E39FCEE7E50D5B62883E 36 | 37 | primary 38 | 39 | 40 | 8867022DBD2E86234E1CFD1FD779A15A 41 | 42 | primary 43 | 44 | 45 | E7E246AEC5E77DADD48D6876B9BD7AE1 46 | 47 | primary 48 | 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Fusuma/Fusuma-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Fusuma : NSObject 3 | @end 4 | @implementation PodsDummy_Fusuma 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Fusuma/Fusuma-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Fusuma/Fusuma-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | 6 | FOUNDATION_EXPORT double FusumaVersionNumber; 7 | FOUNDATION_EXPORT const unsigned char FusumaVersionString[]; 8 | 9 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Fusuma/Fusuma.modulemap: -------------------------------------------------------------------------------- 1 | framework module Fusuma { 2 | umbrella header "Fusuma-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Fusuma/Fusuma.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/Fusuma 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" 4 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 5 | PODS_BUILD_DIR = $BUILD_DIR 6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 9 | SKIP_INSTALL = YES 10 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Fusuma/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 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.3 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-CustomCamera/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 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-CustomCamera/Pods-CustomCamera-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## Fusuma 5 | 6 | The MIT License (MIT) 7 | 8 | Copyright (c) 2016 ytakzk 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a copy 11 | of this software and associated documentation files (the "Software"), to deal 12 | in the Software without restriction, including without limitation the rights 13 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the Software is 15 | furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included in 18 | all copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 23 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 25 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 26 | SOFTWARE. 27 | 28 | Generated by CocoaPods - https://cocoapods.org 29 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-CustomCamera/Pods-CustomCamera-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | The MIT License (MIT) 18 | 19 | Copyright (c) 2016 ytakzk 20 | 21 | Permission is hereby granted, free of charge, to any person obtaining a copy 22 | of this software and associated documentation files (the "Software"), to deal 23 | in the Software without restriction, including without limitation the rights 24 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 25 | copies of the Software, and to permit persons to whom the Software is 26 | furnished to do so, subject to the following conditions: 27 | 28 | The above copyright notice and this permission notice shall be included in 29 | all copies or substantial portions of the Software. 30 | 31 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 32 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 33 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 34 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 35 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 36 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 37 | SOFTWARE. 38 | 39 | License 40 | MIT 41 | Title 42 | Fusuma 43 | Type 44 | PSGroupSpecifier 45 | 46 | 47 | FooterText 48 | Generated by CocoaPods - https://cocoapods.org 49 | Title 50 | 51 | Type 52 | PSGroupSpecifier 53 | 54 | 55 | StringsTable 56 | Acknowledgements 57 | Title 58 | Acknowledgements 59 | 60 | 61 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-CustomCamera/Pods-CustomCamera-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_CustomCamera : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_CustomCamera 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-CustomCamera/Pods-CustomCamera-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 5 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 6 | 7 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 8 | 9 | install_framework() 10 | { 11 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 12 | local source="${BUILT_PRODUCTS_DIR}/$1" 13 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 14 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 15 | elif [ -r "$1" ]; then 16 | local source="$1" 17 | fi 18 | 19 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 20 | 21 | if [ -L "${source}" ]; then 22 | echo "Symlinked..." 23 | source="$(readlink "${source}")" 24 | fi 25 | 26 | # use filter instead of exclude so missing patterns dont' throw errors 27 | echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 28 | rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 29 | 30 | local basename 31 | basename="$(basename -s .framework "$1")" 32 | binary="${destination}/${basename}.framework/${basename}" 33 | if ! [ -r "$binary" ]; then 34 | binary="${destination}/${basename}" 35 | fi 36 | 37 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 38 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 39 | strip_invalid_archs "$binary" 40 | fi 41 | 42 | # Resign the code if required by the build settings to avoid unstable apps 43 | code_sign_if_enabled "${destination}/$(basename "$1")" 44 | 45 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 46 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 47 | local swift_runtime_libs 48 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 49 | for lib in $swift_runtime_libs; do 50 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 51 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 52 | code_sign_if_enabled "${destination}/${lib}" 53 | done 54 | fi 55 | } 56 | 57 | # Signs a framework with the provided identity 58 | code_sign_if_enabled() { 59 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 60 | # Use the current code_sign_identitiy 61 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 62 | echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements \"$1\"" 63 | /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements "$1" 64 | fi 65 | } 66 | 67 | # Strip invalid architectures 68 | strip_invalid_archs() { 69 | binary="$1" 70 | # Get architectures for current file 71 | archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" 72 | stripped="" 73 | for arch in $archs; do 74 | if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then 75 | # Strip non-valid architectures in-place 76 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 77 | stripped="$stripped $arch" 78 | fi 79 | done 80 | if [[ "$stripped" ]]; then 81 | echo "Stripped $binary of architectures:$stripped" 82 | fi 83 | } 84 | 85 | 86 | if [[ "$CONFIGURATION" == "Debug" ]]; then 87 | install_framework "$BUILT_PRODUCTS_DIR/Fusuma/Fusuma.framework" 88 | fi 89 | if [[ "$CONFIGURATION" == "Release" ]]; then 90 | install_framework "$BUILT_PRODUCTS_DIR/Fusuma/Fusuma.framework" 91 | fi 92 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-CustomCamera/Pods-CustomCamera-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 5 | 6 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 7 | > "$RESOURCES_TO_COPY" 8 | 9 | XCASSET_FILES=() 10 | 11 | case "${TARGETED_DEVICE_FAMILY}" in 12 | 1,2) 13 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 14 | ;; 15 | 1) 16 | TARGET_DEVICE_ARGS="--target-device iphone" 17 | ;; 18 | 2) 19 | TARGET_DEVICE_ARGS="--target-device ipad" 20 | ;; 21 | *) 22 | TARGET_DEVICE_ARGS="--target-device mac" 23 | ;; 24 | esac 25 | 26 | install_resource() 27 | { 28 | if [[ "$1" = /* ]] ; then 29 | RESOURCE_PATH="$1" 30 | else 31 | RESOURCE_PATH="${PODS_ROOT}/$1" 32 | fi 33 | if [[ ! -e "$RESOURCE_PATH" ]] ; then 34 | cat << EOM 35 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. 36 | EOM 37 | exit 1 38 | fi 39 | case $RESOURCE_PATH in 40 | *.storyboard) 41 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" 42 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 43 | ;; 44 | *.xib) 45 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" 46 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 47 | ;; 48 | *.framework) 49 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 50 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 51 | echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 52 | rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 53 | ;; 54 | *.xcdatamodel) 55 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" 56 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" 57 | ;; 58 | *.xcdatamodeld) 59 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" 60 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" 61 | ;; 62 | *.xcmappingmodel) 63 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" 64 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" 65 | ;; 66 | *.xcassets) 67 | ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" 68 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 69 | ;; 70 | *) 71 | echo "$RESOURCE_PATH" 72 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" 73 | ;; 74 | esac 75 | } 76 | 77 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 78 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 79 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then 80 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 81 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 82 | fi 83 | rm -f "$RESOURCES_TO_COPY" 84 | 85 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] 86 | then 87 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 88 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 89 | while read line; do 90 | if [[ $line != "${PODS_ROOT}*" ]]; then 91 | XCASSET_FILES+=("$line") 92 | fi 93 | done <<<"$OTHER_XCASSETS" 94 | 95 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 96 | fi 97 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-CustomCamera/Pods-CustomCamera-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | 6 | FOUNDATION_EXPORT double Pods_CustomCameraVersionNumber; 7 | FOUNDATION_EXPORT const unsigned char Pods_CustomCameraVersionString[]; 8 | 9 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-CustomCamera/Pods-CustomCamera.debug.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | EMBEDDED_CONTENT_CONTAINS_SWIFT = YES 3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Fusuma" 4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 5 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 6 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Fusuma/Fusuma.framework/Headers" 7 | OTHER_LDFLAGS = $(inherited) -framework "Fusuma" 8 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 9 | PODS_BUILD_DIR = $BUILD_DIR 10 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 11 | PODS_ROOT = ${SRCROOT}/Pods 12 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-CustomCamera/Pods-CustomCamera.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_CustomCamera { 2 | umbrella header "Pods-CustomCamera-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-CustomCamera/Pods-CustomCamera.release.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | EMBEDDED_CONTENT_CONTAINS_SWIFT = YES 3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Fusuma" 4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 5 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 6 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Fusuma/Fusuma.framework/Headers" 7 | OTHER_LDFLAGS = $(inherited) -framework "Fusuma" 8 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 9 | PODS_BUILD_DIR = $BUILD_DIR 10 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 11 | PODS_ROOT = ${SRCROOT}/Pods 12 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-CustomCameraTests/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 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-CustomCameraTests/Pods-CustomCameraTests-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | Generated by CocoaPods - https://cocoapods.org 4 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-CustomCameraTests/Pods-CustomCameraTests-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Generated by CocoaPods - https://cocoapods.org 18 | Title 19 | 20 | Type 21 | PSGroupSpecifier 22 | 23 | 24 | StringsTable 25 | Acknowledgements 26 | Title 27 | Acknowledgements 28 | 29 | 30 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-CustomCameraTests/Pods-CustomCameraTests-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_CustomCameraTests : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_CustomCameraTests 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-CustomCameraTests/Pods-CustomCameraTests-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 5 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 6 | 7 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 8 | 9 | install_framework() 10 | { 11 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 12 | local source="${BUILT_PRODUCTS_DIR}/$1" 13 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 14 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 15 | elif [ -r "$1" ]; then 16 | local source="$1" 17 | fi 18 | 19 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 20 | 21 | if [ -L "${source}" ]; then 22 | echo "Symlinked..." 23 | source="$(readlink "${source}")" 24 | fi 25 | 26 | # use filter instead of exclude so missing patterns dont' throw errors 27 | echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 28 | rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 29 | 30 | local basename 31 | basename="$(basename -s .framework "$1")" 32 | binary="${destination}/${basename}.framework/${basename}" 33 | if ! [ -r "$binary" ]; then 34 | binary="${destination}/${basename}" 35 | fi 36 | 37 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 38 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 39 | strip_invalid_archs "$binary" 40 | fi 41 | 42 | # Resign the code if required by the build settings to avoid unstable apps 43 | code_sign_if_enabled "${destination}/$(basename "$1")" 44 | 45 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 46 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 47 | local swift_runtime_libs 48 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 49 | for lib in $swift_runtime_libs; do 50 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 51 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 52 | code_sign_if_enabled "${destination}/${lib}" 53 | done 54 | fi 55 | } 56 | 57 | # Signs a framework with the provided identity 58 | code_sign_if_enabled() { 59 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 60 | # Use the current code_sign_identitiy 61 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 62 | echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements \"$1\"" 63 | /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements "$1" 64 | fi 65 | } 66 | 67 | # Strip invalid architectures 68 | strip_invalid_archs() { 69 | binary="$1" 70 | # Get architectures for current file 71 | archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" 72 | stripped="" 73 | for arch in $archs; do 74 | if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then 75 | # Strip non-valid architectures in-place 76 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 77 | stripped="$stripped $arch" 78 | fi 79 | done 80 | if [[ "$stripped" ]]; then 81 | echo "Stripped $binary of architectures:$stripped" 82 | fi 83 | } 84 | 85 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-CustomCameraTests/Pods-CustomCameraTests-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 5 | 6 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 7 | > "$RESOURCES_TO_COPY" 8 | 9 | XCASSET_FILES=() 10 | 11 | case "${TARGETED_DEVICE_FAMILY}" in 12 | 1,2) 13 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 14 | ;; 15 | 1) 16 | TARGET_DEVICE_ARGS="--target-device iphone" 17 | ;; 18 | 2) 19 | TARGET_DEVICE_ARGS="--target-device ipad" 20 | ;; 21 | *) 22 | TARGET_DEVICE_ARGS="--target-device mac" 23 | ;; 24 | esac 25 | 26 | install_resource() 27 | { 28 | if [[ "$1" = /* ]] ; then 29 | RESOURCE_PATH="$1" 30 | else 31 | RESOURCE_PATH="${PODS_ROOT}/$1" 32 | fi 33 | if [[ ! -e "$RESOURCE_PATH" ]] ; then 34 | cat << EOM 35 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. 36 | EOM 37 | exit 1 38 | fi 39 | case $RESOURCE_PATH in 40 | *.storyboard) 41 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" 42 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 43 | ;; 44 | *.xib) 45 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" 46 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 47 | ;; 48 | *.framework) 49 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 50 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 51 | echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 52 | rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 53 | ;; 54 | *.xcdatamodel) 55 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" 56 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" 57 | ;; 58 | *.xcdatamodeld) 59 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" 60 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" 61 | ;; 62 | *.xcmappingmodel) 63 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" 64 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" 65 | ;; 66 | *.xcassets) 67 | ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" 68 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 69 | ;; 70 | *) 71 | echo "$RESOURCE_PATH" 72 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" 73 | ;; 74 | esac 75 | } 76 | 77 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 78 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 79 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then 80 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 81 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 82 | fi 83 | rm -f "$RESOURCES_TO_COPY" 84 | 85 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] 86 | then 87 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 88 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 89 | while read line; do 90 | if [[ $line != "${PODS_ROOT}*" ]]; then 91 | XCASSET_FILES+=("$line") 92 | fi 93 | done <<<"$OTHER_XCASSETS" 94 | 95 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 96 | fi 97 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-CustomCameraTests/Pods-CustomCameraTests-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | 6 | FOUNDATION_EXPORT double Pods_CustomCameraTestsVersionNumber; 7 | FOUNDATION_EXPORT const unsigned char Pods_CustomCameraTestsVersionString[]; 8 | 9 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-CustomCameraTests/Pods-CustomCameraTests.debug.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Fusuma" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Fusuma/Fusuma.framework/Headers" 6 | PODS_BUILD_DIR = $BUILD_DIR 7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_ROOT = ${SRCROOT}/Pods 9 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-CustomCameraTests/Pods-CustomCameraTests.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_CustomCameraTests { 2 | umbrella header "Pods-CustomCameraTests-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-CustomCameraTests/Pods-CustomCameraTests.release.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Fusuma" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Fusuma/Fusuma.framework/Headers" 6 | PODS_BUILD_DIR = $BUILD_DIR 7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_ROOT = ${SRCROOT}/Pods 9 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-CustomCameraUITests/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 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-CustomCameraUITests/Pods-CustomCameraUITests-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | Generated by CocoaPods - https://cocoapods.org 4 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-CustomCameraUITests/Pods-CustomCameraUITests-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Generated by CocoaPods - https://cocoapods.org 18 | Title 19 | 20 | Type 21 | PSGroupSpecifier 22 | 23 | 24 | StringsTable 25 | Acknowledgements 26 | Title 27 | Acknowledgements 28 | 29 | 30 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-CustomCameraUITests/Pods-CustomCameraUITests-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_CustomCameraUITests : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_CustomCameraUITests 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-CustomCameraUITests/Pods-CustomCameraUITests-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 5 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 6 | 7 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 8 | 9 | install_framework() 10 | { 11 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 12 | local source="${BUILT_PRODUCTS_DIR}/$1" 13 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 14 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 15 | elif [ -r "$1" ]; then 16 | local source="$1" 17 | fi 18 | 19 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 20 | 21 | if [ -L "${source}" ]; then 22 | echo "Symlinked..." 23 | source="$(readlink "${source}")" 24 | fi 25 | 26 | # use filter instead of exclude so missing patterns dont' throw errors 27 | echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 28 | rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 29 | 30 | local basename 31 | basename="$(basename -s .framework "$1")" 32 | binary="${destination}/${basename}.framework/${basename}" 33 | if ! [ -r "$binary" ]; then 34 | binary="${destination}/${basename}" 35 | fi 36 | 37 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 38 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 39 | strip_invalid_archs "$binary" 40 | fi 41 | 42 | # Resign the code if required by the build settings to avoid unstable apps 43 | code_sign_if_enabled "${destination}/$(basename "$1")" 44 | 45 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 46 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 47 | local swift_runtime_libs 48 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 49 | for lib in $swift_runtime_libs; do 50 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 51 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 52 | code_sign_if_enabled "${destination}/${lib}" 53 | done 54 | fi 55 | } 56 | 57 | # Signs a framework with the provided identity 58 | code_sign_if_enabled() { 59 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 60 | # Use the current code_sign_identitiy 61 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 62 | echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements \"$1\"" 63 | /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements "$1" 64 | fi 65 | } 66 | 67 | # Strip invalid architectures 68 | strip_invalid_archs() { 69 | binary="$1" 70 | # Get architectures for current file 71 | archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" 72 | stripped="" 73 | for arch in $archs; do 74 | if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then 75 | # Strip non-valid architectures in-place 76 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 77 | stripped="$stripped $arch" 78 | fi 79 | done 80 | if [[ "$stripped" ]]; then 81 | echo "Stripped $binary of architectures:$stripped" 82 | fi 83 | } 84 | 85 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-CustomCameraUITests/Pods-CustomCameraUITests-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 5 | 6 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 7 | > "$RESOURCES_TO_COPY" 8 | 9 | XCASSET_FILES=() 10 | 11 | case "${TARGETED_DEVICE_FAMILY}" in 12 | 1,2) 13 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 14 | ;; 15 | 1) 16 | TARGET_DEVICE_ARGS="--target-device iphone" 17 | ;; 18 | 2) 19 | TARGET_DEVICE_ARGS="--target-device ipad" 20 | ;; 21 | *) 22 | TARGET_DEVICE_ARGS="--target-device mac" 23 | ;; 24 | esac 25 | 26 | install_resource() 27 | { 28 | if [[ "$1" = /* ]] ; then 29 | RESOURCE_PATH="$1" 30 | else 31 | RESOURCE_PATH="${PODS_ROOT}/$1" 32 | fi 33 | if [[ ! -e "$RESOURCE_PATH" ]] ; then 34 | cat << EOM 35 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. 36 | EOM 37 | exit 1 38 | fi 39 | case $RESOURCE_PATH in 40 | *.storyboard) 41 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" 42 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 43 | ;; 44 | *.xib) 45 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" 46 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 47 | ;; 48 | *.framework) 49 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 50 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 51 | echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 52 | rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 53 | ;; 54 | *.xcdatamodel) 55 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" 56 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" 57 | ;; 58 | *.xcdatamodeld) 59 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" 60 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" 61 | ;; 62 | *.xcmappingmodel) 63 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" 64 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" 65 | ;; 66 | *.xcassets) 67 | ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" 68 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 69 | ;; 70 | *) 71 | echo "$RESOURCE_PATH" 72 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" 73 | ;; 74 | esac 75 | } 76 | 77 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 78 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 79 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then 80 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 81 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 82 | fi 83 | rm -f "$RESOURCES_TO_COPY" 84 | 85 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] 86 | then 87 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 88 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 89 | while read line; do 90 | if [[ $line != "${PODS_ROOT}*" ]]; then 91 | XCASSET_FILES+=("$line") 92 | fi 93 | done <<<"$OTHER_XCASSETS" 94 | 95 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 96 | fi 97 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-CustomCameraUITests/Pods-CustomCameraUITests-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | 6 | FOUNDATION_EXPORT double Pods_CustomCameraUITestsVersionNumber; 7 | FOUNDATION_EXPORT const unsigned char Pods_CustomCameraUITestsVersionString[]; 8 | 9 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-CustomCameraUITests/Pods-CustomCameraUITests.debug.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Fusuma" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Fusuma/Fusuma.framework/Headers" 6 | PODS_BUILD_DIR = $BUILD_DIR 7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_ROOT = ${SRCROOT}/Pods 9 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-CustomCameraUITests/Pods-CustomCameraUITests.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_CustomCameraUITests { 2 | umbrella header "Pods-CustomCameraUITests-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-CustomCameraUITests/Pods-CustomCameraUITests.release.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Fusuma" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Fusuma/Fusuma.framework/Headers" 6 | PODS_BUILD_DIR = $BUILD_DIR 7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_ROOT = ${SRCROOT}/Pods 9 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # CustomCamera --------------------------------------------------------------------------------