├── .gitignore ├── .swift-version ├── .travis.yml ├── Example ├── Podfile ├── Podfile.lock ├── Pods │ ├── Local Podspecs │ │ └── RKMultiUnitRuler.podspec.json │ ├── Manifest.lock │ ├── Pods.xcodeproj │ │ └── project.pbxproj │ └── Target Support Files │ │ ├── Pods-RKMultiUnitRuler_Example │ │ ├── Info.plist │ │ ├── Pods-RKMultiUnitRuler_Example-acknowledgements.markdown │ │ ├── Pods-RKMultiUnitRuler_Example-acknowledgements.plist │ │ ├── Pods-RKMultiUnitRuler_Example-dummy.m │ │ ├── Pods-RKMultiUnitRuler_Example-frameworks.sh │ │ ├── Pods-RKMultiUnitRuler_Example-resources.sh │ │ ├── Pods-RKMultiUnitRuler_Example-umbrella.h │ │ ├── Pods-RKMultiUnitRuler_Example.debug.xcconfig │ │ ├── Pods-RKMultiUnitRuler_Example.modulemap │ │ └── Pods-RKMultiUnitRuler_Example.release.xcconfig │ │ ├── Pods-RKMultiUnitRuler_Tests │ │ ├── Info.plist │ │ ├── Pods-RKMultiUnitRuler_Tests-acknowledgements.markdown │ │ ├── Pods-RKMultiUnitRuler_Tests-acknowledgements.plist │ │ ├── Pods-RKMultiUnitRuler_Tests-dummy.m │ │ ├── Pods-RKMultiUnitRuler_Tests-frameworks.sh │ │ ├── Pods-RKMultiUnitRuler_Tests-resources.sh │ │ ├── Pods-RKMultiUnitRuler_Tests-umbrella.h │ │ ├── Pods-RKMultiUnitRuler_Tests.debug.xcconfig │ │ ├── Pods-RKMultiUnitRuler_Tests.modulemap │ │ └── Pods-RKMultiUnitRuler_Tests.release.xcconfig │ │ └── RKMultiUnitRuler │ │ ├── Info.plist │ │ ├── RKMultiUnitRuler-dummy.m │ │ ├── RKMultiUnitRuler-prefix.pch │ │ ├── RKMultiUnitRuler-umbrella.h │ │ ├── RKMultiUnitRuler.modulemap │ │ └── RKMultiUnitRuler.xcconfig ├── RKMultiUnitRuler.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ └── RKMultiUnitRuler-Example.xcscheme ├── RKMultiUnitRuler.xcworkspace │ └── contents.xcworkspacedata ├── RKMultiUnitRuler │ ├── AppDelegate.swift │ ├── Base.lproj │ │ ├── LaunchScreen.xib │ │ └── Main.storyboard │ ├── Images.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Info.plist │ └── ViewController.swift └── Tests │ ├── Info.plist │ └── Tests.swift ├── LICENSE ├── README.md ├── RKMultiUnitRuler.podspec ├── RKMultiUnitRuler ├── Assets │ └── .gitkeep └── Classes │ ├── .gitkeep │ ├── Constant.swift │ ├── RKMultiUnitRuler.swift │ ├── RKRangeLayer.swift │ ├── RKRangePointerView.swift │ ├── RKRangeScrollView.swift │ └── RKRangeTextView.swift └── _Pods.xcodeproj /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Xcode 3 | # 4 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 5 | 6 | ## Build generated 7 | build/ 8 | DerivedData/ 9 | 10 | ## Various settings 11 | *.pbxuser 12 | !default.pbxuser 13 | *.mode1v3 14 | !default.mode1v3 15 | *.mode2v3 16 | !default.mode2v3 17 | *.perspectivev3 18 | !default.perspectivev3 19 | xcuserdata/ 20 | 21 | ## Other 22 | *.moved-aside 23 | *.xcuserstate 24 | 25 | ## Obj-C/Swift specific 26 | *.hmap 27 | *.ipa 28 | *.dSYM.zip 29 | *.dSYM 30 | 31 | ## Playgrounds 32 | timeline.xctimeline 33 | playground.xcworkspace 34 | 35 | # Swift Package Manager 36 | # 37 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 38 | # Packages/ 39 | .build/ 40 | 41 | # CocoaPods 42 | # 43 | # We recommend against adding the Pods directory to your .gitignore. However 44 | # you should judge for yourself, the pros and cons are mentioned at: 45 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 46 | # 47 | # Pods/ 48 | 49 | # Carthage 50 | # 51 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 52 | # Carthage/Checkouts 53 | 54 | Carthage/Build 55 | 56 | # fastlane 57 | # 58 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 59 | # screenshots whenever they are needed. 60 | # For more information about the recommended setup visit: 61 | # https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md 62 | 63 | fastlane/report.xml 64 | fastlane/Preview.html 65 | fastlane/screenshots 66 | fastlane/test_output 67 | 68 | .idea/ 69 | *.DS_Store 70 | -------------------------------------------------------------------------------- /.swift-version: -------------------------------------------------------------------------------- 1 | 3.0 2 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: objective-c 2 | podfile: RKMultiUnitRulerDemo/Podfile 3 | xcode_sdk: iphonesimulator10.0 4 | osx_image: xcode8 5 | xcode_workspace: Example/RKMultiUnitRuler.xcworkspace 6 | xcode_scheme: RKMultiUnitRuler-Example 7 | 8 | install: 9 | - gem install xcpretty --no-rdoc --no-ri --no-document --quiet 10 | 11 | script: 12 | - pod lib lint 13 | -------------------------------------------------------------------------------- /Example/Podfile: -------------------------------------------------------------------------------- 1 | use_frameworks! 2 | 3 | target 'RKMultiUnitRuler_Example' do 4 | pod 'RKMultiUnitRuler', :path => '../' 5 | 6 | target 'RKMultiUnitRuler_Tests' do 7 | inherit! :search_paths 8 | 9 | 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /Example/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - RKMultiUnitRuler (0.1.0) 3 | 4 | DEPENDENCIES: 5 | - RKMultiUnitRuler (from `../`) 6 | 7 | EXTERNAL SOURCES: 8 | RKMultiUnitRuler: 9 | :path: "../" 10 | 11 | SPEC CHECKSUMS: 12 | RKMultiUnitRuler: 66373cc700c071dee204401786c6e8724f0c9dab 13 | 14 | PODFILE CHECKSUM: 39bd870e20caae376490608e98bd00926f08598d 15 | 16 | COCOAPODS: 1.1.1 17 | -------------------------------------------------------------------------------- /Example/Pods/Local Podspecs/RKMultiUnitRuler.podspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "RKMultiUnitRuler", 3 | "version": "0.1.0", 4 | "summary": "A short description of RKMultiUnitRuler.", 5 | "description": "TODO: Add long description of the pod here.", 6 | "homepage": "https://github.com//RKMultiUnitRuler", 7 | "license": { 8 | "type": "MIT", 9 | "file": "LICENSE" 10 | }, 11 | "authors": { 12 | "Farshid Ghods": "farshid.ghods@gmail.com" 13 | }, 14 | "source": { 15 | "git": "https://github.com//RKMultiUnitRuler.git", 16 | "tag": "0.1.0" 17 | }, 18 | "platforms": { 19 | "ios": "10.0" 20 | }, 21 | "source_files": "RKMultiUnitRuler/Classes/**/*" 22 | } 23 | -------------------------------------------------------------------------------- /Example/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - RKMultiUnitRuler (0.1.0) 3 | 4 | DEPENDENCIES: 5 | - RKMultiUnitRuler (from `../`) 6 | 7 | EXTERNAL SOURCES: 8 | RKMultiUnitRuler: 9 | :path: "../" 10 | 11 | SPEC CHECKSUMS: 12 | RKMultiUnitRuler: 66373cc700c071dee204401786c6e8724f0c9dab 13 | 14 | PODFILE CHECKSUM: 39bd870e20caae376490608e98bd00926f08598d 15 | 16 | COCOAPODS: 1.1.1 17 | -------------------------------------------------------------------------------- /Example/Pods/Pods.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 02EA1B48639623B19DE66EB992EE9E35 /* RKRangeLayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3971C1269C71F2D6CFE9E3C9B62FA75F /* RKRangeLayer.swift */; }; 11 | 0958CD51E793DAD9ED891AC36C900269 /* Pods-RKMultiUnitRuler_Example-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 07EA135C956A14CED91E7303097D1FF6 /* Pods-RKMultiUnitRuler_Example-dummy.m */; }; 12 | 1FF05AB325C74B14CB3DC38D21BEEE4C /* Pods-RKMultiUnitRuler_Example-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = D03E5C23DED3E7BD4D75D9180EB4F772 /* Pods-RKMultiUnitRuler_Example-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 13 | 30A6070A15A84F97BD25C8E22E8292C1 /* RKRangeTextView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7A511E29A11B30375B61CEE223BF141 /* RKRangeTextView.swift */; }; 14 | 314ECA8BAFE7E76F5B383DE1B48C74E9 /* Pods-RKMultiUnitRuler_Tests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 1898ED123349459D1799942A3E6E51CA /* Pods-RKMultiUnitRuler_Tests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 15 | 356C3E368415FF52E6A6537213C54B37 /* RKRangeScrollView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85B57605685F85AC9FD4C3A5A8C52D48 /* RKRangeScrollView.swift */; }; 16 | 3B1AE79AAE0C153754A8E9F7099FC452 /* Constant.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC63F922E0072818A34497EB1C4645A3 /* Constant.swift */; }; 17 | 4733D6F7596679A53E3D4859BAF62B66 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CBB3DE36805AF21409EC968A9691732F /* Foundation.framework */; }; 18 | 47BC62D683DAAE0194077A5B25BA2ED8 /* RKMultiUnitRuler-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 416E65C7AE69C958C0E1FD8AA175C4F4 /* RKMultiUnitRuler-dummy.m */; }; 19 | 6FD659A6FCE25F0B286FE17C71978658 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CBB3DE36805AF21409EC968A9691732F /* Foundation.framework */; }; 20 | 7E491E3A76587A7EEF0FA94F4F0A814B /* RKMultiUnitRuler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A022E3F52B935150C1D289353726090 /* RKMultiUnitRuler.swift */; }; 21 | 97894EFFAE9C30BC56973A74801BEE30 /* RKRangePointerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 751355E42CC4920E232CADE700EF703D /* RKRangePointerView.swift */; }; 22 | B8D910D9A1BA239B22A7D0F6709B1D06 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CBB3DE36805AF21409EC968A9691732F /* Foundation.framework */; }; 23 | F8F2AF98D327A5132B6D90862F81B78B /* Pods-RKMultiUnitRuler_Tests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 94B4B539CF1BC975B360411367E124C9 /* Pods-RKMultiUnitRuler_Tests-dummy.m */; }; 24 | FAEC82E2B75C57E64BBDBC66640903C2 /* RKMultiUnitRuler-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 1D9426D7378BD7F2FC98F9D9FFBF65FE /* RKMultiUnitRuler-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 25 | /* End PBXBuildFile section */ 26 | 27 | /* Begin PBXContainerItemProxy section */ 28 | 28CB8210082ABD807CE5AC30AACDDE9F /* PBXContainerItemProxy */ = { 29 | isa = PBXContainerItemProxy; 30 | containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; 31 | proxyType = 1; 32 | remoteGlobalIDString = CB2EC8BD174C06D6404CC8828B0E41C8; 33 | remoteInfo = RKMultiUnitRuler; 34 | }; 35 | /* End PBXContainerItemProxy section */ 36 | 37 | /* Begin PBXFileReference section */ 38 | 07EA135C956A14CED91E7303097D1FF6 /* Pods-RKMultiUnitRuler_Example-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-RKMultiUnitRuler_Example-dummy.m"; sourceTree = ""; }; 39 | 112AA4EABE328936D8A323D7C33C6E8D /* Pods-RKMultiUnitRuler_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-RKMultiUnitRuler_Tests.debug.xcconfig"; sourceTree = ""; }; 40 | 1898ED123349459D1799942A3E6E51CA /* Pods-RKMultiUnitRuler_Tests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-RKMultiUnitRuler_Tests-umbrella.h"; sourceTree = ""; }; 41 | 1A022E3F52B935150C1D289353726090 /* RKMultiUnitRuler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = RKMultiUnitRuler.swift; sourceTree = ""; }; 42 | 1D9426D7378BD7F2FC98F9D9FFBF65FE /* RKMultiUnitRuler-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "RKMultiUnitRuler-umbrella.h"; sourceTree = ""; }; 43 | 2E7E54D2DAFDC6CE37ED0D9419E95A18 /* Pods-RKMultiUnitRuler_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-RKMultiUnitRuler_Tests.release.xcconfig"; sourceTree = ""; }; 44 | 3971C1269C71F2D6CFE9E3C9B62FA75F /* RKRangeLayer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = RKRangeLayer.swift; sourceTree = ""; }; 45 | 416E65C7AE69C958C0E1FD8AA175C4F4 /* RKMultiUnitRuler-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "RKMultiUnitRuler-dummy.m"; sourceTree = ""; }; 46 | 461ABC0E6CD38CB870D6FC2F60445F9F /* Pods-RKMultiUnitRuler_Tests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-RKMultiUnitRuler_Tests-acknowledgements.markdown"; sourceTree = ""; }; 47 | 556159E53AD1FB3F0E0E5DE5A309B326 /* Pods_RKMultiUnitRuler_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RKMultiUnitRuler_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 48 | 64871C4FA57FF1EBF712F754683BE8D1 /* Pods-RKMultiUnitRuler_Example-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-RKMultiUnitRuler_Example-acknowledgements.plist"; sourceTree = ""; }; 49 | 6530B6B48AC8F8621B2FCF2A0B649E85 /* Pods-RKMultiUnitRuler_Tests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-RKMultiUnitRuler_Tests-acknowledgements.plist"; sourceTree = ""; }; 50 | 66E5538C452281A72A30835354B09947 /* Pods-RKMultiUnitRuler_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-RKMultiUnitRuler_Example.debug.xcconfig"; sourceTree = ""; }; 51 | 74A15182C16082D19655CD3FC60775AE /* RKMultiUnitRuler.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = RKMultiUnitRuler.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 52 | 751355E42CC4920E232CADE700EF703D /* RKRangePointerView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = RKRangePointerView.swift; sourceTree = ""; }; 53 | 7F131900498C4DE531CA1753A5402986 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 54 | 82D1449396AD248B727BA5BD371DFBC7 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 55 | 85B57605685F85AC9FD4C3A5A8C52D48 /* RKRangeScrollView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = RKRangeScrollView.swift; sourceTree = ""; }; 56 | 93977D67770D7E00CAD1D049C020035F /* Pods-RKMultiUnitRuler_Example.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Pods-RKMultiUnitRuler_Example.modulemap"; sourceTree = ""; }; 57 | 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 58 | 94B4B539CF1BC975B360411367E124C9 /* Pods-RKMultiUnitRuler_Tests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-RKMultiUnitRuler_Tests-dummy.m"; sourceTree = ""; }; 59 | A4E3E693F4C663E2BB867575C59D418D /* Pods-RKMultiUnitRuler_Tests-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-RKMultiUnitRuler_Tests-frameworks.sh"; sourceTree = ""; }; 60 | A91F26CF5D8C6871458126B49DA8FF89 /* Pods-RKMultiUnitRuler_Tests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Pods-RKMultiUnitRuler_Tests.modulemap"; sourceTree = ""; }; 61 | AC7B9052ACAFED6F1CD2A4326A0423D4 /* Pods-RKMultiUnitRuler_Example-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-RKMultiUnitRuler_Example-frameworks.sh"; sourceTree = ""; }; 62 | CBB3DE36805AF21409EC968A9691732F /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; 63 | D03E5C23DED3E7BD4D75D9180EB4F772 /* Pods-RKMultiUnitRuler_Example-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-RKMultiUnitRuler_Example-umbrella.h"; sourceTree = ""; }; 64 | D08D85DEE34E0B3845F5E10CEC2A1C88 /* Pods_RKMultiUnitRuler_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RKMultiUnitRuler_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 65 | D2B6A0D8A4CA0121495A4A379F292FA3 /* RKMultiUnitRuler.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = RKMultiUnitRuler.modulemap; sourceTree = ""; }; 66 | DA221FDA7CC1298A598F13CD7B4ACEA1 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 67 | DAD1B278371D27894404E0CEF92B03D2 /* Pods-RKMultiUnitRuler_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-RKMultiUnitRuler_Example.release.xcconfig"; sourceTree = ""; }; 68 | DC63F922E0072818A34497EB1C4645A3 /* Constant.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Constant.swift; sourceTree = ""; }; 69 | F7A511E29A11B30375B61CEE223BF141 /* RKRangeTextView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = RKRangeTextView.swift; sourceTree = ""; }; 70 | F8E96CE53BFBF80ED5369E2185BC10D8 /* RKMultiUnitRuler.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = RKMultiUnitRuler.xcconfig; sourceTree = ""; }; 71 | FB585CB3D2271FB2E5235695FE4F5696 /* Pods-RKMultiUnitRuler_Example-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-RKMultiUnitRuler_Example-acknowledgements.markdown"; sourceTree = ""; }; 72 | FE20FD5FA509E231E6F39515687EF83B /* RKMultiUnitRuler-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "RKMultiUnitRuler-prefix.pch"; sourceTree = ""; }; 73 | FE7C418B3D087EBD5D993A2A88528994 /* Pods-RKMultiUnitRuler_Example-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-RKMultiUnitRuler_Example-resources.sh"; sourceTree = ""; }; 74 | FEE04D5617006DD2A280EC64EB141C02 /* Pods-RKMultiUnitRuler_Tests-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-RKMultiUnitRuler_Tests-resources.sh"; sourceTree = ""; }; 75 | /* End PBXFileReference section */ 76 | 77 | /* Begin PBXFrameworksBuildPhase section */ 78 | 320EAD4ECCFE350767E2A849F0DB7CAB /* Frameworks */ = { 79 | isa = PBXFrameworksBuildPhase; 80 | buildActionMask = 2147483647; 81 | files = ( 82 | 4733D6F7596679A53E3D4859BAF62B66 /* Foundation.framework in Frameworks */, 83 | ); 84 | runOnlyForDeploymentPostprocessing = 0; 85 | }; 86 | 9D791DA9726355F9B6C271B5796D4571 /* Frameworks */ = { 87 | isa = PBXFrameworksBuildPhase; 88 | buildActionMask = 2147483647; 89 | files = ( 90 | B8D910D9A1BA239B22A7D0F6709B1D06 /* Foundation.framework in Frameworks */, 91 | ); 92 | runOnlyForDeploymentPostprocessing = 0; 93 | }; 94 | DC5E2E480B415FE7B997BEF07273D34E /* Frameworks */ = { 95 | isa = PBXFrameworksBuildPhase; 96 | buildActionMask = 2147483647; 97 | files = ( 98 | 6FD659A6FCE25F0B286FE17C71978658 /* Foundation.framework in Frameworks */, 99 | ); 100 | runOnlyForDeploymentPostprocessing = 0; 101 | }; 102 | /* End PBXFrameworksBuildPhase section */ 103 | 104 | /* Begin PBXGroup section */ 105 | 1E93C598418264902493131C45844442 /* RKMultiUnitRuler */ = { 106 | isa = PBXGroup; 107 | children = ( 108 | 7CA68A321A473A12ADCB6F1861A9AB6E /* RKMultiUnitRuler */, 109 | 447A9E48C9D7FD4D955688789A855C40 /* Support Files */, 110 | ); 111 | name = RKMultiUnitRuler; 112 | path = ../..; 113 | sourceTree = ""; 114 | }; 115 | 3624380883B7A5AE868B37431EF1DCB7 /* Pods-RKMultiUnitRuler_Tests */ = { 116 | isa = PBXGroup; 117 | children = ( 118 | 82D1449396AD248B727BA5BD371DFBC7 /* Info.plist */, 119 | A91F26CF5D8C6871458126B49DA8FF89 /* Pods-RKMultiUnitRuler_Tests.modulemap */, 120 | 461ABC0E6CD38CB870D6FC2F60445F9F /* Pods-RKMultiUnitRuler_Tests-acknowledgements.markdown */, 121 | 6530B6B48AC8F8621B2FCF2A0B649E85 /* Pods-RKMultiUnitRuler_Tests-acknowledgements.plist */, 122 | 94B4B539CF1BC975B360411367E124C9 /* Pods-RKMultiUnitRuler_Tests-dummy.m */, 123 | A4E3E693F4C663E2BB867575C59D418D /* Pods-RKMultiUnitRuler_Tests-frameworks.sh */, 124 | FEE04D5617006DD2A280EC64EB141C02 /* Pods-RKMultiUnitRuler_Tests-resources.sh */, 125 | 1898ED123349459D1799942A3E6E51CA /* Pods-RKMultiUnitRuler_Tests-umbrella.h */, 126 | 112AA4EABE328936D8A323D7C33C6E8D /* Pods-RKMultiUnitRuler_Tests.debug.xcconfig */, 127 | 2E7E54D2DAFDC6CE37ED0D9419E95A18 /* Pods-RKMultiUnitRuler_Tests.release.xcconfig */, 128 | ); 129 | name = "Pods-RKMultiUnitRuler_Tests"; 130 | path = "Target Support Files/Pods-RKMultiUnitRuler_Tests"; 131 | sourceTree = ""; 132 | }; 133 | 447A9E48C9D7FD4D955688789A855C40 /* Support Files */ = { 134 | isa = PBXGroup; 135 | children = ( 136 | 7F131900498C4DE531CA1753A5402986 /* Info.plist */, 137 | D2B6A0D8A4CA0121495A4A379F292FA3 /* RKMultiUnitRuler.modulemap */, 138 | F8E96CE53BFBF80ED5369E2185BC10D8 /* RKMultiUnitRuler.xcconfig */, 139 | 416E65C7AE69C958C0E1FD8AA175C4F4 /* RKMultiUnitRuler-dummy.m */, 140 | FE20FD5FA509E231E6F39515687EF83B /* RKMultiUnitRuler-prefix.pch */, 141 | 1D9426D7378BD7F2FC98F9D9FFBF65FE /* RKMultiUnitRuler-umbrella.h */, 142 | ); 143 | name = "Support Files"; 144 | path = "Example/Pods/Target Support Files/RKMultiUnitRuler"; 145 | sourceTree = ""; 146 | }; 147 | 5311E6312077211CE619B047BC0AB803 /* Targets Support Files */ = { 148 | isa = PBXGroup; 149 | children = ( 150 | 5491BFB1892D2BC25B8B874F7308E7CB /* Pods-RKMultiUnitRuler_Example */, 151 | 3624380883B7A5AE868B37431EF1DCB7 /* Pods-RKMultiUnitRuler_Tests */, 152 | ); 153 | name = "Targets Support Files"; 154 | sourceTree = ""; 155 | }; 156 | 5491BFB1892D2BC25B8B874F7308E7CB /* Pods-RKMultiUnitRuler_Example */ = { 157 | isa = PBXGroup; 158 | children = ( 159 | DA221FDA7CC1298A598F13CD7B4ACEA1 /* Info.plist */, 160 | 93977D67770D7E00CAD1D049C020035F /* Pods-RKMultiUnitRuler_Example.modulemap */, 161 | FB585CB3D2271FB2E5235695FE4F5696 /* Pods-RKMultiUnitRuler_Example-acknowledgements.markdown */, 162 | 64871C4FA57FF1EBF712F754683BE8D1 /* Pods-RKMultiUnitRuler_Example-acknowledgements.plist */, 163 | 07EA135C956A14CED91E7303097D1FF6 /* Pods-RKMultiUnitRuler_Example-dummy.m */, 164 | AC7B9052ACAFED6F1CD2A4326A0423D4 /* Pods-RKMultiUnitRuler_Example-frameworks.sh */, 165 | FE7C418B3D087EBD5D993A2A88528994 /* Pods-RKMultiUnitRuler_Example-resources.sh */, 166 | D03E5C23DED3E7BD4D75D9180EB4F772 /* Pods-RKMultiUnitRuler_Example-umbrella.h */, 167 | 66E5538C452281A72A30835354B09947 /* Pods-RKMultiUnitRuler_Example.debug.xcconfig */, 168 | DAD1B278371D27894404E0CEF92B03D2 /* Pods-RKMultiUnitRuler_Example.release.xcconfig */, 169 | ); 170 | name = "Pods-RKMultiUnitRuler_Example"; 171 | path = "Target Support Files/Pods-RKMultiUnitRuler_Example"; 172 | sourceTree = ""; 173 | }; 174 | 7531C8F8DE19F1AA3C8A7AC97A91DC29 /* iOS */ = { 175 | isa = PBXGroup; 176 | children = ( 177 | CBB3DE36805AF21409EC968A9691732F /* Foundation.framework */, 178 | ); 179 | name = iOS; 180 | sourceTree = ""; 181 | }; 182 | 7CA68A321A473A12ADCB6F1861A9AB6E /* RKMultiUnitRuler */ = { 183 | isa = PBXGroup; 184 | children = ( 185 | FAFA778F1E3897C47FEC7E22A4231C23 /* Classes */, 186 | ); 187 | path = RKMultiUnitRuler; 188 | sourceTree = ""; 189 | }; 190 | 7DB346D0F39D3F0E887471402A8071AB = { 191 | isa = PBXGroup; 192 | children = ( 193 | 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, 194 | D7751C03F956BAC721518717E6BEE0FC /* Development Pods */, 195 | BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */, 196 | E784826780EFC0D5729FCF36BCCCB4E6 /* Products */, 197 | 5311E6312077211CE619B047BC0AB803 /* Targets Support Files */, 198 | ); 199 | sourceTree = ""; 200 | }; 201 | BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */ = { 202 | isa = PBXGroup; 203 | children = ( 204 | 7531C8F8DE19F1AA3C8A7AC97A91DC29 /* iOS */, 205 | ); 206 | name = Frameworks; 207 | sourceTree = ""; 208 | }; 209 | D7751C03F956BAC721518717E6BEE0FC /* Development Pods */ = { 210 | isa = PBXGroup; 211 | children = ( 212 | 1E93C598418264902493131C45844442 /* RKMultiUnitRuler */, 213 | ); 214 | name = "Development Pods"; 215 | sourceTree = ""; 216 | }; 217 | E784826780EFC0D5729FCF36BCCCB4E6 /* Products */ = { 218 | isa = PBXGroup; 219 | children = ( 220 | 556159E53AD1FB3F0E0E5DE5A309B326 /* Pods_RKMultiUnitRuler_Example.framework */, 221 | D08D85DEE34E0B3845F5E10CEC2A1C88 /* Pods_RKMultiUnitRuler_Tests.framework */, 222 | 74A15182C16082D19655CD3FC60775AE /* RKMultiUnitRuler.framework */, 223 | ); 224 | name = Products; 225 | sourceTree = ""; 226 | }; 227 | FAFA778F1E3897C47FEC7E22A4231C23 /* Classes */ = { 228 | isa = PBXGroup; 229 | children = ( 230 | DC63F922E0072818A34497EB1C4645A3 /* Constant.swift */, 231 | 1A022E3F52B935150C1D289353726090 /* RKMultiUnitRuler.swift */, 232 | 3971C1269C71F2D6CFE9E3C9B62FA75F /* RKRangeLayer.swift */, 233 | 751355E42CC4920E232CADE700EF703D /* RKRangePointerView.swift */, 234 | 85B57605685F85AC9FD4C3A5A8C52D48 /* RKRangeScrollView.swift */, 235 | F7A511E29A11B30375B61CEE223BF141 /* RKRangeTextView.swift */, 236 | ); 237 | path = Classes; 238 | sourceTree = ""; 239 | }; 240 | /* End PBXGroup section */ 241 | 242 | /* Begin PBXHeadersBuildPhase section */ 243 | 0ED40602A5B65533809C73BE1F14F80A /* Headers */ = { 244 | isa = PBXHeadersBuildPhase; 245 | buildActionMask = 2147483647; 246 | files = ( 247 | FAEC82E2B75C57E64BBDBC66640903C2 /* RKMultiUnitRuler-umbrella.h in Headers */, 248 | ); 249 | runOnlyForDeploymentPostprocessing = 0; 250 | }; 251 | 86F877970E1C324EA6D2B19B1E9E5B8D /* Headers */ = { 252 | isa = PBXHeadersBuildPhase; 253 | buildActionMask = 2147483647; 254 | files = ( 255 | 314ECA8BAFE7E76F5B383DE1B48C74E9 /* Pods-RKMultiUnitRuler_Tests-umbrella.h in Headers */, 256 | ); 257 | runOnlyForDeploymentPostprocessing = 0; 258 | }; 259 | FB1DBDEAED88A2453368C860D7E92C4F /* Headers */ = { 260 | isa = PBXHeadersBuildPhase; 261 | buildActionMask = 2147483647; 262 | files = ( 263 | 1FF05AB325C74B14CB3DC38D21BEEE4C /* Pods-RKMultiUnitRuler_Example-umbrella.h in Headers */, 264 | ); 265 | runOnlyForDeploymentPostprocessing = 0; 266 | }; 267 | /* End PBXHeadersBuildPhase section */ 268 | 269 | /* Begin PBXNativeTarget section */ 270 | 4A4CF61B20B4828650DB699A984CC4C1 /* Pods-RKMultiUnitRuler_Example */ = { 271 | isa = PBXNativeTarget; 272 | buildConfigurationList = CB5743F9D7DB8A55925F4333DC32E2A0 /* Build configuration list for PBXNativeTarget "Pods-RKMultiUnitRuler_Example" */; 273 | buildPhases = ( 274 | 22388F5496E512385AB338AAF39D2BD1 /* Sources */, 275 | DC5E2E480B415FE7B997BEF07273D34E /* Frameworks */, 276 | FB1DBDEAED88A2453368C860D7E92C4F /* Headers */, 277 | ); 278 | buildRules = ( 279 | ); 280 | dependencies = ( 281 | 957E2E248B27922B56E35D91ED7ED8C4 /* PBXTargetDependency */, 282 | ); 283 | name = "Pods-RKMultiUnitRuler_Example"; 284 | productName = "Pods-RKMultiUnitRuler_Example"; 285 | productReference = 556159E53AD1FB3F0E0E5DE5A309B326 /* Pods_RKMultiUnitRuler_Example.framework */; 286 | productType = "com.apple.product-type.framework"; 287 | }; 288 | CB2EC8BD174C06D6404CC8828B0E41C8 /* RKMultiUnitRuler */ = { 289 | isa = PBXNativeTarget; 290 | buildConfigurationList = 2327ACA4C5139E9D832D4C79113C20E0 /* Build configuration list for PBXNativeTarget "RKMultiUnitRuler" */; 291 | buildPhases = ( 292 | E3E3FF2826B7064DD39E746BCD4AE335 /* Sources */, 293 | 320EAD4ECCFE350767E2A849F0DB7CAB /* Frameworks */, 294 | 0ED40602A5B65533809C73BE1F14F80A /* Headers */, 295 | ); 296 | buildRules = ( 297 | ); 298 | dependencies = ( 299 | ); 300 | name = RKMultiUnitRuler; 301 | productName = RKMultiUnitRuler; 302 | productReference = 74A15182C16082D19655CD3FC60775AE /* RKMultiUnitRuler.framework */; 303 | productType = "com.apple.product-type.framework"; 304 | }; 305 | E473A9E46E6704B3006A4CE514238BAE /* Pods-RKMultiUnitRuler_Tests */ = { 306 | isa = PBXNativeTarget; 307 | buildConfigurationList = E059F5EC43C33AC0E3CD82C28EA69801 /* Build configuration list for PBXNativeTarget "Pods-RKMultiUnitRuler_Tests" */; 308 | buildPhases = ( 309 | 01B4F0CBB3D475E06EB995984DA31621 /* Sources */, 310 | 9D791DA9726355F9B6C271B5796D4571 /* Frameworks */, 311 | 86F877970E1C324EA6D2B19B1E9E5B8D /* Headers */, 312 | ); 313 | buildRules = ( 314 | ); 315 | dependencies = ( 316 | ); 317 | name = "Pods-RKMultiUnitRuler_Tests"; 318 | productName = "Pods-RKMultiUnitRuler_Tests"; 319 | productReference = D08D85DEE34E0B3845F5E10CEC2A1C88 /* Pods_RKMultiUnitRuler_Tests.framework */; 320 | productType = "com.apple.product-type.framework"; 321 | }; 322 | /* End PBXNativeTarget section */ 323 | 324 | /* Begin PBXProject section */ 325 | D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { 326 | isa = PBXProject; 327 | attributes = { 328 | LastSwiftUpdateCheck = 0730; 329 | LastUpgradeCheck = 0700; 330 | TargetAttributes = { 331 | 4A4CF61B20B4828650DB699A984CC4C1 = { 332 | LastSwiftMigration = 0820; 333 | }; 334 | }; 335 | }; 336 | buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; 337 | compatibilityVersion = "Xcode 3.2"; 338 | developmentRegion = English; 339 | hasScannedForEncodings = 0; 340 | knownRegions = ( 341 | en, 342 | ); 343 | mainGroup = 7DB346D0F39D3F0E887471402A8071AB; 344 | productRefGroup = E784826780EFC0D5729FCF36BCCCB4E6 /* Products */; 345 | projectDirPath = ""; 346 | projectRoot = ""; 347 | targets = ( 348 | 4A4CF61B20B4828650DB699A984CC4C1 /* Pods-RKMultiUnitRuler_Example */, 349 | E473A9E46E6704B3006A4CE514238BAE /* Pods-RKMultiUnitRuler_Tests */, 350 | CB2EC8BD174C06D6404CC8828B0E41C8 /* RKMultiUnitRuler */, 351 | ); 352 | }; 353 | /* End PBXProject section */ 354 | 355 | /* Begin PBXSourcesBuildPhase section */ 356 | 01B4F0CBB3D475E06EB995984DA31621 /* Sources */ = { 357 | isa = PBXSourcesBuildPhase; 358 | buildActionMask = 2147483647; 359 | files = ( 360 | F8F2AF98D327A5132B6D90862F81B78B /* Pods-RKMultiUnitRuler_Tests-dummy.m in Sources */, 361 | ); 362 | runOnlyForDeploymentPostprocessing = 0; 363 | }; 364 | 22388F5496E512385AB338AAF39D2BD1 /* Sources */ = { 365 | isa = PBXSourcesBuildPhase; 366 | buildActionMask = 2147483647; 367 | files = ( 368 | 0958CD51E793DAD9ED891AC36C900269 /* Pods-RKMultiUnitRuler_Example-dummy.m in Sources */, 369 | ); 370 | runOnlyForDeploymentPostprocessing = 0; 371 | }; 372 | E3E3FF2826B7064DD39E746BCD4AE335 /* Sources */ = { 373 | isa = PBXSourcesBuildPhase; 374 | buildActionMask = 2147483647; 375 | files = ( 376 | 3B1AE79AAE0C153754A8E9F7099FC452 /* Constant.swift in Sources */, 377 | 47BC62D683DAAE0194077A5B25BA2ED8 /* RKMultiUnitRuler-dummy.m in Sources */, 378 | 7E491E3A76587A7EEF0FA94F4F0A814B /* RKMultiUnitRuler.swift in Sources */, 379 | 02EA1B48639623B19DE66EB992EE9E35 /* RKRangeLayer.swift in Sources */, 380 | 97894EFFAE9C30BC56973A74801BEE30 /* RKRangePointerView.swift in Sources */, 381 | 356C3E368415FF52E6A6537213C54B37 /* RKRangeScrollView.swift in Sources */, 382 | 30A6070A15A84F97BD25C8E22E8292C1 /* RKRangeTextView.swift in Sources */, 383 | ); 384 | runOnlyForDeploymentPostprocessing = 0; 385 | }; 386 | /* End PBXSourcesBuildPhase section */ 387 | 388 | /* Begin PBXTargetDependency section */ 389 | 957E2E248B27922B56E35D91ED7ED8C4 /* PBXTargetDependency */ = { 390 | isa = PBXTargetDependency; 391 | name = RKMultiUnitRuler; 392 | target = CB2EC8BD174C06D6404CC8828B0E41C8 /* RKMultiUnitRuler */; 393 | targetProxy = 28CB8210082ABD807CE5AC30AACDDE9F /* PBXContainerItemProxy */; 394 | }; 395 | /* End PBXTargetDependency section */ 396 | 397 | /* Begin XCBuildConfiguration section */ 398 | 12914D756594D15C6F2CA12FE5F89F1B /* Debug */ = { 399 | isa = XCBuildConfiguration; 400 | buildSettings = { 401 | ALWAYS_SEARCH_USER_PATHS = NO; 402 | CLANG_ANALYZER_NONNULL = YES; 403 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 404 | CLANG_CXX_LIBRARY = "libc++"; 405 | CLANG_ENABLE_MODULES = YES; 406 | CLANG_ENABLE_OBJC_ARC = YES; 407 | CLANG_WARN_BOOL_CONVERSION = YES; 408 | CLANG_WARN_CONSTANT_CONVERSION = YES; 409 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; 410 | CLANG_WARN_EMPTY_BODY = YES; 411 | CLANG_WARN_ENUM_CONVERSION = YES; 412 | CLANG_WARN_INT_CONVERSION = YES; 413 | CLANG_WARN_OBJC_ROOT_CLASS = YES; 414 | CLANG_WARN_UNREACHABLE_CODE = YES; 415 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 416 | CODE_SIGNING_REQUIRED = NO; 417 | COPY_PHASE_STRIP = NO; 418 | ENABLE_TESTABILITY = YES; 419 | GCC_C_LANGUAGE_STANDARD = gnu99; 420 | GCC_DYNAMIC_NO_PIC = NO; 421 | GCC_OPTIMIZATION_LEVEL = 0; 422 | GCC_PREPROCESSOR_DEFINITIONS = ( 423 | "POD_CONFIGURATION_DEBUG=1", 424 | "DEBUG=1", 425 | "$(inherited)", 426 | ); 427 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 428 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 429 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 430 | GCC_WARN_UNDECLARED_SELECTOR = YES; 431 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 432 | GCC_WARN_UNUSED_FUNCTION = YES; 433 | GCC_WARN_UNUSED_VARIABLE = YES; 434 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 435 | ONLY_ACTIVE_ARCH = YES; 436 | PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; 437 | STRIP_INSTALLED_PRODUCT = NO; 438 | SYMROOT = "${SRCROOT}/../build"; 439 | }; 440 | name = Debug; 441 | }; 442 | 20D17E55ECC7A5642E011FE663AD142B /* Release */ = { 443 | isa = XCBuildConfiguration; 444 | baseConfigurationReference = DAD1B278371D27894404E0CEF92B03D2 /* Pods-RKMultiUnitRuler_Example.release.xcconfig */; 445 | buildSettings = { 446 | CLANG_ENABLE_MODULES = YES; 447 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 448 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 449 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 450 | CURRENT_PROJECT_VERSION = 1; 451 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 452 | DEFINES_MODULE = YES; 453 | DYLIB_COMPATIBILITY_VERSION = 1; 454 | DYLIB_CURRENT_VERSION = 1; 455 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 456 | ENABLE_STRICT_OBJC_MSGSEND = YES; 457 | GCC_NO_COMMON_BLOCKS = YES; 458 | INFOPLIST_FILE = "Target Support Files/Pods-RKMultiUnitRuler_Example/Info.plist"; 459 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 460 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 461 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 462 | MACH_O_TYPE = staticlib; 463 | MODULEMAP_FILE = "Target Support Files/Pods-RKMultiUnitRuler_Example/Pods-RKMultiUnitRuler_Example.modulemap"; 464 | MTL_ENABLE_DEBUG_INFO = NO; 465 | OTHER_LDFLAGS = ""; 466 | OTHER_LIBTOOLFLAGS = ""; 467 | PODS_ROOT = "$(SRCROOT)"; 468 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 469 | PRODUCT_NAME = Pods_RKMultiUnitRuler_Example; 470 | SDKROOT = iphoneos; 471 | SKIP_INSTALL = YES; 472 | SWIFT_VERSION = 3.0; 473 | TARGETED_DEVICE_FAMILY = "1,2"; 474 | VERSIONING_SYSTEM = "apple-generic"; 475 | VERSION_INFO_PREFIX = ""; 476 | }; 477 | name = Release; 478 | }; 479 | 2943D1EF9ABB2BC2C18DEDC3B2F1227F /* Debug */ = { 480 | isa = XCBuildConfiguration; 481 | baseConfigurationReference = F8E96CE53BFBF80ED5369E2185BC10D8 /* RKMultiUnitRuler.xcconfig */; 482 | buildSettings = { 483 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 484 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 485 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 486 | CURRENT_PROJECT_VERSION = 1; 487 | DEBUG_INFORMATION_FORMAT = dwarf; 488 | DEFINES_MODULE = YES; 489 | DYLIB_COMPATIBILITY_VERSION = 1; 490 | DYLIB_CURRENT_VERSION = 1; 491 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 492 | ENABLE_STRICT_OBJC_MSGSEND = YES; 493 | GCC_NO_COMMON_BLOCKS = YES; 494 | GCC_PREFIX_HEADER = "Target Support Files/RKMultiUnitRuler/RKMultiUnitRuler-prefix.pch"; 495 | INFOPLIST_FILE = "Target Support Files/RKMultiUnitRuler/Info.plist"; 496 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 497 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 498 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 499 | MODULEMAP_FILE = "Target Support Files/RKMultiUnitRuler/RKMultiUnitRuler.modulemap"; 500 | MTL_ENABLE_DEBUG_INFO = YES; 501 | PRODUCT_NAME = RKMultiUnitRuler; 502 | SDKROOT = iphoneos; 503 | SKIP_INSTALL = YES; 504 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 505 | SWIFT_VERSION = 3.0; 506 | TARGETED_DEVICE_FAMILY = "1,2"; 507 | VERSIONING_SYSTEM = "apple-generic"; 508 | VERSION_INFO_PREFIX = ""; 509 | }; 510 | name = Debug; 511 | }; 512 | 5B23B5FF636E6F4CD673F057577A269B /* Release */ = { 513 | isa = XCBuildConfiguration; 514 | baseConfigurationReference = 2E7E54D2DAFDC6CE37ED0D9419E95A18 /* Pods-RKMultiUnitRuler_Tests.release.xcconfig */; 515 | buildSettings = { 516 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 517 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 518 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 519 | CURRENT_PROJECT_VERSION = 1; 520 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 521 | DEFINES_MODULE = YES; 522 | DYLIB_COMPATIBILITY_VERSION = 1; 523 | DYLIB_CURRENT_VERSION = 1; 524 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 525 | ENABLE_STRICT_OBJC_MSGSEND = YES; 526 | GCC_NO_COMMON_BLOCKS = YES; 527 | INFOPLIST_FILE = "Target Support Files/Pods-RKMultiUnitRuler_Tests/Info.plist"; 528 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 529 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 530 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 531 | MACH_O_TYPE = staticlib; 532 | MODULEMAP_FILE = "Target Support Files/Pods-RKMultiUnitRuler_Tests/Pods-RKMultiUnitRuler_Tests.modulemap"; 533 | MTL_ENABLE_DEBUG_INFO = NO; 534 | OTHER_LDFLAGS = ""; 535 | OTHER_LIBTOOLFLAGS = ""; 536 | PODS_ROOT = "$(SRCROOT)"; 537 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 538 | PRODUCT_NAME = Pods_RKMultiUnitRuler_Tests; 539 | SDKROOT = iphoneos; 540 | SKIP_INSTALL = YES; 541 | TARGETED_DEVICE_FAMILY = "1,2"; 542 | VERSIONING_SYSTEM = "apple-generic"; 543 | VERSION_INFO_PREFIX = ""; 544 | }; 545 | name = Release; 546 | }; 547 | 715413CBCF03C4BCCE385959278695E3 /* Release */ = { 548 | isa = XCBuildConfiguration; 549 | baseConfigurationReference = F8E96CE53BFBF80ED5369E2185BC10D8 /* RKMultiUnitRuler.xcconfig */; 550 | buildSettings = { 551 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 552 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 553 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 554 | CURRENT_PROJECT_VERSION = 1; 555 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 556 | DEFINES_MODULE = YES; 557 | DYLIB_COMPATIBILITY_VERSION = 1; 558 | DYLIB_CURRENT_VERSION = 1; 559 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 560 | ENABLE_STRICT_OBJC_MSGSEND = YES; 561 | GCC_NO_COMMON_BLOCKS = YES; 562 | GCC_PREFIX_HEADER = "Target Support Files/RKMultiUnitRuler/RKMultiUnitRuler-prefix.pch"; 563 | INFOPLIST_FILE = "Target Support Files/RKMultiUnitRuler/Info.plist"; 564 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 565 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 566 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 567 | MODULEMAP_FILE = "Target Support Files/RKMultiUnitRuler/RKMultiUnitRuler.modulemap"; 568 | MTL_ENABLE_DEBUG_INFO = NO; 569 | PRODUCT_NAME = RKMultiUnitRuler; 570 | SDKROOT = iphoneos; 571 | SKIP_INSTALL = YES; 572 | SWIFT_VERSION = 3.0; 573 | TARGETED_DEVICE_FAMILY = "1,2"; 574 | VERSIONING_SYSTEM = "apple-generic"; 575 | VERSION_INFO_PREFIX = ""; 576 | }; 577 | name = Release; 578 | }; 579 | A9133A91AEF0366EF2E3B4D386CAC052 /* Debug */ = { 580 | isa = XCBuildConfiguration; 581 | baseConfigurationReference = 66E5538C452281A72A30835354B09947 /* Pods-RKMultiUnitRuler_Example.debug.xcconfig */; 582 | buildSettings = { 583 | CLANG_ENABLE_MODULES = YES; 584 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 585 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 586 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 587 | CURRENT_PROJECT_VERSION = 1; 588 | DEBUG_INFORMATION_FORMAT = dwarf; 589 | DEFINES_MODULE = YES; 590 | DYLIB_COMPATIBILITY_VERSION = 1; 591 | DYLIB_CURRENT_VERSION = 1; 592 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 593 | ENABLE_STRICT_OBJC_MSGSEND = YES; 594 | GCC_NO_COMMON_BLOCKS = YES; 595 | INFOPLIST_FILE = "Target Support Files/Pods-RKMultiUnitRuler_Example/Info.plist"; 596 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 597 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 598 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 599 | MACH_O_TYPE = staticlib; 600 | MODULEMAP_FILE = "Target Support Files/Pods-RKMultiUnitRuler_Example/Pods-RKMultiUnitRuler_Example.modulemap"; 601 | MTL_ENABLE_DEBUG_INFO = YES; 602 | OTHER_LDFLAGS = ""; 603 | OTHER_LIBTOOLFLAGS = ""; 604 | PODS_ROOT = "$(SRCROOT)"; 605 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 606 | PRODUCT_NAME = Pods_RKMultiUnitRuler_Example; 607 | SDKROOT = iphoneos; 608 | SKIP_INSTALL = YES; 609 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 610 | SWIFT_VERSION = 3.0; 611 | TARGETED_DEVICE_FAMILY = "1,2"; 612 | VERSIONING_SYSTEM = "apple-generic"; 613 | VERSION_INFO_PREFIX = ""; 614 | }; 615 | name = Debug; 616 | }; 617 | D41706BD2979A3529856C57E37CCB27E /* Debug */ = { 618 | isa = XCBuildConfiguration; 619 | baseConfigurationReference = 112AA4EABE328936D8A323D7C33C6E8D /* Pods-RKMultiUnitRuler_Tests.debug.xcconfig */; 620 | buildSettings = { 621 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 622 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 623 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 624 | CURRENT_PROJECT_VERSION = 1; 625 | DEBUG_INFORMATION_FORMAT = dwarf; 626 | DEFINES_MODULE = YES; 627 | DYLIB_COMPATIBILITY_VERSION = 1; 628 | DYLIB_CURRENT_VERSION = 1; 629 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 630 | ENABLE_STRICT_OBJC_MSGSEND = YES; 631 | GCC_NO_COMMON_BLOCKS = YES; 632 | INFOPLIST_FILE = "Target Support Files/Pods-RKMultiUnitRuler_Tests/Info.plist"; 633 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 634 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 635 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 636 | MACH_O_TYPE = staticlib; 637 | MODULEMAP_FILE = "Target Support Files/Pods-RKMultiUnitRuler_Tests/Pods-RKMultiUnitRuler_Tests.modulemap"; 638 | MTL_ENABLE_DEBUG_INFO = YES; 639 | OTHER_LDFLAGS = ""; 640 | OTHER_LIBTOOLFLAGS = ""; 641 | PODS_ROOT = "$(SRCROOT)"; 642 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 643 | PRODUCT_NAME = Pods_RKMultiUnitRuler_Tests; 644 | SDKROOT = iphoneos; 645 | SKIP_INSTALL = YES; 646 | TARGETED_DEVICE_FAMILY = "1,2"; 647 | VERSIONING_SYSTEM = "apple-generic"; 648 | VERSION_INFO_PREFIX = ""; 649 | }; 650 | name = Debug; 651 | }; 652 | E72E7977875C2D251FC62736BBDDC389 /* Release */ = { 653 | isa = XCBuildConfiguration; 654 | buildSettings = { 655 | ALWAYS_SEARCH_USER_PATHS = NO; 656 | CLANG_ANALYZER_NONNULL = YES; 657 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 658 | CLANG_CXX_LIBRARY = "libc++"; 659 | CLANG_ENABLE_MODULES = YES; 660 | CLANG_ENABLE_OBJC_ARC = YES; 661 | CLANG_WARN_BOOL_CONVERSION = YES; 662 | CLANG_WARN_CONSTANT_CONVERSION = YES; 663 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; 664 | CLANG_WARN_EMPTY_BODY = YES; 665 | CLANG_WARN_ENUM_CONVERSION = YES; 666 | CLANG_WARN_INT_CONVERSION = YES; 667 | CLANG_WARN_OBJC_ROOT_CLASS = YES; 668 | CLANG_WARN_UNREACHABLE_CODE = YES; 669 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 670 | CODE_SIGNING_REQUIRED = NO; 671 | COPY_PHASE_STRIP = YES; 672 | ENABLE_NS_ASSERTIONS = NO; 673 | GCC_C_LANGUAGE_STANDARD = gnu99; 674 | GCC_PREPROCESSOR_DEFINITIONS = ( 675 | "POD_CONFIGURATION_RELEASE=1", 676 | "$(inherited)", 677 | ); 678 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 679 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 680 | GCC_WARN_UNDECLARED_SELECTOR = YES; 681 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 682 | GCC_WARN_UNUSED_FUNCTION = YES; 683 | GCC_WARN_UNUSED_VARIABLE = YES; 684 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 685 | PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; 686 | STRIP_INSTALLED_PRODUCT = NO; 687 | SYMROOT = "${SRCROOT}/../build"; 688 | VALIDATE_PRODUCT = YES; 689 | }; 690 | name = Release; 691 | }; 692 | /* End XCBuildConfiguration section */ 693 | 694 | /* Begin XCConfigurationList section */ 695 | 2327ACA4C5139E9D832D4C79113C20E0 /* Build configuration list for PBXNativeTarget "RKMultiUnitRuler" */ = { 696 | isa = XCConfigurationList; 697 | buildConfigurations = ( 698 | 2943D1EF9ABB2BC2C18DEDC3B2F1227F /* Debug */, 699 | 715413CBCF03C4BCCE385959278695E3 /* Release */, 700 | ); 701 | defaultConfigurationIsVisible = 0; 702 | defaultConfigurationName = Release; 703 | }; 704 | 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { 705 | isa = XCConfigurationList; 706 | buildConfigurations = ( 707 | 12914D756594D15C6F2CA12FE5F89F1B /* Debug */, 708 | E72E7977875C2D251FC62736BBDDC389 /* Release */, 709 | ); 710 | defaultConfigurationIsVisible = 0; 711 | defaultConfigurationName = Release; 712 | }; 713 | CB5743F9D7DB8A55925F4333DC32E2A0 /* Build configuration list for PBXNativeTarget "Pods-RKMultiUnitRuler_Example" */ = { 714 | isa = XCConfigurationList; 715 | buildConfigurations = ( 716 | A9133A91AEF0366EF2E3B4D386CAC052 /* Debug */, 717 | 20D17E55ECC7A5642E011FE663AD142B /* Release */, 718 | ); 719 | defaultConfigurationIsVisible = 0; 720 | defaultConfigurationName = Release; 721 | }; 722 | E059F5EC43C33AC0E3CD82C28EA69801 /* Build configuration list for PBXNativeTarget "Pods-RKMultiUnitRuler_Tests" */ = { 723 | isa = XCConfigurationList; 724 | buildConfigurations = ( 725 | D41706BD2979A3529856C57E37CCB27E /* Debug */, 726 | 5B23B5FF636E6F4CD673F057577A269B /* Release */, 727 | ); 728 | defaultConfigurationIsVisible = 0; 729 | defaultConfigurationName = Release; 730 | }; 731 | /* End XCConfigurationList section */ 732 | }; 733 | rootObject = D41D8CD98F00B204E9800998ECF8427E /* Project object */; 734 | } 735 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-RKMultiUnitRuler_Example/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 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-RKMultiUnitRuler_Example/Pods-RKMultiUnitRuler_Example-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## RKMultiUnitRuler 5 | 6 | Copyright (c) 2017 Farshid Ghods 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is 13 | furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in 16 | all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | THE SOFTWARE. 25 | 26 | Generated by CocoaPods - https://cocoapods.org 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-RKMultiUnitRuler_Example/Pods-RKMultiUnitRuler_Example-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 | Copyright (c) 2017 Farshid Ghods <farshid.ghods@gmail.com> 18 | 19 | Permission is hereby granted, free of charge, to any person obtaining a copy 20 | of this software and associated documentation files (the "Software"), to deal 21 | in the Software without restriction, including without limitation the rights 22 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 23 | copies of the Software, and to permit persons to whom the Software is 24 | furnished to do so, subject to the following conditions: 25 | 26 | The above copyright notice and this permission notice shall be included in 27 | all copies or substantial portions of the Software. 28 | 29 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 30 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 31 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 32 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 33 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 34 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 35 | THE SOFTWARE. 36 | 37 | License 38 | MIT 39 | Title 40 | RKMultiUnitRuler 41 | Type 42 | PSGroupSpecifier 43 | 44 | 45 | FooterText 46 | Generated by CocoaPods - https://cocoapods.org 47 | Title 48 | 49 | Type 50 | PSGroupSpecifier 51 | 52 | 53 | StringsTable 54 | Acknowledgements 55 | Title 56 | Acknowledgements 57 | 58 | 59 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-RKMultiUnitRuler_Example/Pods-RKMultiUnitRuler_Example-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_RKMultiUnitRuler_Example : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_RKMultiUnitRuler_Example 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-RKMultiUnitRuler_Example/Pods-RKMultiUnitRuler_Example-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/RKMultiUnitRuler/RKMultiUnitRuler.framework" 88 | fi 89 | if [[ "$CONFIGURATION" == "Release" ]]; then 90 | install_framework "$BUILT_PRODUCTS_DIR/RKMultiUnitRuler/RKMultiUnitRuler.framework" 91 | fi 92 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-RKMultiUnitRuler_Example/Pods-RKMultiUnitRuler_Example-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 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-RKMultiUnitRuler_Example/Pods-RKMultiUnitRuler_Example-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | 6 | FOUNDATION_EXPORT double Pods_RKMultiUnitRuler_ExampleVersionNumber; 7 | FOUNDATION_EXPORT const unsigned char Pods_RKMultiUnitRuler_ExampleVersionString[]; 8 | 9 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-RKMultiUnitRuler_Example/Pods-RKMultiUnitRuler_Example.debug.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | EMBEDDED_CONTENT_CONTAINS_SWIFT = YES 3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/RKMultiUnitRuler" 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/RKMultiUnitRuler/RKMultiUnitRuler.framework/Headers" 7 | OTHER_LDFLAGS = $(inherited) -framework "RKMultiUnitRuler" 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 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-RKMultiUnitRuler_Example/Pods-RKMultiUnitRuler_Example.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_RKMultiUnitRuler_Example { 2 | umbrella header "Pods-RKMultiUnitRuler_Example-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-RKMultiUnitRuler_Example/Pods-RKMultiUnitRuler_Example.release.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | EMBEDDED_CONTENT_CONTAINS_SWIFT = YES 3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/RKMultiUnitRuler" 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/RKMultiUnitRuler/RKMultiUnitRuler.framework/Headers" 7 | OTHER_LDFLAGS = $(inherited) -framework "RKMultiUnitRuler" 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 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-RKMultiUnitRuler_Tests/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 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-RKMultiUnitRuler_Tests/Pods-RKMultiUnitRuler_Tests-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | Generated by CocoaPods - https://cocoapods.org 4 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-RKMultiUnitRuler_Tests/Pods-RKMultiUnitRuler_Tests-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 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-RKMultiUnitRuler_Tests/Pods-RKMultiUnitRuler_Tests-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_RKMultiUnitRuler_Tests : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_RKMultiUnitRuler_Tests 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-RKMultiUnitRuler_Tests/Pods-RKMultiUnitRuler_Tests-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 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-RKMultiUnitRuler_Tests/Pods-RKMultiUnitRuler_Tests-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 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-RKMultiUnitRuler_Tests/Pods-RKMultiUnitRuler_Tests-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | 6 | FOUNDATION_EXPORT double Pods_RKMultiUnitRuler_TestsVersionNumber; 7 | FOUNDATION_EXPORT const unsigned char Pods_RKMultiUnitRuler_TestsVersionString[]; 8 | 9 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-RKMultiUnitRuler_Tests/Pods-RKMultiUnitRuler_Tests.debug.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/RKMultiUnitRuler" 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/RKMultiUnitRuler/RKMultiUnitRuler.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 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-RKMultiUnitRuler_Tests/Pods-RKMultiUnitRuler_Tests.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_RKMultiUnitRuler_Tests { 2 | umbrella header "Pods-RKMultiUnitRuler_Tests-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-RKMultiUnitRuler_Tests/Pods-RKMultiUnitRuler_Tests.release.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/RKMultiUnitRuler" 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/RKMultiUnitRuler/RKMultiUnitRuler.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 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/RKMultiUnitRuler/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 | 0.1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/RKMultiUnitRuler/RKMultiUnitRuler-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_RKMultiUnitRuler : NSObject 3 | @end 4 | @implementation PodsDummy_RKMultiUnitRuler 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/RKMultiUnitRuler/RKMultiUnitRuler-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/RKMultiUnitRuler/RKMultiUnitRuler-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | 6 | FOUNDATION_EXPORT double RKMultiUnitRulerVersionNumber; 7 | FOUNDATION_EXPORT const unsigned char RKMultiUnitRulerVersionString[]; 8 | 9 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/RKMultiUnitRuler/RKMultiUnitRuler.modulemap: -------------------------------------------------------------------------------- 1 | framework module RKMultiUnitRuler { 2 | umbrella header "RKMultiUnitRuler-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/RKMultiUnitRuler/RKMultiUnitRuler.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/RKMultiUnitRuler 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 | -------------------------------------------------------------------------------- /Example/RKMultiUnitRuler.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 5761331F625573208AA687BB /* Pods_RKMultiUnitRuler_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BC699BFFA502891B01AC3BE4 /* Pods_RKMultiUnitRuler_Example.framework */; }; 11 | 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD51AFB9204008FA782 /* AppDelegate.swift */; }; 12 | 607FACD81AFB9204008FA782 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD71AFB9204008FA782 /* ViewController.swift */; }; 13 | 607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 607FACD91AFB9204008FA782 /* Main.storyboard */; }; 14 | 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDC1AFB9204008FA782 /* Images.xcassets */; }; 15 | 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */; }; 16 | 607FACEC1AFB9204008FA782 /* Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACEB1AFB9204008FA782 /* Tests.swift */; }; 17 | BF570BCB6321E06A734E7721 /* Pods_RKMultiUnitRuler_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D8A6DDBC653986EA30DD9F07 /* Pods_RKMultiUnitRuler_Tests.framework */; }; 18 | /* End PBXBuildFile section */ 19 | 20 | /* Begin PBXContainerItemProxy section */ 21 | 607FACE61AFB9204008FA782 /* PBXContainerItemProxy */ = { 22 | isa = PBXContainerItemProxy; 23 | containerPortal = 607FACC81AFB9204008FA782 /* Project object */; 24 | proxyType = 1; 25 | remoteGlobalIDString = 607FACCF1AFB9204008FA782; 26 | remoteInfo = RKMultiUnitRuler; 27 | }; 28 | /* End PBXContainerItemProxy section */ 29 | 30 | /* Begin PBXFileReference section */ 31 | 3047A128C8FD071C566584D1 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; }; 32 | 357DE5F9F095E9B5B47ACA5B /* Pods-RKMultiUnitRuler_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RKMultiUnitRuler_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-RKMultiUnitRuler_Tests/Pods-RKMultiUnitRuler_Tests.release.xcconfig"; sourceTree = ""; }; 33 | 36AEB0178F0AB637F4291650 /* RKMultiUnitRuler.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = RKMultiUnitRuler.podspec; path = ../RKMultiUnitRuler.podspec; sourceTree = ""; }; 34 | 4F3F82DFFE4CF41E732EE841 /* Pods-RKMultiUnitRuler_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RKMultiUnitRuler_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-RKMultiUnitRuler_Tests/Pods-RKMultiUnitRuler_Tests.debug.xcconfig"; sourceTree = ""; }; 35 | 607FACD01AFB9204008FA782 /* RKMultiUnitRuler_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RKMultiUnitRuler_Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; 36 | 607FACD41AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 37 | 607FACD51AFB9204008FA782 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 38 | 607FACD71AFB9204008FA782 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 39 | 607FACDA1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 40 | 607FACDC1AFB9204008FA782 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 41 | 607FACDF1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 42 | 607FACE51AFB9204008FA782 /* RKMultiUnitRuler_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RKMultiUnitRuler_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 43 | 607FACEA1AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 44 | 607FACEB1AFB9204008FA782 /* Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tests.swift; sourceTree = ""; }; 45 | 6C4CD0FF395019F512381753 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = ""; }; 46 | 7AE4B070F27E2717CF005B5A /* Pods-RKMultiUnitRuler_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RKMultiUnitRuler_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-RKMultiUnitRuler_Example/Pods-RKMultiUnitRuler_Example.debug.xcconfig"; sourceTree = ""; }; 47 | A127B5FC81BE8B71819B2BB7 /* Pods-RKMultiUnitRuler_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RKMultiUnitRuler_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-RKMultiUnitRuler_Example/Pods-RKMultiUnitRuler_Example.release.xcconfig"; sourceTree = ""; }; 48 | BC699BFFA502891B01AC3BE4 /* Pods_RKMultiUnitRuler_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RKMultiUnitRuler_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 49 | D8A6DDBC653986EA30DD9F07 /* Pods_RKMultiUnitRuler_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RKMultiUnitRuler_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 50 | /* End PBXFileReference section */ 51 | 52 | /* Begin PBXFrameworksBuildPhase section */ 53 | 607FACCD1AFB9204008FA782 /* Frameworks */ = { 54 | isa = PBXFrameworksBuildPhase; 55 | buildActionMask = 2147483647; 56 | files = ( 57 | 5761331F625573208AA687BB /* Pods_RKMultiUnitRuler_Example.framework in Frameworks */, 58 | ); 59 | runOnlyForDeploymentPostprocessing = 0; 60 | }; 61 | 607FACE21AFB9204008FA782 /* Frameworks */ = { 62 | isa = PBXFrameworksBuildPhase; 63 | buildActionMask = 2147483647; 64 | files = ( 65 | BF570BCB6321E06A734E7721 /* Pods_RKMultiUnitRuler_Tests.framework in Frameworks */, 66 | ); 67 | runOnlyForDeploymentPostprocessing = 0; 68 | }; 69 | /* End PBXFrameworksBuildPhase section */ 70 | 71 | /* Begin PBXGroup section */ 72 | 0557829FB408F969A5EE23FA /* Pods */ = { 73 | isa = PBXGroup; 74 | children = ( 75 | 7AE4B070F27E2717CF005B5A /* Pods-RKMultiUnitRuler_Example.debug.xcconfig */, 76 | A127B5FC81BE8B71819B2BB7 /* Pods-RKMultiUnitRuler_Example.release.xcconfig */, 77 | 4F3F82DFFE4CF41E732EE841 /* Pods-RKMultiUnitRuler_Tests.debug.xcconfig */, 78 | 357DE5F9F095E9B5B47ACA5B /* Pods-RKMultiUnitRuler_Tests.release.xcconfig */, 79 | ); 80 | name = Pods; 81 | sourceTree = ""; 82 | }; 83 | 607FACC71AFB9204008FA782 = { 84 | isa = PBXGroup; 85 | children = ( 86 | 607FACF51AFB993E008FA782 /* Podspec Metadata */, 87 | 607FACD21AFB9204008FA782 /* Example for RKMultiUnitRuler */, 88 | 607FACE81AFB9204008FA782 /* Tests */, 89 | 607FACD11AFB9204008FA782 /* Products */, 90 | 0557829FB408F969A5EE23FA /* Pods */, 91 | E5A3F1801D53B69E779B8CFB /* Frameworks */, 92 | ); 93 | sourceTree = ""; 94 | }; 95 | 607FACD11AFB9204008FA782 /* Products */ = { 96 | isa = PBXGroup; 97 | children = ( 98 | 607FACD01AFB9204008FA782 /* RKMultiUnitRuler_Example.app */, 99 | 607FACE51AFB9204008FA782 /* RKMultiUnitRuler_Tests.xctest */, 100 | ); 101 | name = Products; 102 | sourceTree = ""; 103 | }; 104 | 607FACD21AFB9204008FA782 /* Example for RKMultiUnitRuler */ = { 105 | isa = PBXGroup; 106 | children = ( 107 | 607FACD51AFB9204008FA782 /* AppDelegate.swift */, 108 | 607FACD71AFB9204008FA782 /* ViewController.swift */, 109 | 607FACD91AFB9204008FA782 /* Main.storyboard */, 110 | 607FACDC1AFB9204008FA782 /* Images.xcassets */, 111 | 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */, 112 | 607FACD31AFB9204008FA782 /* Supporting Files */, 113 | ); 114 | name = "Example for RKMultiUnitRuler"; 115 | path = RKMultiUnitRuler; 116 | sourceTree = ""; 117 | }; 118 | 607FACD31AFB9204008FA782 /* Supporting Files */ = { 119 | isa = PBXGroup; 120 | children = ( 121 | 607FACD41AFB9204008FA782 /* Info.plist */, 122 | ); 123 | name = "Supporting Files"; 124 | sourceTree = ""; 125 | }; 126 | 607FACE81AFB9204008FA782 /* Tests */ = { 127 | isa = PBXGroup; 128 | children = ( 129 | 607FACEB1AFB9204008FA782 /* Tests.swift */, 130 | 607FACE91AFB9204008FA782 /* Supporting Files */, 131 | ); 132 | path = Tests; 133 | sourceTree = ""; 134 | }; 135 | 607FACE91AFB9204008FA782 /* Supporting Files */ = { 136 | isa = PBXGroup; 137 | children = ( 138 | 607FACEA1AFB9204008FA782 /* Info.plist */, 139 | ); 140 | name = "Supporting Files"; 141 | sourceTree = ""; 142 | }; 143 | 607FACF51AFB993E008FA782 /* Podspec Metadata */ = { 144 | isa = PBXGroup; 145 | children = ( 146 | 36AEB0178F0AB637F4291650 /* RKMultiUnitRuler.podspec */, 147 | 3047A128C8FD071C566584D1 /* README.md */, 148 | 6C4CD0FF395019F512381753 /* LICENSE */, 149 | ); 150 | name = "Podspec Metadata"; 151 | sourceTree = ""; 152 | }; 153 | E5A3F1801D53B69E779B8CFB /* Frameworks */ = { 154 | isa = PBXGroup; 155 | children = ( 156 | BC699BFFA502891B01AC3BE4 /* Pods_RKMultiUnitRuler_Example.framework */, 157 | D8A6DDBC653986EA30DD9F07 /* Pods_RKMultiUnitRuler_Tests.framework */, 158 | ); 159 | name = Frameworks; 160 | sourceTree = ""; 161 | }; 162 | /* End PBXGroup section */ 163 | 164 | /* Begin PBXNativeTarget section */ 165 | 607FACCF1AFB9204008FA782 /* RKMultiUnitRuler_Example */ = { 166 | isa = PBXNativeTarget; 167 | buildConfigurationList = 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "RKMultiUnitRuler_Example" */; 168 | buildPhases = ( 169 | CD6038428D86A6123BB4E7E8 /* [CP] Check Pods Manifest.lock */, 170 | 607FACCC1AFB9204008FA782 /* Sources */, 171 | 607FACCD1AFB9204008FA782 /* Frameworks */, 172 | 607FACCE1AFB9204008FA782 /* Resources */, 173 | 14B14E0125FC6150109000E5 /* [CP] Embed Pods Frameworks */, 174 | 526128128FA271AF7C5576BF /* [CP] Copy Pods Resources */, 175 | ); 176 | buildRules = ( 177 | ); 178 | dependencies = ( 179 | ); 180 | name = RKMultiUnitRuler_Example; 181 | productName = RKMultiUnitRuler; 182 | productReference = 607FACD01AFB9204008FA782 /* RKMultiUnitRuler_Example.app */; 183 | productType = "com.apple.product-type.application"; 184 | }; 185 | 607FACE41AFB9204008FA782 /* RKMultiUnitRuler_Tests */ = { 186 | isa = PBXNativeTarget; 187 | buildConfigurationList = 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "RKMultiUnitRuler_Tests" */; 188 | buildPhases = ( 189 | 8311422C5F1F17F19C244A49 /* [CP] Check Pods Manifest.lock */, 190 | 607FACE11AFB9204008FA782 /* Sources */, 191 | 607FACE21AFB9204008FA782 /* Frameworks */, 192 | 607FACE31AFB9204008FA782 /* Resources */, 193 | E80CD8324FEB0AD402CFAECA /* [CP] Embed Pods Frameworks */, 194 | 5149D9BF0C3B00567D11E0CF /* [CP] Copy Pods Resources */, 195 | ); 196 | buildRules = ( 197 | ); 198 | dependencies = ( 199 | 607FACE71AFB9204008FA782 /* PBXTargetDependency */, 200 | ); 201 | name = RKMultiUnitRuler_Tests; 202 | productName = Tests; 203 | productReference = 607FACE51AFB9204008FA782 /* RKMultiUnitRuler_Tests.xctest */; 204 | productType = "com.apple.product-type.bundle.unit-test"; 205 | }; 206 | /* End PBXNativeTarget section */ 207 | 208 | /* Begin PBXProject section */ 209 | 607FACC81AFB9204008FA782 /* Project object */ = { 210 | isa = PBXProject; 211 | attributes = { 212 | LastSwiftUpdateCheck = 0720; 213 | LastUpgradeCheck = 0820; 214 | ORGANIZATIONNAME = CocoaPods; 215 | TargetAttributes = { 216 | 607FACCF1AFB9204008FA782 = { 217 | CreatedOnToolsVersion = 6.3.1; 218 | LastSwiftMigration = 0820; 219 | }; 220 | 607FACE41AFB9204008FA782 = { 221 | CreatedOnToolsVersion = 6.3.1; 222 | LastSwiftMigration = 0820; 223 | TestTargetID = 607FACCF1AFB9204008FA782; 224 | }; 225 | }; 226 | }; 227 | buildConfigurationList = 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "RKMultiUnitRuler" */; 228 | compatibilityVersion = "Xcode 3.2"; 229 | developmentRegion = English; 230 | hasScannedForEncodings = 0; 231 | knownRegions = ( 232 | en, 233 | Base, 234 | ); 235 | mainGroup = 607FACC71AFB9204008FA782; 236 | productRefGroup = 607FACD11AFB9204008FA782 /* Products */; 237 | projectDirPath = ""; 238 | projectRoot = ""; 239 | targets = ( 240 | 607FACCF1AFB9204008FA782 /* RKMultiUnitRuler_Example */, 241 | 607FACE41AFB9204008FA782 /* RKMultiUnitRuler_Tests */, 242 | ); 243 | }; 244 | /* End PBXProject section */ 245 | 246 | /* Begin PBXResourcesBuildPhase section */ 247 | 607FACCE1AFB9204008FA782 /* Resources */ = { 248 | isa = PBXResourcesBuildPhase; 249 | buildActionMask = 2147483647; 250 | files = ( 251 | 607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */, 252 | 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */, 253 | 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */, 254 | ); 255 | runOnlyForDeploymentPostprocessing = 0; 256 | }; 257 | 607FACE31AFB9204008FA782 /* Resources */ = { 258 | isa = PBXResourcesBuildPhase; 259 | buildActionMask = 2147483647; 260 | files = ( 261 | ); 262 | runOnlyForDeploymentPostprocessing = 0; 263 | }; 264 | /* End PBXResourcesBuildPhase section */ 265 | 266 | /* Begin PBXShellScriptBuildPhase section */ 267 | 14B14E0125FC6150109000E5 /* [CP] Embed Pods Frameworks */ = { 268 | isa = PBXShellScriptBuildPhase; 269 | buildActionMask = 2147483647; 270 | files = ( 271 | ); 272 | inputPaths = ( 273 | ); 274 | name = "[CP] Embed Pods Frameworks"; 275 | outputPaths = ( 276 | ); 277 | runOnlyForDeploymentPostprocessing = 0; 278 | shellPath = /bin/sh; 279 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-RKMultiUnitRuler_Example/Pods-RKMultiUnitRuler_Example-frameworks.sh\"\n"; 280 | showEnvVarsInLog = 0; 281 | }; 282 | 5149D9BF0C3B00567D11E0CF /* [CP] Copy Pods Resources */ = { 283 | isa = PBXShellScriptBuildPhase; 284 | buildActionMask = 2147483647; 285 | files = ( 286 | ); 287 | inputPaths = ( 288 | ); 289 | name = "[CP] Copy Pods Resources"; 290 | outputPaths = ( 291 | ); 292 | runOnlyForDeploymentPostprocessing = 0; 293 | shellPath = /bin/sh; 294 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-RKMultiUnitRuler_Tests/Pods-RKMultiUnitRuler_Tests-resources.sh\"\n"; 295 | showEnvVarsInLog = 0; 296 | }; 297 | 526128128FA271AF7C5576BF /* [CP] Copy Pods Resources */ = { 298 | isa = PBXShellScriptBuildPhase; 299 | buildActionMask = 2147483647; 300 | files = ( 301 | ); 302 | inputPaths = ( 303 | ); 304 | name = "[CP] Copy Pods Resources"; 305 | outputPaths = ( 306 | ); 307 | runOnlyForDeploymentPostprocessing = 0; 308 | shellPath = /bin/sh; 309 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-RKMultiUnitRuler_Example/Pods-RKMultiUnitRuler_Example-resources.sh\"\n"; 310 | showEnvVarsInLog = 0; 311 | }; 312 | 8311422C5F1F17F19C244A49 /* [CP] Check Pods Manifest.lock */ = { 313 | isa = PBXShellScriptBuildPhase; 314 | buildActionMask = 2147483647; 315 | files = ( 316 | ); 317 | inputPaths = ( 318 | ); 319 | name = "[CP] Check Pods Manifest.lock"; 320 | outputPaths = ( 321 | ); 322 | runOnlyForDeploymentPostprocessing = 0; 323 | shellPath = /bin/sh; 324 | shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; 325 | showEnvVarsInLog = 0; 326 | }; 327 | CD6038428D86A6123BB4E7E8 /* [CP] Check Pods Manifest.lock */ = { 328 | isa = PBXShellScriptBuildPhase; 329 | buildActionMask = 2147483647; 330 | files = ( 331 | ); 332 | inputPaths = ( 333 | ); 334 | name = "[CP] Check Pods Manifest.lock"; 335 | outputPaths = ( 336 | ); 337 | runOnlyForDeploymentPostprocessing = 0; 338 | shellPath = /bin/sh; 339 | shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; 340 | showEnvVarsInLog = 0; 341 | }; 342 | E80CD8324FEB0AD402CFAECA /* [CP] Embed Pods Frameworks */ = { 343 | isa = PBXShellScriptBuildPhase; 344 | buildActionMask = 2147483647; 345 | files = ( 346 | ); 347 | inputPaths = ( 348 | ); 349 | name = "[CP] Embed Pods Frameworks"; 350 | outputPaths = ( 351 | ); 352 | runOnlyForDeploymentPostprocessing = 0; 353 | shellPath = /bin/sh; 354 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-RKMultiUnitRuler_Tests/Pods-RKMultiUnitRuler_Tests-frameworks.sh\"\n"; 355 | showEnvVarsInLog = 0; 356 | }; 357 | /* End PBXShellScriptBuildPhase section */ 358 | 359 | /* Begin PBXSourcesBuildPhase section */ 360 | 607FACCC1AFB9204008FA782 /* Sources */ = { 361 | isa = PBXSourcesBuildPhase; 362 | buildActionMask = 2147483647; 363 | files = ( 364 | 607FACD81AFB9204008FA782 /* ViewController.swift in Sources */, 365 | 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */, 366 | ); 367 | runOnlyForDeploymentPostprocessing = 0; 368 | }; 369 | 607FACE11AFB9204008FA782 /* Sources */ = { 370 | isa = PBXSourcesBuildPhase; 371 | buildActionMask = 2147483647; 372 | files = ( 373 | 607FACEC1AFB9204008FA782 /* Tests.swift in Sources */, 374 | ); 375 | runOnlyForDeploymentPostprocessing = 0; 376 | }; 377 | /* End PBXSourcesBuildPhase section */ 378 | 379 | /* Begin PBXTargetDependency section */ 380 | 607FACE71AFB9204008FA782 /* PBXTargetDependency */ = { 381 | isa = PBXTargetDependency; 382 | target = 607FACCF1AFB9204008FA782 /* RKMultiUnitRuler_Example */; 383 | targetProxy = 607FACE61AFB9204008FA782 /* PBXContainerItemProxy */; 384 | }; 385 | /* End PBXTargetDependency section */ 386 | 387 | /* Begin PBXVariantGroup section */ 388 | 607FACD91AFB9204008FA782 /* Main.storyboard */ = { 389 | isa = PBXVariantGroup; 390 | children = ( 391 | 607FACDA1AFB9204008FA782 /* Base */, 392 | ); 393 | name = Main.storyboard; 394 | sourceTree = ""; 395 | }; 396 | 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */ = { 397 | isa = PBXVariantGroup; 398 | children = ( 399 | 607FACDF1AFB9204008FA782 /* Base */, 400 | ); 401 | name = LaunchScreen.xib; 402 | sourceTree = ""; 403 | }; 404 | /* End PBXVariantGroup section */ 405 | 406 | /* Begin XCBuildConfiguration section */ 407 | 607FACED1AFB9204008FA782 /* Debug */ = { 408 | isa = XCBuildConfiguration; 409 | buildSettings = { 410 | ALWAYS_SEARCH_USER_PATHS = NO; 411 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 412 | CLANG_CXX_LIBRARY = "libc++"; 413 | CLANG_ENABLE_MODULES = YES; 414 | CLANG_ENABLE_OBJC_ARC = YES; 415 | CLANG_WARN_BOOL_CONVERSION = YES; 416 | CLANG_WARN_CONSTANT_CONVERSION = YES; 417 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 418 | CLANG_WARN_EMPTY_BODY = YES; 419 | CLANG_WARN_ENUM_CONVERSION = YES; 420 | CLANG_WARN_INFINITE_RECURSION = YES; 421 | CLANG_WARN_INT_CONVERSION = YES; 422 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 423 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 424 | CLANG_WARN_UNREACHABLE_CODE = YES; 425 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 426 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 427 | COPY_PHASE_STRIP = NO; 428 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 429 | ENABLE_STRICT_OBJC_MSGSEND = YES; 430 | ENABLE_TESTABILITY = YES; 431 | GCC_C_LANGUAGE_STANDARD = gnu99; 432 | GCC_DYNAMIC_NO_PIC = NO; 433 | GCC_NO_COMMON_BLOCKS = YES; 434 | GCC_OPTIMIZATION_LEVEL = 0; 435 | GCC_PREPROCESSOR_DEFINITIONS = ( 436 | "DEBUG=1", 437 | "$(inherited)", 438 | ); 439 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 440 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 441 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 442 | GCC_WARN_UNDECLARED_SELECTOR = YES; 443 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 444 | GCC_WARN_UNUSED_FUNCTION = YES; 445 | GCC_WARN_UNUSED_VARIABLE = YES; 446 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 447 | MTL_ENABLE_DEBUG_INFO = YES; 448 | ONLY_ACTIVE_ARCH = YES; 449 | SDKROOT = iphoneos; 450 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 451 | }; 452 | name = Debug; 453 | }; 454 | 607FACEE1AFB9204008FA782 /* Release */ = { 455 | isa = XCBuildConfiguration; 456 | buildSettings = { 457 | ALWAYS_SEARCH_USER_PATHS = NO; 458 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 459 | CLANG_CXX_LIBRARY = "libc++"; 460 | CLANG_ENABLE_MODULES = YES; 461 | CLANG_ENABLE_OBJC_ARC = YES; 462 | CLANG_WARN_BOOL_CONVERSION = YES; 463 | CLANG_WARN_CONSTANT_CONVERSION = YES; 464 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 465 | CLANG_WARN_EMPTY_BODY = YES; 466 | CLANG_WARN_ENUM_CONVERSION = YES; 467 | CLANG_WARN_INFINITE_RECURSION = YES; 468 | CLANG_WARN_INT_CONVERSION = YES; 469 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 470 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 471 | CLANG_WARN_UNREACHABLE_CODE = YES; 472 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 473 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 474 | COPY_PHASE_STRIP = NO; 475 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 476 | ENABLE_NS_ASSERTIONS = NO; 477 | ENABLE_STRICT_OBJC_MSGSEND = YES; 478 | GCC_C_LANGUAGE_STANDARD = gnu99; 479 | GCC_NO_COMMON_BLOCKS = YES; 480 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 481 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 482 | GCC_WARN_UNDECLARED_SELECTOR = YES; 483 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 484 | GCC_WARN_UNUSED_FUNCTION = YES; 485 | GCC_WARN_UNUSED_VARIABLE = YES; 486 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 487 | MTL_ENABLE_DEBUG_INFO = NO; 488 | SDKROOT = iphoneos; 489 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 490 | VALIDATE_PRODUCT = YES; 491 | }; 492 | name = Release; 493 | }; 494 | 607FACF01AFB9204008FA782 /* Debug */ = { 495 | isa = XCBuildConfiguration; 496 | baseConfigurationReference = 7AE4B070F27E2717CF005B5A /* Pods-RKMultiUnitRuler_Example.debug.xcconfig */; 497 | buildSettings = { 498 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 499 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 500 | DEVELOPMENT_TEAM = ""; 501 | INFOPLIST_FILE = RKMultiUnitRuler/Info.plist; 502 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 503 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 504 | MODULE_NAME = ExampleApp; 505 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; 506 | PRODUCT_NAME = "$(TARGET_NAME)"; 507 | SWIFT_VERSION = 3.0; 508 | }; 509 | name = Debug; 510 | }; 511 | 607FACF11AFB9204008FA782 /* Release */ = { 512 | isa = XCBuildConfiguration; 513 | baseConfigurationReference = A127B5FC81BE8B71819B2BB7 /* Pods-RKMultiUnitRuler_Example.release.xcconfig */; 514 | buildSettings = { 515 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 516 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 517 | DEVELOPMENT_TEAM = ""; 518 | INFOPLIST_FILE = RKMultiUnitRuler/Info.plist; 519 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 520 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 521 | MODULE_NAME = ExampleApp; 522 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; 523 | PRODUCT_NAME = "$(TARGET_NAME)"; 524 | SWIFT_VERSION = 3.0; 525 | }; 526 | name = Release; 527 | }; 528 | 607FACF31AFB9204008FA782 /* Debug */ = { 529 | isa = XCBuildConfiguration; 530 | baseConfigurationReference = 4F3F82DFFE4CF41E732EE841 /* Pods-RKMultiUnitRuler_Tests.debug.xcconfig */; 531 | buildSettings = { 532 | DEVELOPMENT_TEAM = ""; 533 | FRAMEWORK_SEARCH_PATHS = ( 534 | "$(SDKROOT)/Developer/Library/Frameworks", 535 | "$(inherited)", 536 | ); 537 | GCC_PREPROCESSOR_DEFINITIONS = ( 538 | "DEBUG=1", 539 | "$(inherited)", 540 | ); 541 | INFOPLIST_FILE = Tests/Info.plist; 542 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 543 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; 544 | PRODUCT_NAME = "$(TARGET_NAME)"; 545 | SWIFT_VERSION = 3.0; 546 | }; 547 | name = Debug; 548 | }; 549 | 607FACF41AFB9204008FA782 /* Release */ = { 550 | isa = XCBuildConfiguration; 551 | baseConfigurationReference = 357DE5F9F095E9B5B47ACA5B /* Pods-RKMultiUnitRuler_Tests.release.xcconfig */; 552 | buildSettings = { 553 | DEVELOPMENT_TEAM = ""; 554 | FRAMEWORK_SEARCH_PATHS = ( 555 | "$(SDKROOT)/Developer/Library/Frameworks", 556 | "$(inherited)", 557 | ); 558 | INFOPLIST_FILE = Tests/Info.plist; 559 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 560 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; 561 | PRODUCT_NAME = "$(TARGET_NAME)"; 562 | SWIFT_VERSION = 3.0; 563 | }; 564 | name = Release; 565 | }; 566 | /* End XCBuildConfiguration section */ 567 | 568 | /* Begin XCConfigurationList section */ 569 | 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "RKMultiUnitRuler" */ = { 570 | isa = XCConfigurationList; 571 | buildConfigurations = ( 572 | 607FACED1AFB9204008FA782 /* Debug */, 573 | 607FACEE1AFB9204008FA782 /* Release */, 574 | ); 575 | defaultConfigurationIsVisible = 0; 576 | defaultConfigurationName = Release; 577 | }; 578 | 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "RKMultiUnitRuler_Example" */ = { 579 | isa = XCConfigurationList; 580 | buildConfigurations = ( 581 | 607FACF01AFB9204008FA782 /* Debug */, 582 | 607FACF11AFB9204008FA782 /* Release */, 583 | ); 584 | defaultConfigurationIsVisible = 0; 585 | defaultConfigurationName = Release; 586 | }; 587 | 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "RKMultiUnitRuler_Tests" */ = { 588 | isa = XCConfigurationList; 589 | buildConfigurations = ( 590 | 607FACF31AFB9204008FA782 /* Debug */, 591 | 607FACF41AFB9204008FA782 /* Release */, 592 | ); 593 | defaultConfigurationIsVisible = 0; 594 | defaultConfigurationName = Release; 595 | }; 596 | /* End XCConfigurationList section */ 597 | }; 598 | rootObject = 607FACC81AFB9204008FA782 /* Project object */; 599 | } 600 | -------------------------------------------------------------------------------- /Example/RKMultiUnitRuler.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/RKMultiUnitRuler.xcodeproj/xcshareddata/xcschemes/RKMultiUnitRuler-Example.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 47 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 65 | 66 | 67 | 68 | 78 | 80 | 86 | 87 | 88 | 89 | 90 | 91 | 97 | 99 | 105 | 106 | 107 | 108 | 110 | 111 | 114 | 115 | 116 | -------------------------------------------------------------------------------- /Example/RKMultiUnitRuler.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Example/RKMultiUnitRuler/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // RKMultiUnitRuler 4 | // 5 | // Created by Farshid Ghods on 01/07/2017. 6 | // Copyright (c) 2017 Farshid Ghods. 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 | return true 20 | } 21 | 22 | func applicationWillResignActive(_ application: UIApplication) { 23 | // 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. 24 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 25 | } 26 | 27 | func applicationDidEnterBackground(_ application: UIApplication) { 28 | // 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. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(_ application: UIApplication) { 33 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | func applicationDidBecomeActive(_ application: UIApplication) { 37 | // 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. 38 | } 39 | 40 | func applicationWillTerminate(_ application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /Example/RKMultiUnitRuler/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /Example/RKMultiUnitRuler/Base.lproj/Main.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 | 34 | 40 | 46 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | -------------------------------------------------------------------------------- /Example/RKMultiUnitRuler/Images.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 | } -------------------------------------------------------------------------------- /Example/RKMultiUnitRuler/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 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /Example/RKMultiUnitRuler/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // RKMultiUnitRulerDemo 4 | // 5 | // Created by Farshid Ghods on 12/29/16. 6 | // Copyright © 2016 Rekovery. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import RKMultiUnitRuler 11 | 12 | 13 | class ViewController: UIViewController, RKMultiUnitRulerDataSource, RKMultiUnitRulerDelegate { 14 | 15 | @IBOutlet weak var ruler: RKMultiUnitRuler? 16 | @IBOutlet weak var controlHConstraint: NSLayoutConstraint? 17 | @IBOutlet weak var colorSwitch: UISwitch? 18 | var backgroundColor: UIColor = UIColor(red: 0.22, green: 0.74, blue: 0.86, alpha: 1.0) 19 | 20 | @IBOutlet weak var directionSwitch: UISwitch? 21 | @IBOutlet weak var moreMarkersSwitch: UISwitch? 22 | 23 | var rangeStart = Measurement(value: 30.0, unit: UnitMass.kilograms) 24 | var rangeLength = Measurement(value: Double(90), unit: UnitMass.kilograms) 25 | 26 | var colorOverridesEnabled = false 27 | var moreMarkers = false 28 | var direction: RKLayerDirection = .horizontal 29 | 30 | var segments = Array() 31 | 32 | override func viewDidLoad() { 33 | super.viewDidLoad() 34 | self.colorSwitch?.addTarget(self, 35 | action: #selector(ViewController.colorSwitchValueChanged(sender:)), 36 | for: .valueChanged) 37 | self.directionSwitch?.addTarget(self, 38 | action: #selector(ViewController.directionSwitchValueChanged(sender:)), 39 | for: .valueChanged) 40 | self.moreMarkersSwitch?.addTarget(self, 41 | action: #selector(ViewController.moreMarkersSwitchValueChanged(sender:)), 42 | for: .valueChanged) 43 | ruler?.direction = direction 44 | ruler?.tintColor = UIColor(red: 0.15, green: 0.18, blue: 0.48, alpha: 1.0) 45 | controlHConstraint?.constant = 200.0 46 | segments = self.createSegments() 47 | ruler?.delegate = self 48 | ruler?.dataSource = self 49 | 50 | let initialValue = (self.rangeForUnit(UnitMass.kilograms).location + self.rangeForUnit(UnitMass.kilograms).length) / 2 51 | ruler?.measurement = NSMeasurement( 52 | doubleValue: Double(initialValue), 53 | unit: UnitMass.kilograms) 54 | self.view.layoutSubviews() 55 | // Do any additional setup after loading the view, typically from a nib. 56 | } 57 | 58 | private func createSegments() -> Array { 59 | let formatter = MeasurementFormatter() 60 | formatter.unitStyle = .medium 61 | formatter.unitOptions = .providedUnit 62 | let kgSegment = RKSegmentUnit(name: "Kilograms", unit: UnitMass.kilograms, formatter: formatter) 63 | 64 | kgSegment.name = "Kilogram" 65 | kgSegment.unit = UnitMass.kilograms 66 | let kgMarkerTypeMax = RKRangeMarkerType(color: UIColor.white, size: CGSize(width: 1.0, height: 50.0), scale: 5.0) 67 | kgMarkerTypeMax.labelVisible = true 68 | kgSegment.markerTypes = [ 69 | RKRangeMarkerType(color: UIColor.white, size: CGSize(width: 1.0, height: 35.0), scale: 0.5), 70 | RKRangeMarkerType(color: UIColor.white, size: CGSize(width: 1.0, height: 50.0), scale: 1.0)] 71 | 72 | let lbsSegment = RKSegmentUnit(name: "Pounds", unit: UnitMass.pounds, formatter: formatter) 73 | let lbsMarkerTypeMax = RKRangeMarkerType(color: UIColor.white, size: CGSize(width: 1.0, height: 50.0), scale: 10.0) 74 | 75 | lbsSegment.markerTypes = [ 76 | RKRangeMarkerType(color: UIColor.white, size: CGSize(width: 1.0, height: 35.0), scale: 1.0)] 77 | 78 | if moreMarkers { 79 | kgSegment.markerTypes.append(kgMarkerTypeMax) 80 | lbsSegment.markerTypes.append(lbsMarkerTypeMax) 81 | } 82 | kgSegment.markerTypes.last?.labelVisible = true 83 | lbsSegment.markerTypes.last?.labelVisible = true 84 | return [kgSegment, lbsSegment] 85 | } 86 | 87 | override func didReceiveMemoryWarning() { 88 | super.didReceiveMemoryWarning() 89 | // Dispose of any resources that can be recreated. 90 | } 91 | 92 | func unitForSegmentAtIndex(index: Int) -> RKSegmentUnit { 93 | return segments[index] 94 | } 95 | var numberOfSegments: Int { 96 | get { 97 | return segments.count 98 | } 99 | set { 100 | } 101 | } 102 | 103 | func rangeForUnit(_ unit: Dimension) -> RKRange { 104 | let locationConverted = rangeStart.converted(to: unit as! UnitMass) 105 | let lengthConverted = rangeLength.converted(to: unit as! UnitMass) 106 | return RKRange(location: ceilf(Float(locationConverted.value)), 107 | length: ceilf(Float(lengthConverted.value))) 108 | } 109 | 110 | func styleForUnit(_ unit: Dimension) -> RKSegmentUnitControlStyle { 111 | let style: RKSegmentUnitControlStyle = RKSegmentUnitControlStyle() 112 | style.scrollViewBackgroundColor = UIColor(red: 0.22, green: 0.74, blue: 0.86, alpha: 1.0) 113 | let range = self.rangeForUnit(unit) 114 | if unit == UnitMass.pounds { 115 | 116 | style.textFieldBackgroundColor = UIColor.clear 117 | // color override location:location+40% red , location+60%:location.100% green 118 | } else { 119 | style.textFieldBackgroundColor = UIColor.red 120 | } 121 | if (colorOverridesEnabled) { 122 | style.colorOverrides = [ 123 | RKRange(location: range.location, length: 0.1 * (range.length)): UIColor.red, 124 | RKRange(location: range.location + 0.4 * (range.length), length: 0.2 * (range.length)): UIColor.green] 125 | } 126 | style.textFieldBackgroundColor = UIColor.clear 127 | style.textFieldTextColor = UIColor.white 128 | return style 129 | } 130 | 131 | func valueChanged(measurement: NSMeasurement) { 132 | print("value changed to \(measurement.doubleValue)") 133 | } 134 | 135 | func colorSwitchValueChanged(sender: UISwitch) { 136 | colorOverridesEnabled = sender.isOn 137 | ruler?.refresh() 138 | } 139 | 140 | func directionSwitchValueChanged(sender: UISwitch) { 141 | if sender.isOn { 142 | direction = .vertical 143 | controlHConstraint?.constant = 400 144 | } else { 145 | direction = .horizontal 146 | controlHConstraint?.constant = 200 147 | } 148 | ruler?.direction = direction 149 | ruler?.refresh() 150 | self.view.layoutSubviews() 151 | } 152 | 153 | func moreMarkersSwitchValueChanged(sender: UISwitch) { 154 | moreMarkers = sender.isOn 155 | if moreMarkers { 156 | self.rangeLength = Measurement(value: Double(90), unit: UnitMass.kilograms) 157 | } else { 158 | self.rangeLength = Measurement(value: Double(130), unit: UnitMass.kilograms) 159 | } 160 | segments = self.createSegments() 161 | ruler?.refresh() 162 | self.view.layoutSubviews() 163 | } 164 | } 165 | 166 | -------------------------------------------------------------------------------- /Example/Tests/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 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /Example/Tests/Tests.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import XCTest 3 | import RKMultiUnitRuler 4 | 5 | class Tests: XCTestCase { 6 | 7 | override func setUp() { 8 | super.setUp() 9 | // Put setup code here. This method is called before the invocation of each test method in the class. 10 | } 11 | 12 | override func tearDown() { 13 | // Put teardown code here. This method is called after the invocation of each test method in the class. 14 | super.tearDown() 15 | } 16 | 17 | func testExample() { 18 | // This is an example of a functional test case. 19 | XCTAssert(true, "Pass") 20 | } 21 | 22 | func testPerformanceExample() { 23 | // This is an example of a performance test case. 24 | self.measure() { 25 | // Put the code you want to measure the time of here. 26 | } 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | 2 | The MIT License (MIT) 3 | 4 | Copyright (c) 2014 Farshid Ghods 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # RKMultiUnitRuler 2 | [![CI Status](https://travis-ci.org/farshidce/RKMultiUnitRuler.svg?style=flat)](https://travis-ci.org/farshidce/RKMultiUnitRuler) 3 | [![Version](https://img.shields.io/cocoapods/v/RKMultiUnitRuler.svg?style=flat)](http://cocoapods.org/pods/RKMultiUnitRuler) 4 | [![License](https://img.shields.io/cocoapods/l/RKMultiUnitRuler.svg?style=flat)](http://cocoapods.org/pods/RKMultiUnitRuler) 5 | [![Platform](https://img.shields.io/cocoapods/p/RKMultiUnitRuler.svg?style=flat)](http://cocoapods.org/pods/RKMultiUnitRuler) 6 | ![Swift version](https://img.shields.io/badge/swift-3.0-orange.svg) 7 | 8 | 9 | ## RKMultiUnitRuler - Customizable Ruler Control for iOS 10 | 11 | A cocoa pod that simplifies process of setting and reading values for different units. This control let the user 12 | specify multiple units ( e.g Kilograms and Pound) and specify markers for each unit and then let the user 13 | modify the value via scrolling or updating the textfield. 14 | 15 | ![Demo image](https://s3.amazonaws.com/farshid.ghods.github/rkmultiunitruler-1.gif) 16 | 17 | 18 | ## Requirements 19 | * iOS 10 or higher 20 | 21 | ## Example 22 | 23 | To run the example project, clone the repo, and run `pod install` from the Example directory first. 24 | 25 | ## Installation 26 | 27 | RKMultiUnitRuler is available through [CocoaPods](http://cocoapods.org). To install 28 | it, simply add the following line to your Podfile: 29 | 30 | ``` 31 | pod "RKMultiUnitRuler" 32 | ``` 33 | and run pod install in terminal. 34 | Usage 35 | 36 | ## RKMultiUnitRuler 37 | 38 | ### Compatibility 39 | 40 | iOS 10+ 41 | 42 | xCode 8.0+ 43 | 44 | Swift 3.0 45 | 46 | ####You can use storyboard to create a control element. 47 | 48 | 49 | 50 | ### Features 51 | - Extremely simple and easy to use 52 | - Customizable interface 53 | - Compatible with iOS 10.0 NSUnit Framework 54 | - Supports multiple units 55 | - Customize marker colors based on type or their value 56 | - Customize the width, length and number of markers of the ruler 57 | - Customize the unit formatter 58 | 59 | 60 | ## How to use 61 | 62 | 63 | ```swift 64 | class ViewController: UIViewController, RKMultiUnitRulerDataSource, RKMultiUnitRulerDelegate { 65 | 66 | } 67 | ``` 68 | 69 | Set the ruler direction to horizontal 70 | 71 | ```swift 72 | ruler.direction = .horizontal 73 | ``` 74 | 75 | ```swift 76 | ruler.direction = .vertical 77 | ``` 78 | ![Vertical Ruler](https://s3.amazonaws.com/farshid.ghods.github/ruler-vertical-1.jpg) 79 | 80 | Specify how many units the ruler will display 81 | 82 | ```swift 83 | var numberOfSegments: Int { 84 | get { 85 | return 2.0 86 | } 87 | } 88 | ``` 89 | 90 | Define multiple units (Pounds and Kilograms). 91 | In the example below we are creating two markers for Kilogram unit at 0.1 and 1.0 scale but we are creating one marker for Pounds. 92 | For instance if the range is between 10-12 the "Kgs" ruler will have markers for 10.0,10.1,10.2...11.0,11.1...12.0 93 | and the "lbs" ruler will display markers at 3.0, 4.0,...,26.0. 94 | 95 | 96 | ```swift 97 | func unitForSegmentAtIndex(index: Int) -> RKSegmentUnit { 98 | return segments[index] 99 | 100 | let formatter = MeasurementFormatter() 101 | formatter.unitStyle = .medium 102 | formatter.unitOptions = .providedUnit 103 | let kgSegment = RKSegmentUnit(name: "Kilograms", unit: UnitMass.kilograms, formatter: formatter) 104 | kgSegment.markerTypes = [ 105 | RKRangeMarkerType(color: UIColor.white, size: CGSize(width: 1.0, height: 35.0), scale: 0.1), 106 | RKRangeMarkerType(color: UIColor.white, size: CGSize(width: 1.0, height: 50.0), scale: 1.0)] 107 | let lbsSegment = RKSegmentUnit(name: "Pounds", unit: UnitMass.pounds, formatter: formatter) 108 | lbsSegment.markerTypes = [ 109 | RKRangeMarkerType(color: UIColor.white, size: CGSize(width: 1.0, height: 35.0), scale: 1.0)] 110 | kgSegment.markerTypes.last?.labelVisible = true 111 | lbsSegment.markerTypes.last?.labelVisible = true 112 | return [lbsSegment, kgSegment] 113 | } 114 | 115 | 116 | ``` 117 | 118 | The ruler will display markers between 30.0 and 130. kgs. rangeForUnit function needs 119 | to be implemented for returning the range for the given unit. Please note that 120 | ceilf method is used in order to round the float numbers to the closest int. 121 | 122 | ```swift 123 | 124 | var rangeStart = Measurement(value: 30.0, unit: UnitMass.kilograms) 125 | var rangeLength = Measurement(value: Double(130), unit: UnitMass.kilograms) 126 | 127 | func rangeForUnit(_ unit: Dimension) -> RKRange { 128 | let locationConverted = rangeStart.converted(to: unit as! UnitMass) 129 | let lengthConverted = rangeLength.converted(to: unit as! UnitMass) 130 | return RKRange(location: ceilf(Float(locationConverted.value)), 131 | length: ceilf(Float(lengthConverted.value))) 132 | } 133 | 134 | ``` 135 | 136 | 137 | Customize the style and font used for markers and the scroll views 138 | 139 | ```swift 140 | let style: RKSegmentUnitControlStyle = RKSegmentUnitControlStyle() 141 | style.scrollViewBackgroundColor = UIColor.blue 142 | style.textFieldBackgroundColor = UIColor.red 143 | style.textFieldBackgroundColor = UIColor.clear 144 | style.textFieldTextColor = UIColor.white 145 | return style 146 | ``` 147 | 148 | In order to apply multiple colors to the ruler for each unit you can set the colorOverrides property as shown below 149 | 150 | ```swift 151 | style.colorOverrides = [ 152 | RKRange(location: range.location, length: 0.1 * (range.length)): UIColor.red, 153 | RKRange(location: range.location + 0.4 * (range.length), length: 0.2 * (range.length)): UIColor.green] 154 | 155 | ``` 156 | 157 | ![Multi-color Markers](https://s3.amazonaws.com/farshid.ghods.github/ruler-color-1.jpg) 158 | 159 | 160 | Implement RKMultiUnitRulerDataSource protocol in order to customize units, range and the style used for drawing the markers 161 | ```swift 162 | func unitForSegmentAtIndex(index: Int) -> RKSegmentUnit 163 | 164 | func rangeForUnit(_ unit: Dimension) -> RKRange 165 | 166 | var numberOfSegments: Int { get set } 167 | 168 | func styleForUnit(_ unit: Dimension) -> RKSegmentUnitControlStyle 169 | ``` 170 | 171 | To get the latest value that the user has picked, implement RKMultiUnitRulerDelegate. 172 | 173 | ```swift 174 | func valueChanged(measurement: NSMeasurement) { 175 | print("value changed to \(measurement.doubleValue)") 176 | } 177 | ``` 178 | 179 | 180 | ## Example 181 | 182 | To run the example project, clone the repo, and run `pod install` from the Example directory first. 183 | 184 | 185 | ## Support 186 | 187 | If you have any other questions regarding the use of this library, please contact us for support at info@cleveroad.com (email subject: "CRRulerControl. Support request.") 188 | 189 | ## Author 190 | 191 | [Farshid Ghods](farshid.ghods@gmail.com) 192 | 193 | ## Special Thanks 194 | 195 | [CRRulerControl](https://github.com/Cleveroad/CRRulerControl) 196 | 197 | [VitPilot Concept Design](https://www.behance.net/gallery/42058853/VitPilot-(Mobile-App)) 198 | 199 | ## Todos 200 | 201 | - create a version that works with iOS 8,9 202 | - add a circular slider/ruler 203 | - add a rating 1-5 ruler 204 | 205 | ## License 206 | 207 | The MIT License (MIT) 208 | 209 | Copyright (c) 2016 Rekovery Inc. 210 | 211 | Permission is hereby granted, free of charge, to any person obtaining a copy 212 | of this software and associated documentation files (the "Software"), to deal 213 | in the Software without restriction, including without limitation the rights 214 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 215 | copies of the Software, and to permit persons to whom the Software is 216 | furnished to do so, subject to the following conditions: 217 | 218 | The above copyright notice and this permission notice shall be included in all 219 | copies or substantial portions of the Software. 220 | 221 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 222 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 223 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 224 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 225 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 226 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 227 | SOFTWARE. 228 | -------------------------------------------------------------------------------- /RKMultiUnitRuler.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # Be sure to run `pod lib lint RKMultiUnitRuler.podspec' to ensure this is a 3 | # valid spec before submitting. 4 | # 5 | # Any lines starting with a # are optional, but their use is encouraged 6 | # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html 7 | # 8 | 9 | Pod::Spec.new do |s| 10 | s.name = 'RKMultiUnitRuler' 11 | s.version = '0.0.1' 12 | s.summary = 'Simple customizable ruler control that supports multiple units' 13 | 14 | # This description is used to generate tags and improve search results. 15 | # * Think: What does it do? Why did you write it? What is the focus? 16 | # * Try to keep it short, snappy and to the point. 17 | # * Write the description between the DESC delimiters below. 18 | # * Finally, don't worry about the indent, CocoaPods strips it! 19 | 20 | s.description = <<-DESC 21 | A simple customizable ruler control that support multiple units. The control supports these features: 22 | 23 | - Customizable interface 24 | - Compatible with iOS 10.0 NSUnit Framework 25 | - Supports multiple units 26 | - Customize marker colors based on type or their value 27 | - Customize the width, length and number of markers of the ruler 28 | - Customize the unit formatter 29 | DESC 30 | 31 | s.homepage = 'https://github.com/farshidce/RKMultiUnitRuler' 32 | s.screenshots = 'https://s3.amazonaws.com/farshid.ghods.github/ruler-color-1.jpg' 33 | s.license = { :type => 'MIT', :file => 'LICENSE' } 34 | s.author = { 'Farshid Ghods' => 'farshid.ghods@gmail.com' } 35 | s.source = { :git => 'https://github.com/farshidce/RKMultiUnitRuler.git', :tag => s.version.to_s } 36 | 37 | s.ios.deployment_target = '10.0' 38 | 39 | s.source_files = 'RKMultiUnitRuler/Classes/**/*' 40 | 41 | # s.resource_bundles = { 42 | # 'RKMultiUnitRuler' => ['RKMultiUnitRuler/Assets/*.png'] 43 | # } 44 | 45 | # s.public_header_files = 'Pod/Classes/**/*.h' 46 | s.frameworks = 'UIKit' 47 | end 48 | -------------------------------------------------------------------------------- /RKMultiUnitRuler/Assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/farshidce/RKMultiUnitRuler/060a9783631b081e7ee62eca4b979f7ab897c014/RKMultiUnitRuler/Assets/.gitkeep -------------------------------------------------------------------------------- /RKMultiUnitRuler/Classes/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/farshidce/RKMultiUnitRuler/060a9783631b081e7ee62eca4b979f7ab897c014/RKMultiUnitRuler/Classes/.gitkeep -------------------------------------------------------------------------------- /RKMultiUnitRuler/Classes/Constant.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Farshid Ghods on 12/27/16. 3 | // 4 | 5 | 6 | import UIKit 7 | 8 | 9 | let kDefaultScrollViewSideOffset = 30.0 as CGFloat 10 | let kDefaultPointerLayerSideOffset = 1.0 as CGFloat 11 | let kDefaultSegmentControlTitleFont = UIFont( 12 | descriptor: UIFontDescriptor(name: "HelveticaNeue-Bold", size: 12.0), 13 | size: 10.0) 14 | let kDefaultMarkerTypeFont: UIFont = UIFont( 15 | descriptor: UIFontDescriptor(name: "HelveticaNeue-Light", size: 12.0), 16 | size: 10.0) 17 | let kDefaultTextFieldFont: UIFont = UIFont( 18 | descriptor: UIFontDescriptor(name: "HelveticaNeue-Light", size: 12.0), 19 | size: 10.0) 20 | let kScrollAnimationSpeed: CGFloat = 300.0 21 | let kRangeLayerMaximumWidth: Float = 7000.0 22 | let kRangeLayerMaximumHeight: Float = 7000.0 23 | -------------------------------------------------------------------------------- /RKMultiUnitRuler/Classes/RKMultiUnitRuler.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Farshid Ghods on 12/27/16. 3 | // 4 | 5 | import UIKit 6 | 7 | 8 | /* 9 | 10 | public class RKSegmentUnitFormatter { 11 | open var unit : Dimension? 12 | open var markerTypes: Array = Array() 13 | open func string(from measurement: Measurement) -> String { 14 | } 15 | } 16 | */ 17 | 18 | 19 | public enum RKLayerDirection: Int { 20 | case vertical = 0, horizontal 21 | } 22 | 23 | 24 | public class RKSegmentUnit: NSObject, NSCopying { 25 | public var unit: Dimension? 26 | public var name: String = String() 27 | public var image: UIImage? 28 | public var markerTypes: Array = Array() 29 | 30 | 31 | public var formatter: MeasurementFormatter? { 32 | didSet { 33 | if let formatter = self.formatter { 34 | if formatter.numberFormatter.numberStyle == .decimal { 35 | let numberFormatter: NumberFormatter = NumberFormatter() 36 | numberFormatter.paddingPosition = .afterSuffix 37 | numberFormatter.maximumFractionDigits = 2 38 | formatter.numberFormatter = numberFormatter 39 | } 40 | } 41 | } 42 | } 43 | 44 | public convenience init(name: String, unit: Dimension, formatter: MeasurementFormatter) { 45 | self.init() 46 | self.name = name 47 | self.unit = unit 48 | self.formatter = formatter 49 | } 50 | 51 | 52 | public func copy(with zone: NSZone? = nil) -> Any { 53 | let copy = RKSegmentUnit() 54 | copy.image = self.image 55 | copy.name = self.name 56 | copy.markerTypes = self.markerTypes 57 | copy.formatter = self.formatter 58 | return copy 59 | } 60 | } 61 | 62 | public class RKSegmentUnitControlStyle: NSObject { 63 | public var textFieldBackgroundColor: UIColor = UIColor.clear 64 | public var textFieldFont: UIFont = kDefaultTextFieldFont 65 | public var textFieldTextColor: UIColor = UIColor.white 66 | public var scrollViewBackgroundColor: UIColor = UIColor.clear 67 | public var colorOverrides: Dictionary, UIColor>? 68 | } 69 | 70 | 71 | public protocol RKMultiUnitRulerDataSource { 72 | 73 | func unitForSegmentAtIndex(index: Int) -> RKSegmentUnit 74 | 75 | func rangeForUnit(_ unit: Dimension) -> RKRange 76 | 77 | var numberOfSegments: Int { get set } 78 | 79 | func styleForUnit(_ unit: Dimension) -> RKSegmentUnitControlStyle 80 | 81 | } 82 | 83 | 84 | public protocol RKMultiUnitRulerDelegate { 85 | func valueChanged(measurement: NSMeasurement) 86 | } 87 | 88 | 89 | public class RKMultiUnitRuler: UIView { 90 | public var dataSource: RKMultiUnitRulerDataSource? { 91 | didSet { 92 | setupViews() 93 | } 94 | } 95 | public var delegate: RKMultiUnitRulerDelegate? 96 | public var measurement: NSMeasurement? 97 | private var segmentControl: UISegmentedControl = UISegmentedControl() 98 | private var segmentedViews: Array? 99 | private var pointerViews: Array? 100 | private var scrollViews: Array? 101 | private var textViews: Array? 102 | public var direction: RKLayerDirection = .horizontal 103 | 104 | public required override init(frame: CGRect) { 105 | super.init(frame: frame) 106 | setupViews() 107 | } 108 | 109 | public required init?(coder aDecoder: NSCoder) { 110 | super.init(coder: aDecoder) 111 | setupViews() 112 | } 113 | 114 | private func setupDefaultValues() { 115 | 116 | } 117 | 118 | open func refresh() { 119 | setupViews() 120 | } 121 | 122 | private func setupViews() { 123 | if let _ = self.dataSource { 124 | self.subviews.forEach({ $0.removeFromSuperview() }) 125 | let segmentControl = setupSegmentControl() 126 | let (segmentedViews, scrollViews, textViews, pointerViews) = setupSegmentViews() 127 | self.segmentedViews = segmentedViews 128 | self.scrollViews = scrollViews 129 | self.textViews = textViews 130 | self.pointerViews = pointerViews 131 | var constraints = Array() 132 | switch (self.direction) { 133 | case .horizontal: 134 | constraints += NSLayoutConstraint.constraints( 135 | withVisualFormat: "H:|-5-[segmentControl]-5-|", 136 | options: NSLayoutFormatOptions.directionLeadingToTrailing, 137 | metrics: nil, 138 | views: ["segmentControl": self.segmentControl]) 139 | for segmentView in segmentedViews { 140 | constraints += NSLayoutConstraint.constraints( 141 | withVisualFormat: "H:|-5-[segmentView]-5-|", 142 | options: NSLayoutFormatOptions.directionLeadingToTrailing, 143 | metrics: nil, 144 | views: ["segmentView": segmentView]) 145 | constraints += NSLayoutConstraint.constraints( 146 | withVisualFormat: "V:|-5-[segmentControl]-5-[segmentView]-5-|", 147 | options: NSLayoutFormatOptions.directionLeadingToTrailing, 148 | metrics: nil, 149 | views: ["segmentView": segmentView, "segmentControl": segmentControl]) 150 | } 151 | case .vertical: 152 | constraints += NSLayoutConstraint.constraints( 153 | withVisualFormat: "H:|-5-[segmentControl]-5-|", 154 | options: NSLayoutFormatOptions.directionLeadingToTrailing, 155 | metrics: nil, 156 | views: ["segmentControl": self.segmentControl]) 157 | for segmentView in segmentedViews { 158 | constraints += NSLayoutConstraint.constraints( 159 | withVisualFormat: "H:|-5-[segmentView]-5-|", 160 | options: NSLayoutFormatOptions.directionLeadingToTrailing, 161 | metrics: nil, 162 | views: ["segmentView": segmentView]) 163 | constraints += NSLayoutConstraint.constraints( 164 | withVisualFormat: "V:|-5-[segmentControl]-5-[segmentView]-5-|", 165 | options: NSLayoutFormatOptions.directionLeadingToTrailing, 166 | metrics: nil, 167 | views: ["segmentView": segmentView, "segmentControl": segmentControl]) 168 | } 169 | 170 | } 171 | segmentControl.addTarget(self, 172 | action: #selector(RKMultiUnitRuler.segmentSelectionChanged(_:)), 173 | for: UIControlEvents.valueChanged) 174 | self.addConstraints(constraints) 175 | self.segmentSelectionChanged(self.segmentControl) 176 | } 177 | } 178 | 179 | private func setupSegmentControl() -> UISegmentedControl { 180 | if let dataSource = self.dataSource { 181 | self.segmentControl = UISegmentedControl() 182 | self.segmentControl.translatesAutoresizingMaskIntoConstraints = false 183 | for index in 0 ... dataSource.numberOfSegments - 1 { 184 | self.segmentControl.insertSegment(withTitle: dataSource.unitForSegmentAtIndex( 185 | index: index).name, 186 | at: index, animated: true) 187 | } 188 | 189 | if (dataSource.numberOfSegments > 0) { 190 | self.segmentControl.selectedSegmentIndex = 0 191 | if let unit = dataSource.unitForSegmentAtIndex(index: 0).unit { 192 | let style = dataSource.styleForUnit(unit) 193 | self.segmentControl.tintColor = UIColor.yellow 194 | self.segmentControl.setTitleTextAttributes( 195 | [NSForegroundColorAttributeName: style.textFieldTextColor, 196 | NSFontAttributeName: kDefaultSegmentControlTitleFont], for: .normal) 197 | } 198 | } 199 | self.addSubview(self.segmentControl) 200 | if let tintColor = self.tintColor { 201 | self.segmentControl.tintColor = tintColor 202 | } 203 | } 204 | return self.segmentControl 205 | } 206 | 207 | func segmentSelectionChanged(_ sender: UISegmentedControl) { 208 | if let segmentedViews = self.segmentedViews { 209 | for i in 0 ... segmentedViews.count - 1 { 210 | if i == segmentControl.selectedSegmentIndex { 211 | segmentedViews[i].isHidden = false 212 | } else { 213 | segmentedViews[i].isHidden = true 214 | } 215 | let _ = self.textViews?[i].resignFirstResponder() 216 | } 217 | } 218 | if let dataSource = self.dataSource, let scrollViews = self.scrollViews { 219 | let segmentUnit = dataSource.unitForSegmentAtIndex(index: segmentControl.selectedSegmentIndex) 220 | if let measurement = self.measurement, let unit = segmentUnit.unit { 221 | var value = Float(measurement.converting(to: unit).value) 222 | let minScale = RKRangeMarkerType.minScale(types: segmentUnit.markerTypes) 223 | value = Float(lroundf(value / minScale)) * minScale 224 | self.textViews?[segmentControl.selectedSegmentIndex].currentValue = value 225 | scrollViews[segmentControl.selectedSegmentIndex].currentValue = value 226 | scrollViews[segmentControl.selectedSegmentIndex].scrollToCurrentValueOffset() 227 | let style = dataSource.styleForUnit(unit) 228 | self.segmentControl.setTitleTextAttributes( 229 | [NSForegroundColorAttributeName: style.textFieldTextColor, 230 | NSFontAttributeName: kDefaultSegmentControlTitleFont], for: .normal) 231 | } 232 | } 233 | } 234 | 235 | func scrollViewCurrentValueChanged(_ sender: RKRangeScrollView) { 236 | if let dataSource = self.dataSource { 237 | let activeSegmentUnit = dataSource.unitForSegmentAtIndex( 238 | index: segmentControl.selectedSegmentIndex) 239 | if let unit = activeSegmentUnit.unit, 240 | let scrollViewOfSelectedSegment = self.scrollViews?[segmentControl.selectedSegmentIndex] { 241 | self.measurement = NSMeasurement(doubleValue: Double(scrollViewOfSelectedSegment.currentValue), 242 | unit: unit) 243 | self.delegate?.valueChanged(measurement: self.measurement!) 244 | updateTextFields() 245 | } 246 | } 247 | } 248 | 249 | func textViewValueChanged(_ sender: RKRangeTextView) { 250 | if let dataSource = self.dataSource { 251 | let activeSegmentUnit = dataSource.unitForSegmentAtIndex( 252 | index: segmentControl.selectedSegmentIndex) 253 | if let textViews = self.textViews, let unit = activeSegmentUnit.unit { 254 | self.measurement = NSMeasurement(doubleValue: Double(textViews[segmentControl.selectedSegmentIndex].currentValue), 255 | unit: unit) 256 | self.delegate?.valueChanged(measurement: self.measurement!) 257 | } 258 | self.updateScrollViews() 259 | } 260 | } 261 | 262 | func updateScrollViews() { 263 | if let dataSource = self.dataSource { 264 | if let scrollViews = self.scrollViews { 265 | for index in 0 ... scrollViews.count - 1 { 266 | let segmentUnit = dataSource.unitForSegmentAtIndex(index: index) 267 | if let measurement = self.measurement, let unit = segmentUnit.unit { 268 | let value = Float(measurement.converting(to: unit).value) 269 | scrollViews[index].currentValue = value 270 | } 271 | if index == segmentControl.selectedSegmentIndex { 272 | scrollViews[index].scrollToCurrentValueOffset() 273 | } 274 | } 275 | } 276 | } 277 | } 278 | 279 | func updateTextFields() { 280 | if let dataSource = self.dataSource { 281 | if let scrollViews = self.scrollViews { 282 | for index in 0 ... scrollViews.count - 1 { 283 | let segmentUnit = dataSource.unitForSegmentAtIndex(index: index) 284 | if let measurement = self.measurement, let unit = segmentUnit.unit { 285 | var value = Float(measurement.converting(to: unit).value) 286 | let minScale = RKRangeMarkerType.minScale(types: segmentUnit.markerTypes) 287 | value = Float(lroundf(value / minScale)) * minScale 288 | if index != segmentControl.selectedSegmentIndex { 289 | self.textViews?[index].currentValue = value 290 | } else { 291 | DispatchQueue.main.async { 292 | let _ = self.textViews?[index].resignFirstResponder() 293 | self.textViews?[index].currentValue = value 294 | } 295 | } 296 | } 297 | } 298 | } 299 | } 300 | } 301 | 302 | 303 | private func setupSegmentViews() -> (Array, Array, Array, Array) { 304 | var segmentViews: [UIView] = [] 305 | var pointerViews: [RKRangePointerView] = [] 306 | var scrollViews: [RKRangeScrollView] = [] 307 | var textViews: [RKRangeTextView] = [] 308 | if let dataSource = self.dataSource { 309 | var names = Array() 310 | for index in 0 ... dataSource.numberOfSegments - 1 { 311 | let segmentView: UIView = UIView(frame: CGRect.zero) 312 | segmentView.translatesAutoresizingMaskIntoConstraints = false 313 | let segmentUnit = dataSource.unitForSegmentAtIndex(index: index) 314 | if let unit = segmentUnit.unit { 315 | let style = dataSource.styleForUnit(unit) 316 | let range = dataSource.rangeForUnit(unit) 317 | names.append(segmentUnit.name) 318 | let pointerView = self.setupPointerView(inSegmentView: segmentView, 319 | unit: segmentUnit, 320 | segmentStyle: style) 321 | let scrollView = self.setupSegmentScrollView(inSegmentView: segmentView, 322 | unit: segmentUnit, segmentStyle: style, 323 | range: range) 324 | let textView = self.setupSegmentBottomView(inSegmentView: segmentView, 325 | unit: segmentUnit, style: style) 326 | let underlineView = self.setupSegmentLineUnderBottomView(inSegmentView: segmentView) 327 | let segmentSubViews = ["scrollView": scrollView, 328 | "textView": textView, 329 | "underlineView": underlineView, 330 | "pointerView": pointerView] 331 | var constraints = Array() 332 | switch (self.direction) { 333 | case .vertical: 334 | constraints += NSLayoutConstraint.constraints(withVisualFormat: "V:|-5-[scrollView]-5-|", 335 | options: NSLayoutFormatOptions.directionLeadingToTrailing, 336 | metrics: nil, 337 | views: segmentSubViews) 338 | constraints += NSLayoutConstraint.constraints(withVisualFormat: "H:|-5-[pointerView(10)]-0-[scrollView]-5-[textView]-5-|", 339 | options: NSLayoutFormatOptions.directionLeadingToTrailing, 340 | metrics: nil, 341 | views: segmentSubViews) 342 | constraints += NSLayoutConstraint.constraints(withVisualFormat: "V:|-5-[pointerView]-5-|", 343 | options: NSLayoutFormatOptions.directionLeadingToTrailing, 344 | metrics: nil, 345 | views: segmentSubViews) 346 | constraints += NSLayoutConstraint.constraints(withVisualFormat: "H:|-5-[pointerView(10)]-0-[scrollView]-5-[underlineView]-5-|", 347 | options: NSLayoutFormatOptions.directionLeadingToTrailing, 348 | metrics: nil, 349 | views: segmentSubViews) 350 | constraints += NSLayoutConstraint.constraints( 351 | withVisualFormat: "V:|-10-[textView(25)]-1-[underlineView(2)]", 352 | options: NSLayoutFormatOptions.alignAllCenterX, 353 | metrics: nil, 354 | views: segmentSubViews) 355 | case .horizontal: 356 | constraints += NSLayoutConstraint.constraints(withVisualFormat: "H:|-5-[scrollView]-5-|", 357 | options: NSLayoutFormatOptions.directionLeadingToTrailing, 358 | metrics: nil, 359 | views: segmentSubViews) 360 | constraints += NSLayoutConstraint.constraints(withVisualFormat: "H:|-5-[textView]-5-|", 361 | options: NSLayoutFormatOptions.directionLeadingToTrailing, 362 | metrics: nil, 363 | views: segmentSubViews) 364 | constraints += NSLayoutConstraint.constraints(withVisualFormat: "H:|-5-[pointerView]-5-|", 365 | options: NSLayoutFormatOptions.directionLeadingToTrailing, 366 | metrics: nil, 367 | views: segmentSubViews) 368 | constraints += NSLayoutConstraint.constraints(withVisualFormat: "H:|-5-[underlineView]-5-|", 369 | options: NSLayoutFormatOptions.directionLeadingToTrailing, 370 | metrics: nil, 371 | views: segmentSubViews) 372 | constraints += NSLayoutConstraint.constraints( 373 | withVisualFormat: "V:|-5-[pointerView(10)]-0-[scrollView]-5-[textView(25)]-1-[underlineView(2)]-5-|", 374 | options: NSLayoutFormatOptions.directionLeadingToTrailing, 375 | metrics: nil, 376 | views: segmentSubViews) 377 | } 378 | self.backgroundColor = style.scrollViewBackgroundColor 379 | segmentView.addConstraints(constraints) 380 | segmentView.backgroundColor = style.scrollViewBackgroundColor 381 | segmentViews.append(segmentView) 382 | scrollViews.append(scrollView) 383 | textViews.append(textView) 384 | pointerViews.append(pointerView) 385 | self.addSubview(segmentView) 386 | } 387 | } 388 | } 389 | return (segmentViews, scrollViews, textViews, pointerViews) 390 | } 391 | 392 | private func setupPointerView(inSegmentView parent: UIView, 393 | unit segmentUnit: RKSegmentUnit, 394 | segmentStyle style: RKSegmentUnitControlStyle) -> RKRangePointerView { 395 | let pointerView = RKRangePointerView(frame: self.bounds) 396 | pointerView.translatesAutoresizingMaskIntoConstraints = false 397 | pointerView.direction = self.direction 398 | pointerView.backgroundColor = style.scrollViewBackgroundColor 399 | parent.addSubview(pointerView) 400 | return pointerView 401 | } 402 | 403 | private func setupSegmentScrollView(inSegmentView parent: UIView, 404 | unit segmentUnit: RKSegmentUnit, 405 | segmentStyle style: RKSegmentUnitControlStyle, 406 | range floatRange: RKRange) -> RKRangeScrollView { 407 | let scrollView = RKRangeScrollView(frame: self.bounds) 408 | scrollView.markerTypes = segmentUnit.markerTypes 409 | scrollView.backgroundColor = style.scrollViewBackgroundColor 410 | scrollView.range = floatRange 411 | scrollView.colorOverrides = style.colorOverrides 412 | scrollView.direction = self.direction 413 | scrollView.translatesAutoresizingMaskIntoConstraints = false 414 | scrollView.addTarget(self, 415 | action: #selector(RKMultiUnitRuler.scrollViewCurrentValueChanged(_:)), 416 | for: .valueChanged) 417 | parent.addSubview(scrollView) 418 | return scrollView 419 | } 420 | 421 | private func setupSegmentBottomView(inSegmentView parent: UIView, 422 | unit segmentUnit: RKSegmentUnit, 423 | style: RKSegmentUnitControlStyle) -> RKRangeTextView { 424 | let textView = RKRangeTextView(frame: self.bounds) 425 | textView.backgroundColor = style.textFieldBackgroundColor 426 | textView.textField.backgroundColor = style.textFieldBackgroundColor 427 | textView.textField.textColor = style.textFieldTextColor 428 | textView.unit = segmentUnit.unit 429 | textView.formatter = segmentUnit.formatter 430 | textView.translatesAutoresizingMaskIntoConstraints = false 431 | textView.addTarget(self, 432 | action: #selector(RKMultiUnitRuler.textViewValueChanged(_:)), 433 | for: .valueChanged) 434 | parent.addSubview(textView) 435 | return textView 436 | } 437 | 438 | 439 | private func setupSegmentLineUnderBottomView(inSegmentView parent: UIView) -> UIView { 440 | let view = UIView(frame: self.bounds) 441 | view.backgroundColor = UIColor.white 442 | view.translatesAutoresizingMaskIntoConstraints = false 443 | parent.addSubview(view) 444 | return view 445 | } 446 | 447 | override public func layoutSubviews() { 448 | super.layoutSubviews() 449 | if let segmentedViews = self.segmentedViews { 450 | for segmentView in segmentedViews { 451 | segmentView.layoutSubviews() 452 | } 453 | } 454 | updateScrollViews() 455 | updateTextFields() 456 | } 457 | } 458 | -------------------------------------------------------------------------------- /RKMultiUnitRuler/Classes/RKRangeLayer.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Farshid Ghods on 12/27/16. 3 | // Copyright (c) 2016 Rekovery. All rights reserved. 4 | // 5 | 6 | import UIKit 7 | import QuartzCore 8 | 9 | 10 | public enum RKMarkerVerticalAlignment: Int { 11 | case bottom = 0, center, top 12 | } 13 | 14 | 15 | public class RKRange: NSObject { 16 | open var location: T 17 | open var length: T 18 | 19 | public init(location: T, length: T) { 20 | self.location = location 21 | self.length = length 22 | super.init() 23 | } 24 | 25 | public override var description: String { 26 | return String("location : \(self.location) length: \(self.length)") 27 | } 28 | 29 | public override var debugDescription: String { 30 | return String("location : \(self.location) length: \(self.length)") 31 | } 32 | } 33 | 34 | 35 | public class RKRangeMarkerType: NSObject, NSCopying { 36 | open var name: String? 37 | open var scale: Float = 1 38 | open var image: UIImage? 39 | open var labelVisible: Bool = false 40 | open var size: CGSize = CGSize(width: 2.0, height: 10.0) 41 | open var color: UIColor = UIColor.white 42 | open var font: UIFont = kDefaultMarkerTypeFont 43 | 44 | public convenience init(color: UIColor, size: CGSize, scale: Float) { 45 | self.init() 46 | self.color = color 47 | self.size = size 48 | self.scale = scale 49 | } 50 | 51 | public override var description: String { 52 | return String("scale : \(self.scale) name: \(self.name) " + 53 | "color: \(self.color) font: \(self.font.description) size: \(self.size.debugDescription)") 54 | } 55 | 56 | class func minScale(types: Array?) -> Float { 57 | var minScale = Float.greatestFiniteMagnitude 58 | if let types = types { 59 | for markerType in types { 60 | minScale = fmin(markerType.scale, minScale) 61 | } 62 | } 63 | return minScale 64 | } 65 | 66 | class func largestScale(types: Array?) -> Float { 67 | 68 | var largestScale = Float.leastNormalMagnitude 69 | if let types = types { 70 | for markerType in types { 71 | largestScale = fmax(markerType.scale, largestScale) 72 | } 73 | } 74 | return largestScale 75 | } 76 | 77 | public func copy(with zone: NSZone? = nil) -> Any { 78 | let copy = RKRangeMarkerType() 79 | copy.scale = self.scale 80 | copy.name = self.name 81 | copy.color = self.color 82 | copy.font = self.font 83 | copy.image = self.image 84 | copy.size = self.size 85 | copy.labelVisible = self.labelVisible 86 | return copy 87 | } 88 | } 89 | 90 | class RKRangeMarker: NSObject { 91 | var type: RKRangeMarkerType = RKRangeMarkerType() 92 | var value: Float = 0.0 93 | var alignment: RKMarkerVerticalAlignment = RKMarkerVerticalAlignment.top 94 | var text: String = "" 95 | var textAlignment: RKMarkerVerticalAlignment = RKMarkerVerticalAlignment.bottom 96 | var textFormatter: NumberFormatter { 97 | let formatter = NumberFormatter() 98 | formatter.numberStyle = NumberFormatter.Style.decimal 99 | formatter.maximumFractionDigits = 2 100 | return formatter 101 | } 102 | 103 | public override var description: String { 104 | return String("value: \(self.value) text: \(self.text)") 105 | } 106 | 107 | public override var debugDescription: String { 108 | return String("type : \(self.type) value: \(self.value) " + 109 | "textAlignment \(self.textAlignment)" + 110 | "alignment: \(self.alignment) text: \(self.text) textAlignment: \(self.textAlignment)") 111 | } 112 | } 113 | 114 | class RKRangeLayer: CALayer { 115 | var direction: RKLayerDirection = .horizontal 116 | var markerTypes: Array = Array() 117 | var colorOverrides: Dictionary, UIColor>? 118 | 119 | var range: RKRange = RKRange(location: 0, length: 0) { 120 | didSet { 121 | if range.length != 0 { 122 | self.setNeedsDisplay() 123 | } 124 | } 125 | } 126 | 127 | lazy var markers: Array = self.initializeMarkers() 128 | 129 | override var frame: CGRect { 130 | didSet { 131 | if (oldValue != self.frame) { 132 | self.markers = self.initializeMarkers() 133 | self.setNeedsDisplay() 134 | } 135 | } 136 | } 137 | 138 | override func display() { 139 | super.display() 140 | 141 | CATransaction.begin() 142 | CATransaction.setDisableActions(true) 143 | self.drawLayer() 144 | CATransaction.commit() 145 | } 146 | 147 | func initializeMarkers() -> Array { 148 | var valueToMarkerMap: [Float: RKRangeMarker] = [:] 149 | if (self.frame.size.width > 0 && self.markerTypes.count > 0) { 150 | let rangeStart = fmin(self.range.location, self.range.location + self.range.length) 151 | let rangeEnd = fmax(self.range.location, self.range.location + self.range.length) 152 | let sortedMarkerTypes = self.markerTypes.sorted { 153 | $0.scale < $1.scale 154 | } 155 | for markerType in sortedMarkerTypes { 156 | var location = rangeStart 157 | while location <= rangeEnd { 158 | let marker = RKRangeMarker() 159 | marker.text = String(location) 160 | marker.value = location 161 | marker.type = markerType 162 | valueToMarkerMap[location] = marker 163 | location = location + markerType.scale 164 | } 165 | } 166 | } 167 | return valueToMarkerMap.values.sorted { 168 | $0.value < $1.value 169 | } 170 | } 171 | 172 | private func colorOverride(for location: Float) -> UIColor? { 173 | if let overrides = self.colorOverrides { 174 | for (range, color) in overrides { 175 | let rangeStart = fmin(range.location, range.location + range.length) 176 | let rangeEnd = fmax(range.location, range.location + range.length) 177 | if rangeStart <= location && location <= rangeEnd { 178 | return color 179 | } 180 | } 181 | } 182 | return nil 183 | } 184 | 185 | /* 186 | Draw the markers 187 | */ 188 | func drawLayer() { 189 | UIGraphicsBeginImageContextWithOptions(self.frame.size, false, UIScreen.main.scale); 190 | var position: Float = Float(kDefaultScrollViewSideOffset) 191 | var distanceBetweenLeastScaleMarkers: Float = 0.0 192 | switch self.direction { 193 | case .horizontal: 194 | distanceBetweenLeastScaleMarkers = Float(self.frame.width) / range.length 195 | case .vertical: 196 | distanceBetweenLeastScaleMarkers = Float(self.frame.height) / range.length 197 | } 198 | var previousMarker: RKRangeMarker? 199 | if let context = UIGraphicsGetCurrentContext() { 200 | for marker in self.markers { 201 | if let previousMarker = previousMarker { 202 | position = position + (marker.value - previousMarker.value) * distanceBetweenLeastScaleMarkers 203 | } 204 | switch (self.direction) { 205 | case .horizontal: 206 | self.drawMarkerInHorizontalDirection(marker, at: CGFloat(position), in: context) 207 | case .vertical: 208 | self.drawMarkerInVerticalDirection(marker, at: CGFloat(position), in: context) 209 | } 210 | previousMarker = marker 211 | } 212 | if let imageToDraw = UIGraphicsGetImageFromCurrentImageContext() { 213 | UIGraphicsEndImageContext(); 214 | imageToDraw.withRenderingMode(UIImageRenderingMode.alwaysTemplate) 215 | contents = imageToDraw.cgImage 216 | } 217 | } 218 | } 219 | 220 | /* 221 | Draw one marker. If marker.labelVisible is true then draw its numerical 222 | representation. 223 | marker.type.size is used for drawing the "thin" line that represents each 224 | marker 225 | */ 226 | func drawMarkerInHorizontalDirection(_ marker: RKRangeMarker, at pos: CGFloat, in context: CGContext) { 227 | let rangeEnd = fmax(self.range.location, self.range.location + self.range.length) 228 | let colorOverride = self.colorOverride(for: marker.value) 229 | let color = colorOverride ?? marker.type.color 230 | let textAttributes = [ 231 | NSFontAttributeName: marker.type.font, 232 | NSForegroundColorAttributeName: marker.type.color 233 | ] as [String: Any] 234 | let textSize = NSString(string: marker.text).size(attributes: textAttributes) 235 | let xPos = pos - marker.type.size.width / 2 236 | var yPos: CGFloat = 0.0 237 | 238 | switch (marker.alignment) { 239 | case .bottom: 240 | yPos = (self.frame.size.height - marker.type.size.height) / 2.0 241 | case .center: 242 | yPos = self.frame.size.height - marker.type.size.height - textSize.height 243 | case .top: 244 | yPos = 0 245 | } 246 | 247 | let textXPos = pos - textSize.width / 2 248 | var textYPos: CGFloat = 0.0 249 | 250 | switch (marker.textAlignment) { 251 | case .bottom: 252 | textYPos = textSize.height + marker.type.size.height 253 | case .center: 254 | textYPos = textSize.height + (marker.type.size.height) / 2 255 | case .top: 256 | textYPos = 0 257 | } 258 | let markerRect = CGRect(x: xPos, y: yPos, width: marker.type.size.width, height: marker.type.size.height) 259 | let markerTextRect = CGRect(x: textXPos, y: textYPos, width: textSize.width, height: textSize.height) 260 | context.setFillColor(color.cgColor) 261 | context.fill(markerRect) 262 | if marker.value >= rangeEnd || marker.type.labelVisible { 263 | NSString(string: marker.text).draw(in: markerTextRect, withAttributes: textAttributes) 264 | } 265 | } 266 | 267 | func drawMarkerInVerticalDirection(_ marker: RKRangeMarker, at pos: CGFloat, in context: CGContext) { 268 | let rangeEnd = fmax(self.range.location, self.range.location + self.range.length) 269 | let colorOverride = self.colorOverride(for: marker.value) 270 | let color = colorOverride ?? marker.type.color 271 | let textAttributes = [ 272 | NSFontAttributeName: marker.type.font, 273 | NSForegroundColorAttributeName: marker.type.color 274 | ] as [String: Any] 275 | let textSize = NSString(string: marker.text).size(attributes: textAttributes) 276 | 277 | let yPos = self.frame.height - pos - marker.type.size.width / 2 278 | var xPos: CGFloat = 0.0 279 | 280 | 281 | switch (marker.alignment) { 282 | case .bottom: 283 | xPos = (self.frame.size.width - marker.type.size.height - textSize.width) / 2.0 284 | case .center: 285 | xPos = self.frame.size.width - marker.type.size.height - textSize.width 286 | case .top: 287 | xPos = 0 288 | } 289 | 290 | let textYPos = self.frame.height - pos - textSize.width / 2 291 | var textXPos: CGFloat = 0.0 292 | 293 | switch (marker.textAlignment) { 294 | case .bottom: 295 | textXPos = textSize.width + marker.type.size.height 296 | case .center: 297 | textXPos = textSize.width + (marker.type.size.height) / 2 298 | case .top: 299 | textXPos = 0 300 | } 301 | let markerRect = CGRect(x: xPos, 302 | y: yPos, 303 | width: marker.type.size.height, 304 | height: marker.type.size.width) 305 | let markerTextRect = CGRect(x: textXPos, y: textYPos, width: textSize.width, height: textSize.height) 306 | context.setFillColor(color.cgColor) 307 | context.fill(markerRect) 308 | if marker.value >= rangeEnd || marker.type.labelVisible { 309 | NSString(string: marker.text).draw(in: markerTextRect, withAttributes: textAttributes) 310 | } 311 | } 312 | } 313 | -------------------------------------------------------------------------------- /RKMultiUnitRuler/Classes/RKRangePointerView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Farshid Ghods on 1/6/17. 3 | // Copyright (c) 2017 Rekovery. All rights reserved. 4 | // 5 | 6 | 7 | import UIKit 8 | import QuartzCore 9 | 10 | 11 | public enum RKRangePointerShape: Int { 12 | case triangle = 0, square 13 | } 14 | 15 | 16 | public class RKRangePointerView: UIView { 17 | 18 | var shape: RKRangePointerShape = .triangle 19 | var sideOffset = kDefaultPointerLayerSideOffset 20 | var fillColor: UIColor = UIColor.white 21 | var lineColor: UIColor = UIColor.white 22 | var direction: RKLayerDirection = .horizontal 23 | var radius: CGFloat = 6.0 24 | 25 | 26 | override init(frame: CGRect) { 27 | super.init(frame: frame) 28 | self.contentMode = .redraw 29 | } 30 | 31 | 32 | required public init?(coder aDecoder: NSCoder) { 33 | super.init(coder: aDecoder) 34 | self.contentMode = .redraw 35 | } 36 | 37 | 38 | override public func draw(_ rect: CGRect) { 39 | let center = CGPoint(x: self.bounds.size.width / 2.0, y: self.bounds.size.height / 2.0) 40 | // 41 | // 42 | // A ------ B 43 | // \ / 44 | // \ / 45 | // \/ 46 | // C 47 | let alpha = self.radius * 3 / sqrt(3) 48 | let pointA: CGPoint? 49 | let pointB: CGPoint? 50 | let pointC: CGPoint? 51 | switch self.direction { 52 | case .horizontal: 53 | pointA = CGPoint(x: center.x - 1 / 2 * alpha, y: self.sideOffset) 54 | pointB = CGPoint(x: center.x + 1 / 2 * alpha, y: self.sideOffset) 55 | pointC = CGPoint(x: center.x, y: self.bounds.height - self.sideOffset) 56 | case .vertical: 57 | pointA = CGPoint(x: self.sideOffset, y: center.y - 1 / 2 * alpha) 58 | pointB = CGPoint(x: self.sideOffset, y: center.y + 1 / 2 * alpha) 59 | pointC = CGPoint(x: self.bounds.width - self.sideOffset, y: center.y) 60 | } 61 | if let ctx = UIGraphicsGetCurrentContext(), let a = pointA, let b = pointB, let c = pointC { 62 | ctx.beginPath() 63 | ctx.move(to: c) 64 | ctx.addLine(to: b) 65 | ctx.addLine(to: a) 66 | ctx.addLine(to: c) 67 | ctx.setFillColor(self.fillColor.cgColor) 68 | ctx.setStrokeColor(self.lineColor.cgColor) 69 | ctx.setLineWidth(0.5) 70 | ctx.drawPath(using: .fillStroke) 71 | } 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /RKMultiUnitRuler/Classes/RKRangeScrollView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Farshid Ghods on 12/27/16. 3 | // 4 | 5 | import UIKit 6 | import QuartzCore 7 | 8 | class RKRangeScrollView: UIControl, UIScrollViewDelegate { 9 | 10 | open var sideOffset: CGFloat = kDefaultScrollViewSideOffset 11 | open var direction: RKLayerDirection = .horizontal 12 | open var colorOverrides: Dictionary, UIColor>? 13 | open var range: RKRange = RKRange(location: 0, length: 0) { 14 | didSet { 15 | setupScrollView() 16 | currentValue = ceilf((range.location + range.length) / 2.0) 17 | } 18 | } 19 | var markerTypes: Array? { 20 | didSet { 21 | setupScrollView() 22 | } 23 | } 24 | 25 | var automaticallyUpdatingScroll: Bool = false 26 | public var currentValue: Float = 0 27 | var scrollView: UIScrollView = UIScrollView() 28 | var rangeLayer: RKRangeLayer = RKRangeLayer() 29 | 30 | 31 | override init(frame: CGRect) { 32 | super.init(frame: frame) 33 | setupScrollView() 34 | 35 | } 36 | 37 | required init?(coder aDecoder: NSCoder) { 38 | super.init(coder: aDecoder) 39 | setupScrollView() 40 | } 41 | 42 | func setupScrollView() { 43 | if let _ = self.markerTypes { 44 | self.subviews.forEach({ $0.removeFromSuperview() }) 45 | self.scrollView = UIScrollView(frame: self.bounds) 46 | scrollView.translatesAutoresizingMaskIntoConstraints = false 47 | scrollView.autoresizingMask = [.flexibleHeight, .flexibleWidth] 48 | scrollView.delegate = self 49 | scrollView.bounces = false 50 | scrollView.showsHorizontalScrollIndicator = false 51 | scrollView.showsVerticalScrollIndicator = false 52 | self.setupRangeLayer() 53 | self.addSubview(scrollView) 54 | } 55 | } 56 | 57 | 58 | func setupRangeLayer() { 59 | if let markerTypes = self.markerTypes { 60 | self.rangeLayer = RKRangeLayer() 61 | self.rangeLayer.range = self.range 62 | self.rangeLayer.markerTypes = markerTypes 63 | self.scrollView.layer.addSublayer(rangeLayer) 64 | } 65 | } 66 | 67 | override func awakeFromNib() { 68 | super.awakeFromNib() 69 | setupScrollView() 70 | } 71 | 72 | 73 | func scrollViewDidScroll(_ scrollView: UIScrollView) { 74 | if (!automaticallyUpdatingScroll) { 75 | let oldValue = currentValue 76 | let minScale = RKRangeMarkerType.minScale(types: self.markerTypes) 77 | let rawValue = self.valueForContentOffset(contentOffset: self.scrollView.contentOffset) 78 | self.currentValue = Float(lroundf(rawValue / minScale)) * minScale 79 | if (oldValue != currentValue) { 80 | self.sendActions(for: UIControlEvents.valueChanged) 81 | } 82 | } 83 | } 84 | 85 | func scrollViewDidZoom(_ scrollView: UIScrollView) { 86 | 87 | } 88 | 89 | func scrollViewWillBeginDragging(_ scrollView: UIScrollView) { 90 | } 91 | 92 | func scrollViewWillEndDragging(_ scrollView: UIScrollView, withVelocity velocity: CGPoint, targetContentOffset: UnsafeMutablePointer) { 93 | var value = self.valueForContentOffset(contentOffset: targetContentOffset.pointee) 94 | let minScale = RKRangeMarkerType.minScale(types: self.markerTypes) 95 | value = Float(lroundf(value / minScale)) * minScale 96 | switch self.direction { 97 | case .horizontal: 98 | targetContentOffset.pointee.x = self.contentOffsetForValue(value: value).x 99 | case .vertical: 100 | targetContentOffset.pointee.y = self.contentOffsetForValue(value: value).y 101 | } 102 | } 103 | 104 | func scrollViewDidEndDragging(_ scrollView: UIScrollView, willDecelerate decelerate: Bool) { 105 | } 106 | 107 | func scrollViewWillBeginDecelerating(_ scrollView: UIScrollView) { 108 | } 109 | 110 | /* 111 | trigger "valueChanged" once deceleration is completed. 112 | */ 113 | func scrollViewDidEndDecelerating(_ scrollView: UIScrollView) { 114 | if (!automaticallyUpdatingScroll) { 115 | let oldValue = self.valueForContentOffset(contentOffset: self.scrollView.contentOffset) 116 | let minScale = RKRangeMarkerType.minScale(types: self.markerTypes) 117 | self.currentValue = Float(lroundf(oldValue / minScale)) * minScale 118 | self.sendActions(for: UIControlEvents.valueChanged) 119 | } 120 | } 121 | 122 | func scrollViewDidEndScrollingAnimation(_ scrollView: UIScrollView) { 123 | } 124 | 125 | func viewForZooming(`in` scrollView: UIScrollView) -> UIView? { 126 | return nil 127 | } 128 | 129 | func scrollViewWillBeginZooming(_ scrollView: UIScrollView, with view: UIView?) { 130 | } 131 | 132 | func scrollViewDidEndZooming(_ scrollView: UIScrollView, with view: UIView?, atScale scale: CGFloat) { 133 | } 134 | 135 | func scrollViewShouldScrollToTop(_ scrollView: UIScrollView) -> Bool { 136 | return false 137 | } 138 | 139 | func scrollViewDidScrollToTop(_ scrollView: UIScrollView) { 140 | } 141 | 142 | func contentOffsetForValue(value: Float) -> CGPoint { 143 | let rangeStart = fmin(self.range.location, self.range.location + self.range.length) 144 | switch self.direction { 145 | case .horizontal: 146 | let contentOffset: CGFloat = CGFloat(value - rangeStart) * self.offsetCoefficient() - scrollView.contentInset.left 147 | return CGPoint(x: contentOffset, y: scrollView.contentOffset.y) 148 | case .vertical: 149 | let contentOffset: CGFloat = self.rangeLayer.frame.height - CGFloat(value - rangeStart) * self.offsetCoefficient() - 150 | scrollView.contentInset.top - 2*self.sideOffset 151 | return CGPoint(x: scrollView.contentOffset.x, y: contentOffset) 152 | } 153 | } 154 | 155 | func scrollToCurrentValueOffset() { 156 | UIView.animate(withDuration: 0.2, 157 | animations: { 158 | self.automaticallyUpdatingScroll = true 159 | self.scrollView.setContentOffset(self.contentOffsetForValue(value: self.currentValue), animated: false) 160 | }, 161 | completion: { completed in 162 | self.automaticallyUpdatingScroll = false 163 | }) 164 | } 165 | 166 | func valueForContentOffset(contentOffset: CGPoint) -> Float { 167 | let rangeStart = fmin(self.range.location, self.range.location + self.range.length) 168 | switch self.direction { 169 | case .horizontal: 170 | let value = Float(rangeStart) + Float(contentOffset.x + self.scrollView.contentInset.left) / Float(self.offsetCoefficient()) 171 | return value 172 | case .vertical: 173 | let value = Float(rangeStart) + Float(self.rangeLayer.frame.height - 174 | (contentOffset.y + 2*self.sideOffset + self.scrollView.contentInset.top)) / Float(self.offsetCoefficient()) 175 | return value 176 | } 177 | } 178 | 179 | func offsetCoefficient() -> CGFloat { 180 | switch self.direction { 181 | case .horizontal: 182 | return self.self.rangeLayer.frame.width / CGFloat(fabs(range.length)) 183 | case .vertical: 184 | return self.self.rangeLayer.frame.height / CGFloat(fabs(range.length)) 185 | } 186 | } 187 | 188 | /* 189 | Use self.sideOffset as the margin for the left and right. 190 | Use the RangeLayer width as the content width and retain scrollView height 191 | 192 | */ 193 | override func layoutSubviews() { 194 | super.layoutSubviews() 195 | self.rangeLayer.direction = self.direction 196 | self.rangeLayer.colorOverrides = colorOverrides 197 | switch (self.direction) { 198 | case .horizontal: 199 | let sideInset = self.scrollView.frame.width / 2.0 200 | self.scrollView.contentInset = UIEdgeInsetsMake( 201 | 0, sideInset - self.sideOffset, 0, sideInset - self.sideOffset) 202 | case .vertical: 203 | let sideInset = self.scrollView.frame.height / 2.0 204 | self.scrollView.contentInset = UIEdgeInsetsMake( 205 | sideInset - self.sideOffset, 0, sideInset - self.sideOffset, 0) 206 | } 207 | CATransaction.begin() 208 | CATransaction.setDisableActions(true) 209 | self.rangeLayer.frame = self.frameForRangeLayer() 210 | CATransaction.commit() 211 | switch (self.direction) { 212 | case .horizontal: 213 | self.scrollView.contentSize = CGSize(width: self.rangeLayer.frame.width, height: self.frame.size.height) 214 | case .vertical: 215 | self.scrollView.contentSize = CGSize(width: self.frame.width, height: self.rangeLayer.frame.size.height) 216 | } 217 | self.scrollView.contentOffset = self.contentOffsetForValue(value: self.currentValue) 218 | } 219 | 220 | func frameForRangeLayer() -> CGRect { 221 | let maxScale = RKRangeMarkerType.largestScale(types: self.markerTypes) 222 | let scaleFitsInScreen = range.length < 5 * maxScale ? 1 : 5 * maxScale 223 | switch (self.direction) { 224 | case .horizontal: 225 | let widthPerScale = Float(self.bounds.size.width) / scaleFitsInScreen 226 | let width = min(widthPerScale * self.range.length, kRangeLayerMaximumWidth) 227 | return CGRect(x: 0.0, y: 0.0, width: Double(width), height: Double(self.frame.height)) 228 | case .vertical: 229 | let heightPerScale = Float(self.bounds.size.height) / scaleFitsInScreen 230 | let height = min(heightPerScale * self.range.length, kRangeLayerMaximumHeight) 231 | return CGRect(x: 0.0, y: 0.0, width: Double(self.frame.width), height: Double(height)) 232 | } 233 | } 234 | } 235 | -------------------------------------------------------------------------------- /RKMultiUnitRuler/Classes/RKRangeTextView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Farshid Ghods on 12/28/16. 3 | // Copyright (c) 2016 Rekovery. All rights reserved. 4 | // 5 | 6 | import UIKit 7 | 8 | /* 9 | string extension to facilitate conversion of string to double, int and float 10 | */ 11 | public extension String { 12 | var doubleValue: Double? { 13 | return NumberFormatter().number(from: self)?.doubleValue 14 | } 15 | var integerValue: Int? { 16 | return NumberFormatter().number(from: self)?.intValue 17 | } 18 | var floatValue: Float? { 19 | return NumberFormatter().number(from: self)?.floatValue 20 | } 21 | } 22 | 23 | class RKRangeTextView: UIControl, UITextFieldDelegate { 24 | 25 | var textField: UITextField = UITextField() 26 | var formatter: MeasurementFormatter? 27 | var unit: Dimension? 28 | 29 | public var currentValue: Float = 0 { 30 | didSet { 31 | if (!self.textField.isFirstResponder) { 32 | self.updateTextFieldText(value: currentValue) 33 | } 34 | } 35 | } 36 | 37 | 38 | override init(frame: CGRect) { 39 | super.init(frame: frame) 40 | setupTextView() 41 | } 42 | 43 | required init?(coder aDecoder: NSCoder) { 44 | super.init(coder: aDecoder) 45 | setupTextView() 46 | } 47 | 48 | /* 49 | Internal method used for updating the TextField using the formatter if applicable 50 | If the textField is the first responder then it will also retain the cursor position 51 | */ 52 | private func updateTextFieldText(value: Float) { 53 | var originalCursorPosition : UITextPosition? = nil 54 | if (self.textField.isFirstResponder) { 55 | if let selectedRange = textField.selectedTextRange { 56 | originalCursorPosition = textField.position(from: selectedRange.start, offset: 1) 57 | } 58 | } 59 | if let formatter = self.formatter, let unit = self.unit { 60 | let measurement = Measurement(value: Double(value), unit: unit) 61 | self.textField.text = formatter.string(from: measurement) 62 | } else { 63 | self.textField.text = String(format: "%.1f", value) 64 | } 65 | if let position = originalCursorPosition { 66 | self.textField.selectedTextRange = textField.textRange( 67 | from: position, to: position) 68 | } 69 | } 70 | 71 | /* 72 | Creates a new UITextField and assigns the constraint programmatically 73 | */ 74 | func setupTextView() { 75 | self.textField.removeFromSuperview() 76 | let textField = UITextField(frame: self.bounds) 77 | textField.textAlignment = NSTextAlignment.center 78 | textField.translatesAutoresizingMaskIntoConstraints = false 79 | textField.isUserInteractionEnabled = true 80 | textField.text = "0" 81 | textField.keyboardType = .decimalPad 82 | textField.delegate = self 83 | self.addSubview(textField) 84 | let views = ["textField": textField] 85 | var constraints = NSLayoutConstraint.constraints(withVisualFormat: "H:|-5-[textField]-5-|", 86 | options: NSLayoutFormatOptions.directionLeadingToTrailing, 87 | metrics: nil, 88 | views: views) 89 | constraints += NSLayoutConstraint.constraints(withVisualFormat: "V:|-5-[textField]-5-|", 90 | options: NSLayoutFormatOptions.directionLeadingToTrailing, 91 | metrics: nil, 92 | views: views) 93 | self.addConstraints(constraints) 94 | self.textField = textField 95 | } 96 | 97 | func textFieldShouldBeginEditing(_ textField: UITextField) -> Bool { 98 | return true 99 | } 100 | 101 | /* 102 | Set the cursor to the beginning of the document 103 | */ 104 | func textFieldDidBeginEditing(_ textField: UITextField) { 105 | textField.selectedTextRange = textField.textRange(from: textField.beginningOfDocument, to: textField.beginningOfDocument) 106 | } 107 | 108 | func textFieldShouldEndEditing(_ textField: UITextField) -> Bool { 109 | return true 110 | } 111 | 112 | func textFieldDidEndEditing(_ textField: UITextField) { 113 | } 114 | 115 | func textFieldDidEndEditing(_ textField: UITextField, reason: UITextFieldDidEndEditingReason) { 116 | } 117 | 118 | /* 119 | If string is empty or "." then let the user continue updating the text 120 | If string can be parsed to Float then invoke the updateTextFieldText method to format the text 121 | else let the user continue modifying the text 122 | */ 123 | func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool { 124 | if string.isEmpty || string == "." { 125 | return true 126 | } 127 | let textFieldText = (textField.text ?? "") as NSString? 128 | let updatedString = textFieldText?.replacingCharacters(in: range, with: string) 129 | if let unit = self.unit { 130 | print("updatedString : \(updatedString)") 131 | if let updatedStringAsFloat = updatedString?.replacingOccurrences( 132 | of: unit.symbol, with: "").floatValue { 133 | currentValue = updatedStringAsFloat 134 | self.updateTextFieldText(value: currentValue) 135 | self.sendActions(for: UIControlEvents.valueChanged) 136 | return false 137 | } 138 | return true 139 | } else { 140 | if let updatedStringAsFloat = updatedString?.floatValue { 141 | currentValue = updatedStringAsFloat 142 | self.sendActions(for: UIControlEvents.valueChanged) 143 | } 144 | return true 145 | } 146 | } 147 | 148 | func textFieldShouldClear(_ textField: UITextField) -> Bool { 149 | return true 150 | } 151 | 152 | func textFieldShouldReturn(_ textField: UITextField) -> Bool { 153 | return true 154 | } 155 | 156 | override func resignFirstResponder() -> Bool { 157 | if (self.textField.isFirstResponder) { 158 | self.textField.resignFirstResponder() 159 | } 160 | return super.resignFirstResponder() 161 | } 162 | 163 | 164 | } 165 | -------------------------------------------------------------------------------- /_Pods.xcodeproj: -------------------------------------------------------------------------------- 1 | Example/Pods/Pods.xcodeproj --------------------------------------------------------------------------------