├── .gitignore ├── .gitmodules ├── .travis.yml ├── Default-568h@2x.png ├── README.md ├── VERSIONS.md ├── eppz!kit!testbed ├── EPPZColorThemeTestbed.h ├── EPPZColorThemeTestbed.m ├── TBAppDelegate.h ├── TBAppDelegate.m ├── TBButton.h ├── TBButton.m ├── TBEntity.h ├── TBEntity.m ├── TBGameProgress.h ├── TBGameProgress.m ├── TBGameUser.h ├── TBGameUser.m ├── TBGeometryLinesView.h ├── TBGeometryLinesView.m ├── TBGeometryLinesViewController.h ├── TBGeometryLinesViewController.m ├── TBGeometryLinesViewController.xib ├── TBHtmlStringViewController.h ├── TBHtmlStringViewController.m ├── TBMenuViewController.h ├── TBMenuViewController.m ├── TBMenuViewController.xib ├── TBRepresentableViewController.h ├── TBRepresentableViewController.m ├── TBRepresentableViewController.xib ├── TBUser.h ├── TBUser.m ├── UIView+EPPZRepresentable.h ├── UIView+EPPZRepresentable.m ├── _Default-568h@2x.png ├── _Default.png ├── _Default@2x.png ├── en.lproj │ ├── InfoPlist.strings │ └── TBHtmlStringViewController.xib ├── eppz!kit!testbed-Info.plist ├── eppz!kit!testbed-Prefix.pch ├── main.m └── user.plist ├── eppz!kit!tests ├── EPPZBinding.m ├── EPPZBoolTools.m ├── NSArray+EPPZKit.m ├── NSDictionary+EPPZKit.m ├── NSString+EPPZKit.m ├── TTools.h ├── TTools.m ├── UIColor+EPPZKit.m ├── UIColor+EPPZRepresenter.m ├── en.lproj │ └── InfoPlist.strings ├── eppz!kit!tests-Info.plist └── eppz!kit!tests-Prefix.pch ├── eppz!kit.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcuserdata │ │ ├── Gardrobe.xcuserdatad │ │ └── WorkspaceSettings.xcsettings │ │ └── itunes.xcuserdatad │ │ ├── UserInterfaceState.xcuserstate │ │ └── WorkspaceSettings.xcsettings ├── xcshareddata │ └── xcschemes │ │ ├── eppz!kit!testbed.xcscheme │ │ ├── eppz!kit!tests.xcscheme │ │ └── eppz!kit.xcscheme └── xcuserdata │ ├── Gardrobe.xcuserdatad │ └── xcschemes │ │ └── xcschememanagement.plist │ └── itunes.xcuserdatad │ ├── xcdebugger │ └── Breakpoints.xcbkptlist │ └── xcschemes │ ├── eppz!kit!testbed.xcscheme │ ├── eppz!kit.xcscheme │ └── xcschememanagement.plist ├── eppz!kit.xcworkspace ├── contents.xcworkspacedata └── xcshareddata │ └── eppz!kit.xccheckout ├── eppz!kit ├── Analytics build settings.png ├── EPPZAlert+Factory.h ├── EPPZAlert+Factory.m ├── EPPZAlert.h ├── EPPZAlert.m ├── EPPZAnalytics.h ├── EPPZAnalytics.m ├── EPPZAnalyticsService.h ├── EPPZAnalyticsService.m ├── EPPZAnalyticsTimer.h ├── EPPZAnalyticsTimer.m ├── EPPZAppStore.h ├── EPPZAppStore.m ├── EPPZAppStoreCallbacks.h ├── EPPZAppStoreCallbacks.m ├── EPPZBinding.h ├── EPPZBinding.m ├── EPPZBoolTools.h ├── EPPZBoolTools.m ├── EPPZConfiguration.h ├── EPPZConfiguration.m ├── EPPZDevice.h ├── EPPZDevice.m ├── EPPZDiatonicScale.h ├── EPPZDiatonicScale.m ├── EPPZFileManager.h ├── EPPZFileManager.m ├── EPPZFlatButton.h ├── EPPZFlatButton.m ├── EPPZGeometry.h ├── EPPZGeometry.m ├── EPPZGestureRecognizer.h ├── EPPZGestureRecognizer.m ├── EPPZGoogleAnalyticsService.h ├── EPPZGoogleAnalyticsService.m ├── EPPZKit.h ├── EPPZLabel.h ├── EPPZLabel.m ├── EPPZPagingScrollViewController.h ├── EPPZPagingScrollViewController.m ├── EPPZRandom.h ├── EPPZRandom.m ├── EPPZReachability.h ├── EPPZReachability.m ├── EPPZRepresentable.rtf ├── EPPZRepresentableException.h ├── EPPZRepresentableException.m ├── EPPZRepresentableInspectorViewController.h ├── EPPZRepresentableInspectorViewController.m ├── EPPZRepresentablePropertyCell.h ├── EPPZRepresentablePropertyCell.m ├── EPPZRepresenter.h ├── EPPZRepresenter.m ├── EPPZSingleton.h ├── EPPZSingleton.m ├── EPPZSingletonSubclass.h ├── EPPZTagFinder.h ├── EPPZTagFinder.m ├── EPPZTimer.h ├── EPPZTimer.m ├── EPPZTools.h ├── EPPZTools.m ├── EPPZUserDefaults.h ├── EPPZUserDefaults.m ├── EPPZVersions.h ├── EPPZVersions.m ├── EPPZViewOwner.h ├── EPPZViewOwner.m ├── GAI.h ├── GAIDictionaryBuilder.h ├── GAIEcommerceFields.h ├── GAIEcommerceProduct.h ├── GAIEcommerceProductAction.h ├── GAIEcommercePromotion.h ├── GAIFields.h ├── GAILogger.h ├── GAITrackedViewController.h ├── GAITracker.h ├── NSArray+EPPZKit.h ├── NSArray+EPPZKit.m ├── NSDate+EPPZKit.h ├── NSDate+EPPZKit.m ├── NSDecimalNumber+LocalizedPrice.h ├── NSDecimalNumber+LocalizedPrice.m ├── NSDictionary+EPPZKit.h ├── NSDictionary+EPPZKit.m ├── NSObject+EPPZConfigurable.h ├── NSObject+EPPZConfigurable.m ├── NSObject+EPPZRepresentable.h ├── NSObject+EPPZRepresentable.m ├── NSObject+EPPZRepresentable_Archive.h ├── NSObject+EPPZRepresentable_Archive.m ├── NSObject+EPPZRepresentable_Plist.h ├── NSObject+EPPZRepresentable_Plist.m ├── NSString+EPPZKit.h ├── NSString+EPPZKit.m ├── NSString+EPPZReachability.h ├── NSString+EPPZReachability.m ├── SKProduct+LocalizedPrice.h ├── SKProduct+LocalizedPrice.m ├── UICircle.h ├── UICircle.m ├── UIColor+EPPZKit.h ├── UIColor+EPPZKit.m ├── UIColor+EPPZRepresenter.h ├── UIColor+EPPZRepresenter.m ├── UIFont+EPPZKit.h ├── UIFont+EPPZKit.m ├── UIImage+EPPZKit.h ├── UIImage+EPPZKit.m ├── iOS device model identifiers.xlsx └── libGoogleAnalytics.a └── lib!eppz!kit.a /.gitignore: -------------------------------------------------------------------------------- 1 | # Mac OS X 2 | *.DS_Store 3 | 4 | # Xcode 5 | *.pbxuser 6 | *.mode1v3 7 | *.mode2v3 8 | *.perspectivev3 9 | *.xcuserstate 10 | project.xcworkspace/ 11 | xcuserdata/ -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "eppz!swizzler"] 2 | path = eppz!swizzler 3 | url = https://github.com/eppz/eppz.swizzler 4 | [submodule "eppz!reachability"] 5 | path = eppz!reachability 6 | url = https://github.com/eppz/eppz.reachability 7 | [submodule "eppz!alert"] 8 | path = eppz!alert 9 | url = https://github.com/eppz/eppz.alert 10 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: objective-c 2 | script: xctool -project eppz!kit.xcodeproj -scheme eppz!kit test -------------------------------------------------------------------------------- /Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Geri-Borbas/iOS.Library.eppz_kit/80874ca7cc34811e0489f188d4fc4e07c0430854/Default-568h@2x.png -------------------------------------------------------------------------------- /eppz!kit!testbed/EPPZColorThemeTestbed.h: -------------------------------------------------------------------------------- 1 | // 2 | // EPPZColorThemeTestbed.h 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 12/1/13. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import 16 | 17 | 18 | @interface EPPZColorThemeTestbed : UIView 19 | @end 20 | -------------------------------------------------------------------------------- /eppz!kit!testbed/TBAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // TBAppDelegate.h 3 | // eppz!kit!testbed 4 | // 5 | // Created by Borbás Geri on 7/15/13. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import 16 | 17 | 18 | @interface TBAppDelegate : UIResponder 19 | @property (strong, nonatomic) UIWindow *window; 20 | @end 21 | -------------------------------------------------------------------------------- /eppz!kit!testbed/TBAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // TBAppDelegate.m 3 | // eppz!kit!testbed 4 | // 5 | // Created by Borbás Geri on 7/15/13. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import "TBAppDelegate.h" 16 | #import "TBMenuViewController.h" 17 | 18 | 19 | @implementation TBAppDelegate 20 | 21 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 22 | { 23 | self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; 24 | 25 | UIViewController *viewController; 26 | if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) 27 | { viewController = [[TBMenuViewController alloc] initWithNibName:@"TBMenuViewController" bundle:nil]; } 28 | else 29 | { viewController = [[TBMenuViewController alloc] initWithNibName:@"TBMenuViewController" bundle:nil]; } 30 | 31 | self.window.rootViewController = viewController; 32 | [self.window makeKeyAndVisible]; 33 | return YES; 34 | } 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /eppz!kit!testbed/TBButton.h: -------------------------------------------------------------------------------- 1 | // 2 | // TBButton.h 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 11/8/13. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import 16 | 17 | 18 | @interface TBButton : EPPZFlatButton 19 | 20 | @property (nonatomic, strong) NSString *controller; 21 | @property (nonatomic, readonly) NSString *controllerClassName; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /eppz!kit!testbed/TBButton.m: -------------------------------------------------------------------------------- 1 | // 2 | // TBButton.m 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 11/8/13. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import "TBButton.h" 16 | 17 | @implementation TBButton 18 | 19 | -(NSString*)controllerClassName 20 | { return self.controller; } 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /eppz!kit!testbed/TBEntity.h: -------------------------------------------------------------------------------- 1 | // 2 | // EPPZEntity.h 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 8/22/13. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | 16 | 17 | @interface TBEntity : NSObject 18 | 19 | @property (nonatomic, strong) NSString *ID; 20 | @property (nonatomic) NSUInteger serialNumber; 21 | @property (nonatomic, strong) NSDate *lastModificationDate; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /eppz!kit!testbed/TBEntity.m: -------------------------------------------------------------------------------- 1 | // 2 | // EPPZEntity.m 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 8/22/13. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import "TBEntity.h" 16 | 17 | 18 | @implementation TBEntity 19 | @end 20 | -------------------------------------------------------------------------------- /eppz!kit!testbed/TBGameProgress.h: -------------------------------------------------------------------------------- 1 | // 2 | // EPPZGameProgress.h 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 8/22/13. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import "UIView+EPPZRepresentable.h" 16 | 17 | 18 | @interface TBGameProgress : NSObject 19 | 20 | @property (nonatomic) NSUInteger progress; 21 | @property (nonatomic) NSUInteger level; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /eppz!kit!testbed/TBGameProgress.m: -------------------------------------------------------------------------------- 1 | // 2 | // EPPZGameProgress.m 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 8/22/13. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import "TBGameProgress.h" 16 | 17 | @implementation TBGameProgress 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /eppz!kit!testbed/TBGameUser.h: -------------------------------------------------------------------------------- 1 | // 2 | // EPPZGameUser.h 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 8/22/13. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import "TBUser.h" 16 | #import "TBGameProgress.h" 17 | 18 | 19 | @interface TBGameUser : TBUser 20 | 21 | @property (nonatomic, strong) NSString *gameID; 22 | @property (nonatomic, strong) NSArray *scores; 23 | @property (nonatomic, strong) NSString *runtimeData; 24 | @property (nonatomic, strong) UIView *view; 25 | @property (nonatomic, strong) UILabel *label; 26 | @property (nonatomic, strong) TBGameProgress *progress; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /eppz!kit!testbed/TBGameUser.m: -------------------------------------------------------------------------------- 1 | // 2 | // EPPZGameUser.m 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 8/22/13. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import "TBGameUser.h" 16 | 17 | @implementation TBGameUser 18 | 19 | +(NSArray*)representablePropertyNames 20 | { _LOG 21 | 22 | return @[ 23 | @"gameID", 24 | @"scores", 25 | @"view", 26 | @"label.text", 27 | @"progress" 28 | ]; 29 | } 30 | 31 | -(void)willLoad 32 | { 33 | //Create a blank label. 34 | self.label = [UILabel new]; 35 | } 36 | 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /eppz!kit!testbed/TBGeometryLinesView.h: -------------------------------------------------------------------------------- 1 | // 2 | // TBGeometryLinesView.h 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 11/8/13. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import 16 | 17 | 18 | @interface TBCircle : UICircle 19 | @end 20 | 21 | 22 | @interface TBGeometryLinesView : UIView 23 | 24 | @property (nonatomic, weak) IBOutlet TBCircle *a; 25 | @property (nonatomic, weak) IBOutlet TBCircle *b; 26 | @property (nonatomic, weak) IBOutlet TBCircle *c; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /eppz!kit!testbed/TBGeometryLinesViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // TBGeometryLinesViewController.h 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 11/8/13. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import 16 | 17 | 18 | @interface TBGeometryLinesViewController : UIViewController 19 | @end 20 | -------------------------------------------------------------------------------- /eppz!kit!testbed/TBGeometryLinesViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // TBGeometryLinesViewController.m 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 11/8/13. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import "TBGeometryLinesViewController.h" 16 | 17 | 18 | @implementation TBGeometryLinesViewController 19 | @end 20 | -------------------------------------------------------------------------------- /eppz!kit!testbed/TBHtmlStringViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // EPPZViewController.h 3 | // eppz!kit!testbed 4 | // 5 | // Created by Borbás Geri on 7/15/13. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import 16 | 17 | 18 | @interface TBHtmlStringViewController : UIViewController 19 | 20 | @property (nonatomic, weak) IBOutlet EPPZLabel *label_1; 21 | @property (nonatomic, weak) IBOutlet EPPZLabel *label_2; 22 | @property (nonatomic, weak) IBOutlet EPPZLabel *label_3; 23 | @property (nonatomic, weak) IBOutlet EPPZLabel *label_4; 24 | @property (nonatomic, weak) IBOutlet EPPZLabel *labelThatMustWork; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /eppz!kit!testbed/TBHtmlStringViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // EPPZViewController.m 3 | // eppz!kit!testbed 4 | // 5 | // Created by Borbás Geri on 7/15/13. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import "TBHtmlStringViewController.h" 16 | #import "TBGameUser.h" 17 | 18 | 19 | @implementation TBHtmlStringViewController 20 | 21 | -(void)viewDidLoad 22 | { 23 | [super viewDidLoad]; 24 | [self testFiles]; 25 | [self testDateExtensions]; 26 | [self testTagFinder]; 27 | } 28 | 29 | -(void)testFiles 30 | { NSLog(@"%@", FILES.documentsDirectory); } 31 | 32 | -(void)testDateExtensions 33 | { [NSDate testDisplayStringOfInterval]; } 34 | 35 | -(void)testTagFinder 36 | { 37 | self.label_1.htmlString = @"Something really useful with tons of strong tags to be able to test this harmless tag finder snippet."; 38 | self.label_2.htmlString = @"Something really useful with tons of strong tags to be able to test this harmless tag finder snippet."; 39 | self.label_3.htmlString = @"Something really useful with actually only one strong tags."; 40 | self.label_4.htmlString = @"Something really useful without any strong tags."; 41 | self.labelThatMustWork.boldRange = NSMakeRange(0, 5); 42 | } 43 | 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /eppz!kit!testbed/TBMenuViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // TBMenuViewController.h 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 11/8/13. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import 16 | #import "TBButton.h" 17 | 18 | 19 | @interface TBMenuViewController : UIViewController 20 | 21 | -(IBAction)buttonTouchedUp:(TBButton*) button; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /eppz!kit!testbed/TBMenuViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // TBMenuViewController.m 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 11/8/13. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import "TBMenuViewController.h" 16 | 17 | 18 | @implementation TBMenuViewController 19 | 20 | 21 | -(IBAction)buttonTouchedUp:(TBButton*) button 22 | { 23 | NSLog(@"Present <%@>", button.controllerClassName); 24 | 25 | // Instantiate, present controller. 26 | Class controllerClass = NSClassFromString(button.controllerClassName); 27 | UIViewController *controller = [[controllerClass alloc] initWithNibName:button.controllerClassName bundle:nil]; 28 | [self presentModalViewController:controller animated:YES]; 29 | } 30 | 31 | // Automatismo. 32 | -(void)viewDidAppear:(BOOL)animated 33 | { 34 | [super viewDidAppear:animated]; 35 | 36 | NSString *autoLoadControllerName = @"TBRepresentableViewController"; 37 | Class controllerClass = NSClassFromString(autoLoadControllerName); 38 | UIViewController *controller = [[controllerClass alloc] initWithNibName:autoLoadControllerName bundle:nil]; 39 | [self presentModalViewController:controller animated:YES]; 40 | } 41 | 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /eppz!kit!testbed/TBRepresentableViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // TBRepresentableViewController.h 3 | // eppz!kit 4 | // 5 | // Created by Gardrobe on 1/23/14. 6 | // Copyright (c) 2014 eppz!. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "TBGameUser.h" 11 | 12 | 13 | @interface TBRepresentableViewController : UIViewController 14 | @end 15 | -------------------------------------------------------------------------------- /eppz!kit!testbed/TBRepresentableViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // TBRepresentableViewController.m 3 | // eppz!kit 4 | // 5 | // Created by Gardrobe on 1/23/14. 6 | // Copyright (c) 2014 eppz!. All rights reserved. 7 | // 8 | 9 | #import "TBRepresentableViewController.h" 10 | 11 | 12 | @interface TBRepresentableViewController () 13 | @property (nonatomic, strong) TBGameUser *gameUser; 14 | @end 15 | 16 | 17 | @implementation TBRepresentableViewController 18 | 19 | -(void)viewDidAppear:(BOOL)animated 20 | { 21 | [super viewDidAppear:animated]; 22 | 23 | [self createUser]; 24 | [EPPZRepresentableInspectorViewController presentInViewController:self 25 | withRepresentable:self.gameUser]; 26 | } 27 | 28 | -(void)createUser 29 | { 30 | self.gameUser = [TBGameUser new]; 31 | 32 | // TBUser properties. 33 | self.gameUser.name = @"John Doe"; 34 | self.gameUser.registrationDate = [NSDate date]; 35 | 36 | // TBGameProgress. 37 | TBGameProgress *gameProgress = [TBGameProgress new]; 38 | gameProgress.progress = 12; 39 | gameProgress.level = 4; 40 | 41 | // TBGameUser properties. 42 | self.gameUser.gameID = @"_john_"; 43 | self.gameUser.scores = @[ @10, @20, @30, @40, @50 ]; 44 | self.gameUser.runtimeData = @"blue"; 45 | self.gameUser.view = nil; 46 | self.gameUser.label = nil; 47 | self.gameUser.progress = gameProgress; 48 | 49 | } 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /eppz!kit!testbed/TBRepresentableViewController.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /eppz!kit!testbed/TBUser.h: -------------------------------------------------------------------------------- 1 | // 2 | // EPPZUser.h 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 8/22/13. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import "TBEntity.h" 16 | 17 | 18 | @interface TBUser : TBEntity 19 | 20 | @property (nonatomic, strong) NSString *name; 21 | @property (nonatomic, strong) NSDate *registrationDate; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /eppz!kit!testbed/TBUser.m: -------------------------------------------------------------------------------- 1 | // 2 | // EPPZUser.m 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 8/22/13. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import "TBUser.h" 16 | 17 | 18 | @implementation TBUser 19 | @end 20 | -------------------------------------------------------------------------------- /eppz!kit!testbed/UIView+EPPZRepresentable.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+EPPZRepresentable.h 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 8/23/13. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import 16 | 17 | 18 | @interface UIView (EPPZRepresentable) 19 | @end -------------------------------------------------------------------------------- /eppz!kit!testbed/UIView+EPPZRepresentable.m: -------------------------------------------------------------------------------- 1 | // 2 | // EPPZView.m 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 8/23/13. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import "UIView+EPPZRepresentable.h" 16 | 17 | 18 | @implementation UIView (EPPZRepresentable) 19 | 20 | +(NSArray*)representablePropertyNames 21 | { _LOG 22 | 23 | return @[ 24 | @"frame", 25 | @"bounds", 26 | @"center", 27 | @"transform", 28 | @"backgroundColor", 29 | @"tag" 30 | ]; 31 | } 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /eppz!kit!testbed/_Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Geri-Borbas/iOS.Library.eppz_kit/80874ca7cc34811e0489f188d4fc4e07c0430854/eppz!kit!testbed/_Default-568h@2x.png -------------------------------------------------------------------------------- /eppz!kit!testbed/_Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Geri-Borbas/iOS.Library.eppz_kit/80874ca7cc34811e0489f188d4fc4e07c0430854/eppz!kit!testbed/_Default.png -------------------------------------------------------------------------------- /eppz!kit!testbed/_Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Geri-Borbas/iOS.Library.eppz_kit/80874ca7cc34811e0489f188d4fc4e07c0430854/eppz!kit!testbed/_Default@2x.png -------------------------------------------------------------------------------- /eppz!kit!testbed/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ -------------------------------------------------------------------------------- /eppz!kit!testbed/eppz!kit!testbed-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | com.eppz.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0.0 25 | LSRequiresIPhoneOS 26 | 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /eppz!kit!testbed/eppz!kit!testbed-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'eppz!kit!testbed' target in the 'eppz!kit!testbed' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_4_0 8 | #warning "This project uses features only available in iOS SDK 4.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | 13 | #import 14 | #import 15 | 16 | #import "EPPZKit.h" 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /eppz!kit!testbed/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // eppz!kit!testbed 4 | // 5 | // Created by Borbás Geri on 7/15/13. 6 | // Copyright (c) 2013 eppz!. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "TBAppDelegate.h" 12 | 13 | int main(int argc, char *argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([TBAppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /eppz!kit!testbed/user.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | __eppz.representable.class 6 | TBGameUser 7 | __eppz.representable.id 8 | 126060128 9 | gameID 10 | 2 11 | label.text 12 | Bloomberg 13 | progress 14 | 15 | __eppz.representable.class 16 | TBGameProgress 17 | __eppz.representable.id 18 | 126060768 19 | level 20 | 5 21 | progress 22 | 5 23 | view 24 | 25 | __eppz.representable.class 26 | UIView 27 | __eppz.representable.id 28 | 126057888 29 | 30 | 31 | scores 32 | 33 | 23 34 | 27 35 | 22 36 | 28 37 | 32 38 | 39 | view 40 | 41 | __eppz.representable.class 42 | UIView 43 | __eppz.representable.id 44 | 126057888 45 | backgroundColor 46 | UIColor:[0.200000, 0.400000, 0.800000, 0.600000] 47 | bounds 48 | CGRect:{{0, 0}, {100, 100}} 49 | center 50 | CGPoint:{50, 50} 51 | frame 52 | CGRect:{{-10, -10}, {120, 120}} 53 | tag 54 | 21 55 | transform 56 | CGAffineTransform:[1.2, 0, 0, 1.2, 0, 0] 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /eppz!kit!tests/EPPZBinding.m: -------------------------------------------------------------------------------- 1 | // 2 | // _EPPZBinding.m 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 21/01/14. 6 | // Copyright (c) 2014 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import 16 | 17 | 18 | @interface _Model : NSObject 19 | @property (nonatomic, strong) NSString *name; 20 | @end 21 | 22 | @implementation _Model 23 | @end 24 | 25 | 26 | @interface _EPPZBinding : XCTestCase 27 | @property (nonatomic, strong) _Model *model; 28 | @property (nonatomic, strong) UITextField *textField; 29 | @property (nonatomic, strong) EPPZBinding *binding; 30 | @end 31 | 32 | 33 | @implementation _EPPZBinding 34 | 35 | -(void)setUp 36 | { 37 | self.model = [_Model new]; 38 | self.textField = [UITextField new]; 39 | } 40 | 41 | -(void)tearDown 42 | { 43 | self.model = nil; 44 | self.textField = nil; 45 | } 46 | 47 | -(void)test 48 | { 49 | NSDictionary *propertyMap = @{ 50 | @"name" : @"text" 51 | }; 52 | 53 | self.binding = [EPPZBinding bindObject:self.model 54 | withObject:self.textField 55 | propertyMap:propertyMap]; 56 | 57 | // Sync model change. 58 | self.model.name = @"John Doe"; 59 | XCTAssertEqualObjects(self.textField.text, 60 | @"John Doe", 61 | @"Property `textField.text` should be synchronized."); 62 | 63 | // Sync UI change. 64 | self.textField.text = @"Uma Thurman"; 65 | XCTAssertEqualObjects(self.model.name, 66 | @"Uma Thurman", 67 | @"Property `model.name` should be synchronized."); 68 | 69 | } 70 | 71 | 72 | @end 73 | -------------------------------------------------------------------------------- /eppz!kit!tests/EPPZBoolTools.m: -------------------------------------------------------------------------------- 1 | // 2 | // _EPPZBoolTools.m 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 1/21/14. 6 | // Copyright (c) 2014 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import 16 | 17 | 18 | @interface _EPPZBoolTools : XCTestCase 19 | @end 20 | 21 | 22 | @implementation _EPPZBoolTools 23 | 24 | 25 | -(void)test 26 | { 27 | XCTAssertEqual(0, intFromBool(NO), @"intFromBool(NO) should be 0."); 28 | XCTAssertEqual(1, intFromBool(YES), @"intFromBool(YES) should be 1."); 29 | 30 | XCTAssertEqual(1.0f, floatFromBool(YES), @"floatFromBool(YES) should be 1.0f."); 31 | XCTAssertEqual(0.0f, floatFromBool(NO), @"floatFromBool(NO) should be 0.0f."); 32 | 33 | XCTAssertEqual(YES, toggle(NO), @"toggle(NO) should be YES."); 34 | XCTAssertEqual(NO, toggle(YES), @"toggle(YES) should be NO."); 35 | 36 | XCTAssertEqualObjects(@"YES", stringFromBool(YES), @"stringFromBool(YES) should be @\"NO\"."); 37 | XCTAssertEqualObjects(@"NO", stringFromBool(NO), @"stringFromBool(NO) should be @\"YES\"."); 38 | 39 | XCTAssertEqual(0.9f, inverseFloat(0.1f), @"inverseFloat(0.1) should be 0.9."); 40 | XCTAssertEqual(0.5f, inverseFloat(0.5f), @"inverseFloat(0.5) should be 0.5."); 41 | } 42 | 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /eppz!kit!tests/NSArray+EPPZKit.m: -------------------------------------------------------------------------------- 1 | // 2 | // _NSArray+EPPZKit.m 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 1/21/14. 6 | // Copyright (c) 2014 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import 16 | 17 | 18 | @interface _NSArray_EPPZKit : XCTestCase 19 | @end 20 | 21 | 22 | @implementation _NSArray_EPPZKit 23 | 24 | 25 | -(void)testNSArray_EPPZKit 26 | { 27 | NSArray *array = @[ @0, @1, @2, @3, @4, @5]; 28 | __block NSNumber *pick; 29 | __block BOOL comparison; 30 | 31 | XCTAssertEqualObjects([array nextObjectAfterObject:@1], 32 | @2, 33 | @"Next object after @1 should be @2."); 34 | 35 | XCTAssertEqualObjects([array nextObjectAfterObject:@3], 36 | @4, 37 | @"Next object after @3 should be @4."); 38 | 39 | 40 | XCTAssertEqualObjects([array nextObjectAfterObject:@5], 41 | @0, 42 | @"Next object after @5 should be @0."); 43 | 44 | [self repeat:100 :^ 45 | { 46 | pick = [array randomObject]; 47 | comparison = (pick.integerValue < array.count); 48 | XCTAssertTrue(comparison, @"Random pick %i should be in range 0-5.", pick.integerValue); 49 | }]; 50 | } 51 | 52 | 53 | @end 54 | -------------------------------------------------------------------------------- /eppz!kit!tests/NSDictionary+EPPZKit.m: -------------------------------------------------------------------------------- 1 | // 2 | // _NSDictionary+EPPZKit.m 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 1/21/14. 6 | // Copyright (c) 2014 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import 16 | 17 | 18 | @interface _NSDictionary_EPPZKit : XCTestCase 19 | @end 20 | 21 | 22 | @implementation _NSDictionary_EPPZKit 23 | 24 | 25 | -(void)testDictionaryBySwappingKeysAndValues 26 | { 27 | NSDictionary *dictionary = @{ 28 | @"this" : @"that", 29 | @"here" : @"there", 30 | @1 : @2, 31 | }; 32 | 33 | NSDictionary *inverse = @{ 34 | @"that" : @"this", 35 | @"there" : @"here", 36 | @2 : @1, 37 | }; 38 | 39 | XCTAssertEqualObjects([dictionary dictionaryBySwappingKeysAndValues], 40 | inverse, 41 | @"Directory an swapped inverse should be equal."); 42 | } 43 | 44 | -(void)testSomething 45 | { 46 | NSDictionary *dictionary = @{ 47 | @"this" : @"that", 48 | @"here" : @"there", 49 | @1 : @2, 50 | }; 51 | 52 | NSDictionary *removed = @{ 53 | @"here" : @"there", 54 | @1 : @2, 55 | }; 56 | 57 | XCTAssertEqualObjects([dictionary dictionaryByRemovingValueForKey:@"this"], 58 | removed, 59 | @"Directory should not contain removed value."); 60 | } 61 | 62 | 63 | @end 64 | -------------------------------------------------------------------------------- /eppz!kit!tests/TTools.h: -------------------------------------------------------------------------------- 1 | // 2 | // TTools.h 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 1/21/14. 6 | // Copyright (c) 2014 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import 16 | 17 | 18 | @interface XCTestCase (Tools) 19 | -(void)repeat:(NSUInteger) times :(void(^)()) block; 20 | @end 21 | -------------------------------------------------------------------------------- /eppz!kit!tests/TTools.m: -------------------------------------------------------------------------------- 1 | // 2 | // TTools.m 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 1/21/14. 6 | // Copyright (c) 2014 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import "TTools.h" 16 | 17 | 18 | @implementation XCTestCase (Tools) 19 | 20 | -(void)repeat:(NSUInteger) times :(void(^)()) block 21 | { 22 | int stepper = 0; 23 | while (stepper++ < times) 24 | { block(); } 25 | } 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /eppz!kit!tests/UIColor+EPPZRepresenter.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIColor+EPPZRepresenter.m 3 | // eppz!kit 4 | // 5 | // Created by Gardrobe on 2/15/14. 6 | // Copyright (c) 2014 eppz!. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface _UIColor_EPPZRepresenter : XCTestCase 13 | @end 14 | 15 | 16 | @implementation _UIColor_EPPZRepresenter 17 | 18 | -(void)test 19 | { 20 | XCTAssertEqualObjects([UIColor redColor], 21 | UIColorFromNSString(@"[1, 0, 0, 1]"), 22 | @"Red should equal red."); 23 | 24 | XCTAssertEqualObjects([UIColor redColor], 25 | UIColorFromNSString(@"redColor"), 26 | @"Red should equal red."); 27 | 28 | XCTAssertEqualObjects([UIColor redColor], 29 | UIColorFromNSString(@"red"), 30 | @"Red should equal red."); 31 | } 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /eppz!kit!tests/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /eppz!kit!tests/eppz!kit!tests-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.eppz.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /eppz!kit!tests/eppz!kit!tests-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #ifdef __OBJC__ 8 | 9 | #import 10 | #import 11 | 12 | #import "TTools.h" 13 | #import "EPPZKit.h" 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /eppz!kit.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /eppz!kit.xcodeproj/project.xcworkspace/xcuserdata/Gardrobe.xcuserdatad/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildLocationStyle 6 | UseAppPreferences 7 | CustomBuildLocationType 8 | RelativeToDerivedData 9 | DerivedDataLocationStyle 10 | Default 11 | HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges 12 | 13 | IssueFilterStyle 14 | ShowActiveSchemeOnly 15 | LiveSourceIssuesEnabled 16 | 17 | SnapshotAutomaticallyBeforeSignificantChanges 18 | 19 | SnapshotLocationStyle 20 | Default 21 | 22 | 23 | -------------------------------------------------------------------------------- /eppz!kit.xcodeproj/project.xcworkspace/xcuserdata/itunes.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Geri-Borbas/iOS.Library.eppz_kit/80874ca7cc34811e0489f188d4fc4e07c0430854/eppz!kit.xcodeproj/project.xcworkspace/xcuserdata/itunes.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /eppz!kit.xcodeproj/project.xcworkspace/xcuserdata/itunes.xcuserdatad/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges 6 | 7 | SnapshotAutomaticallyBeforeSignificantChanges 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /eppz!kit.xcodeproj/xcshareddata/xcschemes/eppz!kit!tests.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 14 | 15 | 17 | 23 | 24 | 25 | 26 | 27 | 36 | 37 | 38 | 39 | 45 | 46 | 48 | 49 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /eppz!kit.xcodeproj/xcshareddata/xcschemes/eppz!kit.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 52 | 53 | 54 | 55 | 61 | 62 | 64 | 65 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /eppz!kit.xcodeproj/xcuserdata/Gardrobe.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | eppz!kit!testbed.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 1 11 | 12 | eppz!kit!tests.xcscheme_^#shared#^_ 13 | 14 | orderHint 15 | 2 16 | 17 | eppz!kit.xcscheme_^#shared#^_ 18 | 19 | orderHint 20 | 0 21 | 22 | 23 | SuppressBuildableAutocreation 24 | 25 | AE922F3D17937A1A0088E5E5 26 | 27 | primary 28 | 29 | 30 | AE922F77179381270088E5E5 31 | 32 | primary 33 | 34 | 35 | AE922FA01793852F0088E5E5 36 | 37 | primary 38 | 39 | 40 | AEF1C56E188DEF4400068D4D 41 | 42 | primary 43 | 44 | 45 | AEF1C589188DF29200068D4D 46 | 47 | primary 48 | 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /eppz!kit.xcodeproj/xcuserdata/itunes.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /eppz!kit.xcodeproj/xcuserdata/itunes.xcuserdatad/xcschemes/eppz!kit.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 42 | 43 | 44 | 45 | 51 | 52 | 54 | 55 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /eppz!kit.xcodeproj/xcuserdata/itunes.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | eppz!kit!testbed.xcscheme 8 | 9 | orderHint 10 | 4 11 | 12 | eppz!kit!testbed.xcscheme_^#shared#^_ 13 | 14 | orderHint 15 | 7 16 | 17 | eppz!kit!tests.xcscheme 18 | 19 | orderHint 20 | 5 21 | 22 | eppz!kit!tests.xcscheme_^#shared#^_ 23 | 24 | orderHint 25 | 8 26 | 27 | eppz!kit.xcscheme 28 | 29 | orderHint 30 | 2 31 | 32 | eppz!kit.xcscheme_^#shared#^_ 33 | 34 | orderHint 35 | 6 36 | 37 | 38 | SuppressBuildableAutocreation 39 | 40 | AE922F77179381270088E5E5 41 | 42 | primary 43 | 44 | 45 | AE922FA01793852F0088E5E5 46 | 47 | primary 48 | 49 | 50 | AEF1C589188DF29200068D4D 51 | 52 | primary 53 | 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /eppz!kit.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /eppz!kit.xcworkspace/xcshareddata/eppz!kit.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | 4C25D7A4-8C49-4929-B8AD-BA494F7FB359 9 | IDESourceControlProjectName 10 | eppz!kit 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | 35F9FA50-A705-46A6-8034-01D3B82DEDFB 14 | https://github.com/eppz/eppz-kit.git 15 | 16 | IDESourceControlProjectPath 17 | eppz!kit.xcworkspace 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | 35F9FA50-A705-46A6-8034-01D3B82DEDFB 21 | .. 22 | 23 | IDESourceControlProjectURL 24 | https://github.com/eppz/eppz-kit.git 25 | IDESourceControlProjectVersion 26 | 110 27 | IDESourceControlProjectWCCIdentifier 28 | 35F9FA50-A705-46A6-8034-01D3B82DEDFB 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | 35F9FA50-A705-46A6-8034-01D3B82DEDFB 36 | IDESourceControlWCCName 37 | eppz!kit 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /eppz!kit/Analytics build settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Geri-Borbas/iOS.Library.eppz_kit/80874ca7cc34811e0489f188d4fc4e07c0430854/eppz!kit/Analytics build settings.png -------------------------------------------------------------------------------- /eppz!kit/EPPZAlert+Factory.h: -------------------------------------------------------------------------------- 1 | // 2 | // EPPZAlert+Factory.h 3 | // eppz!tools 4 | // 5 | // Created by Borbás Geri on 6/15/13. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import "EPPZAlert.h" 16 | 17 | 18 | typedef void (^EPPZAlertExplicitCompletition)(); 19 | 20 | 21 | //EPPZAlert (Factory) - You can easily extend base class this way, resulting cool alert presets for your application context. 22 | @interface EPPZAlert (Factory) 23 | 24 | 25 | //Alert whithout callback. 26 | +(void)alertWithTitle:(NSString*) title 27 | message:(NSString*) message 28 | buttonTitles:(NSArray*) buttonTitles; 29 | 30 | //A simple "Ok" alert. 31 | +(void)alertWithTitle:(NSString*) title 32 | message:(NSString*) message; 33 | 34 | //A simple "Ok" alert (with completition). 35 | +(void)alertWithTitle:(NSString*) title 36 | message:(NSString*) message 37 | completition:(EPPZAlertCompletition) completition; 38 | 39 | //A simple "Yes/No/Cancel" alert (with explicit completitions). 40 | +(void)alertWithTitle:(NSString*) title 41 | message:(NSString*) message 42 | yes:(EPPZAlertExplicitCompletition) yesCompletition 43 | no:(EPPZAlertExplicitCompletition) noCompletition 44 | cancel:(EPPZAlertExplicitCompletition) cancelCompletition; 45 | 46 | 47 | @end 48 | -------------------------------------------------------------------------------- /eppz!kit/EPPZAlert+Factory.m: -------------------------------------------------------------------------------- 1 | // 2 | // EPPZAlert+Factory.m 3 | // eppz!tools 4 | // 5 | // Created by Borbás Geri on 6/15/13. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | 16 | #import "EPPZAlert+Factory.h" 17 | 18 | @implementation EPPZAlert (Factory) 19 | 20 | 21 | +(void)alertWithTitle:(NSString*) title 22 | message:(NSString*) message 23 | buttonTitles:(NSArray*) buttonTitles 24 | { [self alertWithTitle:title message:message buttonTitles:buttonTitles completition:nil]; } 25 | 26 | +(void)alertWithTitle:(NSString*) title 27 | message:(NSString*) message 28 | { [self alertWithTitle:title message:message buttonTitles:@[ @"Ok" ] completition:nil]; } 29 | 30 | +(void)alertWithTitle:(NSString*) title 31 | message:(NSString*) message 32 | completition:(EPPZAlertCompletition) completition; 33 | { [self alertWithTitle:title message:message buttonTitles:@[ @"Ok" ] completition:completition]; } 34 | 35 | +(void)alertWithTitle:(NSString*) title 36 | message:(NSString*) message 37 | yes:(EPPZAlertExplicitCompletition) yesCompletition 38 | no:(EPPZAlertExplicitCompletition) noCompletition 39 | cancel:(EPPZAlertExplicitCompletition) cancelCompletition 40 | { 41 | [self alertWithTitle:title 42 | message:message 43 | buttonTitles:@[ @"Yes", @"No", @"Cancel" ] 44 | completition:^(NSString *selectedButtonTitle) 45 | { 46 | if ([selectedButtonTitle isEqualToString:@"Yes"]) 47 | if (yesCompletition) yesCompletition(); 48 | 49 | if ([selectedButtonTitle isEqualToString:@"No"]) 50 | if (noCompletition) noCompletition(); 51 | 52 | if ([selectedButtonTitle isEqualToString:@"Cancel"]) 53 | if (cancelCompletition) cancelCompletition(); 54 | }]; 55 | } 56 | 57 | 58 | @end 59 | -------------------------------------------------------------------------------- /eppz!kit/EPPZAlert.h: -------------------------------------------------------------------------------- 1 | // 2 | // EPPZAlert.h 3 | // eppz!tools 4 | // 5 | // Created by Borbás Geri on 6/14/13. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import 16 | #import 17 | 18 | 19 | typedef void (^EPPZAlertCompletition)(NSString *selectedButtonTitle); 20 | 21 | 22 | //EPPZAlert - A thin interface to work with. 23 | @interface EPPZAlert : NSObject 24 | 25 | 26 | +(void)alertWithTitle:(NSString*) title 27 | message:(NSString*) message 28 | buttonTitles:(NSArray*) buttonTitles 29 | completition:(EPPZAlertCompletition) completition; 30 | 31 | 32 | @end 33 | 34 | 35 | //More factory preset in a separate class. 36 | #import "EPPZAlert+Factory.h" 37 | -------------------------------------------------------------------------------- /eppz!kit/EPPZAnalyticsService.h: -------------------------------------------------------------------------------- 1 | // 2 | // EPPZGoogleAnalyticsService.h 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 8/24/13. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import 16 | 17 | @interface EPPZAnalyticsService : NSObject 18 | 19 | -(void)land; 20 | 21 | -(void)page:(NSString*) pageName; 22 | -(void)event:(NSString*) event; 23 | -(void)event:(NSString*) event action:(NSString*) action; 24 | -(void)event:(NSString*) event action:(NSString*) action label:(NSString*) label; 25 | -(void)event:(NSString*) event action:(NSString*) action label:(NSString*) label value:(int) value; 26 | 27 | -(void)startSession; 28 | -(void)stopSession; 29 | -(void)registerCustomDimension:(NSString*) dimension forIndex:(NSUInteger) index; 30 | -(void)setCustom:(NSInteger) index dimension:(NSString*) dimension; 31 | -(void)setCustom:(NSInteger) index metric:(NSNumber*) metric; 32 | 33 | -(void)sendTimingWithCategory:(NSString*) category 34 | withValue:(NSTimeInterval) interval 35 | withName:(NSString*) name 36 | withLabel:(NSString*) label; 37 | 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /eppz!kit/EPPZAnalyticsService.m: -------------------------------------------------------------------------------- 1 | // 2 | // EPPZGoogleAnalyticsService.m 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 8/24/13. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import "EPPZAnalyticsService.h" 16 | 17 | @implementation EPPZAnalyticsService 18 | 19 | 20 | #pragma mark - Subclass templates 21 | 22 | -(void)land { } 23 | 24 | -(void)page:(NSString*) pageName { } 25 | -(void)event:(NSString*) event { } 26 | -(void)event:(NSString*) event action:(NSString*) action { } 27 | -(void)event:(NSString*) event action:(NSString*) action label:(NSString*) label { } 28 | -(void)event:(NSString*) event action:(NSString*) action label:(NSString*) label value:(int) value { } 29 | -(void)startSession { } 30 | -(void)stopSession { } 31 | -(void)registerCustomDimension:(NSString*) dimension forIndex:(NSUInteger) index { } 32 | -(void)setCustom:(NSInteger) index dimension:(NSString*) dimension { } 33 | -(void)setCustom:(NSInteger) index metric:(NSNumber*) metric { } 34 | -(void)sendTimingWithCategory:(NSString*) category 35 | withValue:(NSTimeInterval) interval 36 | withName:(NSString*) name 37 | withLabel:(NSString*) label { } 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /eppz!kit/EPPZAnalyticsTimer.h: -------------------------------------------------------------------------------- 1 | // 2 | // EPPZAnalyticsTimer.h 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 8/24/13. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import 16 | 17 | @interface EPPZAnalyticsTimer : NSObject 18 | 19 | @property (nonatomic, strong) NSString *category; 20 | @property (nonatomic, strong) NSString *name; 21 | @property (nonatomic, strong) NSString *label; 22 | 23 | @property (nonatomic, strong) NSDate *startTimestamp; 24 | @property (nonatomic, strong) NSDate *endTimestamp; 25 | @property (nonatomic) NSTimeInterval interval; 26 | 27 | +(id)timerWithCategory:(NSString*) category name:(NSString*) name label:(NSString*) label; 28 | -(id)initWithCategory:(NSString*) category name:(NSString*) name label:(NSString*) label; 29 | 30 | -(void)stop; 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /eppz!kit/EPPZAnalyticsTimer.m: -------------------------------------------------------------------------------- 1 | // 2 | // EPPZAnalyticsTimer.m 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 8/24/13. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import "EPPZAnalyticsTimer.h" 16 | 17 | @implementation EPPZAnalyticsTimer 18 | 19 | 20 | #pragma mark - Creation 21 | 22 | +(id)timerWithCategory:(NSString*) category name:(NSString*) name label:(NSString*) label 23 | { return [[self alloc] initWithCategory:category name:name label:label]; } 24 | 25 | -(id)initWithCategory:(NSString*) category name:(NSString*) name label:(NSString*) label 26 | { 27 | if (self = [super init]) 28 | { 29 | self.category = category; 30 | self.name = name; 31 | self.label = label; 32 | self.startTimestamp = [NSDate new]; 33 | } 34 | return self; 35 | } 36 | 37 | 38 | #pragma mark - Measure 39 | 40 | -(void)stop 41 | { 42 | self.endTimestamp = [NSDate new]; 43 | self.interval = [self.endTimestamp timeIntervalSinceDate:self.startTimestamp]; 44 | } 45 | 46 | -(NSString*)description 47 | { return [NSString stringWithFormat:@" %@", self.startTimestamp]; } 48 | 49 | 50 | @end 51 | 52 | -------------------------------------------------------------------------------- /eppz!kit/EPPZAppStore.h: -------------------------------------------------------------------------------- 1 | // 2 | // EPPZAppStore.h 3 | // eppz!tools 4 | // 5 | // Created by Borbás Geri on 11/15/12. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import "EPPZSingletonSubclass.h" 16 | #import "EPPZReachability.h" 17 | 18 | #import 19 | #import "SKProduct+LocalizedPrice.h" 20 | #import "NSDecimalNumber+LocalizedPrice.h" 21 | 22 | 23 | /* 24 | 25 | EPPZAppStore is set up only for a single product per request! 26 | But you can invoke multiply request at once anyway. 27 | 28 | */ 29 | 30 | 31 | #import "EPPZAppStoreCallbacks.h" 32 | 33 | 34 | typedef void (^EPPZAppStoreRestorePurchasesSuccessBlock)(); 35 | typedef void (^EPPZAppStoreRestorePurchasesErrorBlock)(NSError *error); 36 | 37 | 38 | #define EPPZ_APPSTORE_LOGGING NO 39 | #define EALog if (EPPZ_APPSTORE_LOGGING) NSLog 40 | #define APPSTORE_ [EPPZAppStore sharedInstance] 41 | 42 | 43 | @interface EPPZAppStore : EPPZSingleton 44 | 45 | 47 | 48 | -(void)takeOff; 49 | 50 | 51 | #pragma mark - Features 52 | 53 | -(BOOL)isProductPurchased:(NSString*) productID; 54 | -(void)saveReceipeForProduct:(NSString*) productID; 55 | -(void)clearReceipeForProduct:(NSString*) productID; 56 | 57 | -(void)requestProductDetails:(NSString*) productID 58 | success:(EPPZAppStoreProductDetailsSuccessBlock) successBlock 59 | error:(EPPZAppStoreErrorBlock) errorBlock; 60 | 61 | -(void)purchaseProduct:(NSString*) productID 62 | success:(EPPZAppStoreProductPurchaseSuccessBlock) successBlock 63 | error:(EPPZAppStoreErrorBlock) errorBlock; 64 | 65 | -(void)restorePurchasesWithSuccess:(EPPZAppStoreRestorePurchasesSuccessBlock) successBlock 66 | error:(EPPZAppStoreErrorBlock) errorBlock; 67 | 68 | 69 | @end 70 | -------------------------------------------------------------------------------- /eppz!kit/EPPZAppStoreCallbacks.h: -------------------------------------------------------------------------------- 1 | // 2 | // EPPZAppStoreCallbacks.h 3 | // eppz!tools 4 | // 5 | // Created by Borbás Geri on 11/15/12. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import 16 | #import 17 | #import "EPPZTimer.h" 18 | 19 | 20 | static NSUInteger const EPPZAppStoreProductRequestRetryAttempts = 3; 21 | static NSUInteger const EPPZAppStoreProductRequestRetryTimeOut = 8.0; 22 | 23 | 24 | typedef void (^EPPZAppStoreProductDetailsSuccessBlock)(SKProduct *product); 25 | typedef void (^EPPZAppStoreProductPurchaseSuccessBlock)(NSString *productID, SKPaymentTransaction *transaction); 26 | typedef void (^EPPZAppStoreErrorBlock)(NSError *error); 27 | 28 | 29 | @interface EPPZAppStoreCallbacks : NSObject 30 | 31 | @property (nonatomic, strong) EPPZAppStoreProductDetailsSuccessBlock productDetailsSuccessBlock; 32 | @property (nonatomic, strong) EPPZAppStoreErrorBlock productDetailsErrorBlock; 33 | 34 | @property (nonatomic, strong) EPPZAppStoreProductPurchaseSuccessBlock productPurchaseSuccessBlock; 35 | @property (nonatomic, strong) EPPZAppStoreErrorBlock productPurchaseErrorBlock; 36 | 37 | @property (nonatomic, strong) NSString *productIdentifier; 38 | @property (nonatomic) NSUInteger retryAttempts; 39 | @property (nonatomic, weak) SKProductsRequest *productsRequest; 40 | 41 | +(id)productDetailsCallbacksWithSuccess:(EPPZAppStoreProductDetailsSuccessBlock) successBlock error:(EPPZAppStoreErrorBlock) errorBlock productsRequest:(SKProductsRequest*) productsRequest productIdentifier:(NSString*) productIdentifier; 42 | +(id)productPurchaseCallbacksWithSuccess:(EPPZAppStoreProductPurchaseSuccessBlock) successBlock error:(EPPZAppStoreErrorBlock) errorBlock; 43 | -(void)retryAfterIntervalIfNeeded:(NSTimeInterval) interval; 44 | -(void)retryProductRequest; 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /eppz!kit/EPPZBinding.h: -------------------------------------------------------------------------------- 1 | // 2 | // EPPZBinding.h 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 20/01/14. 6 | // Copyright (c) 2014 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import 16 | #import 17 | #import "NSDictionary+EPPZKit.h" 18 | 19 | 20 | @class EPPZBinding; 21 | @interface NSObject (EPPZBinding) 22 | @property (nonatomic, strong) NSNumber *swizzled; 23 | @property (nonatomic, weak) EPPZBinding *binding; 24 | -(void)originalDealloc; 25 | -(void)injectedDealloc; 26 | @end 27 | 28 | 29 | #define EPPZ_BINDING_LOGGING NO 30 | #define EBLog if (EPPZ_BINDING_LOGGING) NSLog 31 | 32 | 33 | typedef id (^EPPZBindingRightValueFormatterBlock)(id leftValue); // Should return right value. 34 | typedef id (^EPPZBindingLeftValueFormatterBlock)(id rightValue); // Should return left value. 35 | 36 | 37 | @interface EPPZBinding : NSObject 38 | 39 | @property (nonatomic, weak) NSObject *left; // Strong references ensures proper dealloc order (synchronizator, observers, then objects). 40 | @property (nonatomic, weak) NSObject *right; 41 | 42 | +(id)bindObject:(NSObject*) left 43 | withObject:(NSObject*) right 44 | propertyMap:(NSDictionary*) propertyMap; 45 | 46 | +(id)bindObject:(NSObject*) left 47 | withObject:(NSObject*) right 48 | propertyMap:(NSDictionary*) propertyMap 49 | leftFormatters:(NSDictionary*) leftFormatters 50 | rightFormatters:(NSDictionary*) rightFormatters; 51 | 52 | -(void)updateLeft; // Force update left object. 53 | -(void)updateRight; // Force update right object. 54 | -(void)cut; // Cut bindings (tear down observers). 55 | 56 | @end 57 | -------------------------------------------------------------------------------- /eppz!kit/EPPZBoolTools.h: -------------------------------------------------------------------------------- 1 | // 2 | // EPPZBoolTools.h 3 | // EPPZKit 4 | // 5 | // Created by Borbás Geri on 6/18/12. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import 16 | 17 | 18 | int intFromBool(BOOL boolean); 19 | float floatFromBool(BOOL boolean); 20 | BOOL toggle(BOOL boolean); 21 | NSString *stringFromBool(BOOL boolean); 22 | 23 | float inverseFloat(float number); 24 | -------------------------------------------------------------------------------- /eppz!kit/EPPZBoolTools.m: -------------------------------------------------------------------------------- 1 | // 2 | // EPPZBoolTools.m 3 | // EPPZKit 4 | // 5 | // Created by Borbás Geri on 6/18/12. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import 16 | #import 17 | 18 | 19 | int intFromBool(BOOL boolean) 20 | { 21 | return (int)boolean; 22 | } 23 | 24 | float floatFromBool(BOOL boolean) 25 | { 26 | return (float)(int)boolean; 27 | } 28 | 29 | NSString *stringFromBool(BOOL boolean) 30 | { 31 | return (boolean) ? @"YES" : @"NO"; 32 | } 33 | 34 | BOOL toggle(BOOL boolean) 35 | { 36 | return !boolean; 37 | } 38 | 39 | float inverseFloat(float number) 40 | { 41 | return 1.0 - number; 42 | } -------------------------------------------------------------------------------- /eppz!kit/EPPZConfiguration.h: -------------------------------------------------------------------------------- 1 | // 2 | // EPPZConfiguration.h 3 | // tangle! 4 | // 5 | // Created by Gardrobe on 2/15/14. 6 | // Copyright (c) 2014 eppz! development, LLC. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "NSObject+EPPZRepresentable.h" 11 | #import "NSObject+EPPZConfigurable.h" 12 | 13 | 14 | @interface EPPZConfiguration : NSObject 15 | 16 | 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /eppz!kit/EPPZConfiguration.m: -------------------------------------------------------------------------------- 1 | // 2 | // EPPZConfiguration.m 3 | // tangle! 4 | // 5 | // Created by Gardrobe on 2/15/14. 6 | // Copyright (c) 2014 eppz! development, LLC. All rights reserved. 7 | // 8 | 9 | #import "EPPZConfiguration.h" 10 | 11 | 12 | @implementation EPPZConfiguration 13 | 14 | 15 | +(BOOL)representID { return NO; } 16 | +(BOOL)representClass { return YES; } 17 | +(BOOL)representType { return NO; } 18 | 19 | +(BOOL)reconstructID { return NO; } 20 | +(BOOL)reconstructClass { return NO; } 21 | +(BOOL)reconstructType { return NO; } 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /eppz!kit/EPPZDevice.h: -------------------------------------------------------------------------------- 1 | // 2 | // EPPZDevice.h 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 8/22/13. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import 16 | #import 17 | #import 18 | #include 19 | 20 | #import "EPPZSingletonSubclass.h" 21 | 22 | 23 | #define DEVICE [EPPZDevice sharedDevice] 24 | 25 | 26 | @interface EPPZDevice : EPPZSingleton 27 | 28 | +(EPPZDevice*)sharedDevice; 29 | 30 | @property (nonatomic, readonly) float iOSversion; 31 | @property (nonatomic, readonly) BOOL iOS5; 32 | @property (nonatomic, readonly) BOOL iOS6; 33 | @property (nonatomic, readonly) BOOL iOS7; 34 | 35 | @property (nonatomic, readonly) NSString *machineID; 36 | @property (nonatomic, readonly) NSString *generation; 37 | @property (nonatomic, readonly) NSString *variant; 38 | @property (nonatomic, readonly) NSString *model; 39 | 40 | @property (nonatomic, readonly) NSString *platformDescription; 41 | @property (nonatomic, readonly) NSString *platformString; //Alias for compatibility. 42 | 43 | @property (nonatomic, readonly) NSString *vendorIdentifier; //Alias for compatibility. 44 | @property (nonatomic, readonly) float batteryPercentage; 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /eppz!kit/EPPZDiatonicScale.h: -------------------------------------------------------------------------------- 1 | // 2 | // EPPZDiatonicScale.h 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 10/30/13. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import 16 | 17 | 18 | typedef enum 19 | { 20 | EPPZMajorKey, 21 | EPPZMinorKey 22 | } EPPZScaleKey; 23 | 24 | 25 | @interface EPPZDiatonicScale : NSObject 26 | 27 | @property (nonatomic) EPPZScaleKey key; 28 | @property (nonatomic) NSUInteger semitone; 29 | @property (nonatomic) NSUInteger note; 30 | @property (nonatomic, readonly) float pitch; 31 | 32 | -(float)pitchForSemitone:(NSUInteger) semitone; 33 | -(float)pitchForNote:(NSUInteger) semitone; 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /eppz!kit/EPPZDiatonicScale.m: -------------------------------------------------------------------------------- 1 | // 2 | // EPPZDiatonicScale.m 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 10/30/13. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import "EPPZDiatonicScale.h" 16 | 17 | 18 | @interface EPPZDiatonicScale () 19 | @property (nonatomic, strong) NSArray *majorScale; 20 | @property (nonatomic, strong) NSArray *minorScale; 21 | @property (nonatomic, weak) NSArray *scale; 22 | @end 23 | 24 | 25 | @implementation EPPZDiatonicScale 26 | 27 | -(id)init 28 | { 29 | if (self = [super init]) 30 | { 31 | [self defaults]; 32 | } 33 | return self; 34 | } 35 | 36 | -(void)defaults 37 | { 38 | // Scales. 39 | self.majorScale = @[ @(0), @(2), @(4), @(5), @(7), @(9), @(11), @(12) ]; 40 | self.minorScale = @[ @(0), @(2), @(3), @(5), @(7), @(8), @(10), @(12) ]; 41 | 42 | // Key. 43 | self.key = EPPZMajorKey; 44 | } 45 | 46 | -(void)setKey:(EPPZScaleKey) key 47 | { 48 | _key = key; 49 | 50 | // Set scale. 51 | self.scale = (key == EPPZMajorKey) ? self.majorScale : self.minorScale; 52 | } 53 | 54 | -(float)pitch 55 | { return [self pitchForSemitone:self.semitone]; } 56 | 57 | -(float)pitchForSemitone:(NSUInteger) semitone 58 | { return pow(2, (semitone / 12.0)); } 59 | 60 | -(float)pitchForNote:(NSUInteger) note 61 | { 62 | NSUInteger octave = floor(note / 7.0); 63 | NSUInteger noteInOctave = note % 7; 64 | NSUInteger semitonesBeforeOctave = octave * 12; 65 | NSUInteger semitone = semitonesBeforeOctave + [self.scale[noteInOctave] integerValue]; 66 | 67 | float pitch = pow(2, (semitone / 12.0)); 68 | return pitch; 69 | } 70 | 71 | 72 | @end 73 | -------------------------------------------------------------------------------- /eppz!kit/EPPZFlatButton.h: -------------------------------------------------------------------------------- 1 | // 2 | // EPPZFlatButton.h 3 | // eppz!tools 4 | // 5 | // Created by Borbás Geri on 7/7/13. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import 16 | 17 | @interface EPPZFlatButton : UIButton 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /eppz!kit/EPPZFlatButton.m: -------------------------------------------------------------------------------- 1 | // 2 | // EPPZFlatButton.m 3 | // eppz!tools 4 | // 5 | // Created by Borbás Geri on 7/7/13. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import "EPPZFlatButton.h" 16 | 17 | @implementation EPPZFlatButton 18 | 19 | 20 | -(void)setHighlighted:(BOOL) highlighted 21 | { 22 | [super setHighlighted:highlighted]; 23 | self.backgroundColor = (highlighted) ? [UIColor blackColor] : [UIColor darkGrayColor]; 24 | } 25 | 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /eppz!kit/EPPZGoogleAnalyticsService.h: -------------------------------------------------------------------------------- 1 | // 2 | // EPPZGoogleAnalyticsService.h 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 8/24/13. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | 16 | #import "EPPZAnalyticsService.h" 17 | #import "GAI.h" 18 | #import "GAIDictionaryBuilder.h" 19 | #import "GAIFields.h" 20 | 21 | 22 | #define GOOGLE_ANALYTICS_LOGGING NO 23 | #define GALog if (GOOGLE_ANALYTICS_LOGGING) NSLog 24 | 25 | 26 | @interface EPPZGoogleAnalyticsService : EPPZAnalyticsService 27 | 28 | -(void)takeOffWithPropertyID:(NSString*) googleAnalitycsPropertyID dispatchPeriod:(NSNumber*) dispatchPeriodSeconds; 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /eppz!kit/EPPZKit.h: -------------------------------------------------------------------------------- 1 | // 2 | // EPPZKit.h 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 7/15/13. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | 16 | static NSString *const kEPPZKitVersion = @"1.9.2"; 17 | 18 | 19 | //Base classes. 20 | #import "EPPZSingleton.h" 21 | #import "EPPZSingletonSubclass.h" 22 | 23 | //Wrappers. 24 | #import "EPPZAnalytics.h" //ANALYTICS_ (subclasses should define ANALYTICS) 25 | #import "EPPZFileManager.h" //FILES 26 | #import "EPPZDevice.h" //DEVICE 27 | #import "EPPZReachability.h" 28 | #import "NSString+EPPZReachability.h" 29 | #import "EPPZAppStore.h" //APPSTORE_ 30 | 31 | //Tools. 32 | #import "EPPZTools.h" 33 | #import "EPPZBoolTools.h" 34 | #import "NSDate+EPPZKit.h" 35 | #import "NSString+EPPZKit.h" 36 | #import "NSArray+EPPZKit.h" 37 | #import "EPPZTimer.h" 38 | #import "EPPZVersions.h" //VERSIONS_ 39 | #import "EPPZGeometry.h" 40 | #import "EPPZDiatonicScale.h" 41 | #import "NSDictionary+EPPZKit.h" 42 | #import "EPPZBinding.h" 43 | 44 | //UIKit tools. 45 | #import "EPPZViewOwner.h" 46 | #import "EPPZGestureRecognizer.h" 47 | #import "EPPZFlatButton.h" 48 | #import "EPPZAlert.h" 49 | #import "EPPZPagingScrollViewController.h" 50 | #import "EPPZTagFinder.h" 51 | #import "EPPZLabel.h" 52 | #import "UIImage+EPPZKit.h" 53 | #import "UICircle.h" 54 | #import "UIColor+EPPZKit.h" 55 | #import "UIFont+EPPZKit.h" 56 | 57 | //Model tools. 58 | #import "EPPZUserDefaults.h" 59 | #import "NSObject+EPPZRepresentable.h" 60 | #import "EPPZRepresentableInspectorViewController.h" 61 | #import "EPPZConfiguration.h" 62 | 63 | 64 | -------------------------------------------------------------------------------- /eppz!kit/EPPZLabel.h: -------------------------------------------------------------------------------- 1 | // 2 | // EPPZLabel.h 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 8/8/13. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import 16 | #import 17 | #import 18 | 19 | #import "EPPZTagFinder.h" 20 | #import "EPPZDevice.h" 21 | 22 | 23 | /* 24 | 25 | Now only iOS 6.0+ feature (iOS detection encapsulated). 26 | 27 | Usage 1. 28 | Simply set boldRange to have a range bold. 29 | 30 | Usage 2. 31 | Simply set boldRanges (NSArray of NSRange NSValues) to have the ranges bold. 32 | 33 | Usage 3. 34 | Even more simply assign htmlString property that uses non overlapping tags. 35 | 36 | */ 37 | 38 | @interface EPPZLabel : UILabel 39 | 40 | @property (nonatomic) NSRange boldRange; 41 | @property (nonatomic, strong) NSArray *boldRanges; 42 | @property (nonatomic, strong) NSString *htmlString; 43 | 44 | -(UIFont*)boldFont; //Override in a subclass to use custom font. 45 | @end 46 | -------------------------------------------------------------------------------- /eppz!kit/EPPZPagingScrollViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // EPPZPagingScrollViewController.h 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 7/23/13. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import 16 | 17 | @interface EPPZPagingScrollViewController : NSObject 18 | 19 | 20 | 21 | @property (nonatomic) NSUInteger currentPage; 22 | @property (nonatomic) NSUInteger numberOfPages; 23 | 24 | @property (nonatomic, weak) IBOutlet UIScrollView *scrollView; 25 | @property (nonatomic, weak) IBOutlet UIView *contentView; 26 | @property (nonatomic, weak) IBOutlet UIPageControl *pageControl; 27 | 28 | -(void)scrollToPage:(int) pageNumber animated:(BOOL) animated; 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /eppz!kit/EPPZPagingScrollViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // EPPZPagingScrollViewController.m 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 7/23/13. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import "EPPZPagingScrollViewController.h" 16 | 17 | @implementation EPPZPagingScrollViewController 18 | 19 | -(void)awakeFromNib 20 | { 21 | [super awakeFromNib]; 22 | 23 | self.scrollView.pagingEnabled = YES; 24 | self.scrollView.contentSize = self.contentView.bounds.size; 25 | 26 | self.pageControl.numberOfPages = round(self.contentView.bounds.size.width / self.scrollView.bounds.size.width); 27 | self.pageControl.currentPage = 0; 28 | [self.pageControl addTarget:self action:@selector(pageControlVaueChanged:) forControlEvents:UIControlEventValueChanged]; 29 | } 30 | 31 | 32 | #pragma mark - Paging 33 | 34 | -(void)pageControlVaueChanged:(UIPageControl*) pageControl 35 | { 36 | //Adjust scrollView. 37 | float offset = pageControl.currentPage * self.scrollView.bounds.size.width; 38 | CGPoint contentOffset = CGPointMake(offset, 0.0); 39 | [self.scrollView setContentOffset:contentOffset animated:YES]; 40 | } 41 | 42 | -(void)scrollViewDidScroll:(UIScrollView *)scrollView 43 | { 44 | //Calculate. 45 | int pageNumber = ceil((scrollView.contentOffset.x - (scrollView.bounds.size.width / 2)) / scrollView.bounds.size.width); 46 | 47 | //Adjust pageControl. 48 | if (self.pageControl.currentPage != pageNumber) 49 | { self.pageControl.currentPage = pageNumber; } 50 | } 51 | 52 | -(void)scrollToPage:(int) pageNumber animated:(BOOL) animated 53 | { 54 | //Adjust scrollView. 55 | float offset = pageNumber * self.scrollView.bounds.size.width; 56 | CGPoint contentOffset = CGPointMake(offset, 0.0); 57 | [self.scrollView setContentOffset:contentOffset animated:animated]; 58 | } 59 | 60 | 61 | @end 62 | -------------------------------------------------------------------------------- /eppz!kit/EPPZRandom.h: -------------------------------------------------------------------------------- 1 | // 2 | // EPPZRandom.h 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 11/24/13. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import 16 | 17 | 18 | float randomFloat(); 19 | float randomRoundedFloatInRange(float range); 20 | float randomIntegerInRange(int range); 21 | -------------------------------------------------------------------------------- /eppz!kit/EPPZRandom.m: -------------------------------------------------------------------------------- 1 | // 2 | // EPPZRandom.m 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 11/24/13. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import "EPPZRandom.h" 16 | 17 | 18 | float randomFloat() 19 | { 20 | int size = 2147483647; 21 | return (float)(arc4random() % size) / (float)size; 22 | } 23 | 24 | float randomRoundedFloatInRange(float range) 25 | { 26 | if (range <= 0) return 0.0; 27 | return (float)(arc4random() % (int)range); 28 | } 29 | 30 | float randomIntegerInRange(int range) 31 | { 32 | if (range <= 0) return 0; 33 | return arc4random() % (int)range; 34 | } -------------------------------------------------------------------------------- /eppz!kit/EPPZRepresentable.rtf: -------------------------------------------------------------------------------- 1 | {\rtf1\ansi\ansicpg1252\cocoartf1265 2 | {\fonttbl\f0\fswiss\fcharset0 Helvetica;} 3 | {\colortbl;\red255\green255\blue255;} 4 | \margl1440\margr1440\vieww9000\viewh8400\viewkind0 5 | \pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural 6 | 7 | \f0\fs24 \cf0 Doing:\ 8 | \ 9 | -Plist features\ 10 | -Background processing with blocks\ 11 | \ 12 | Optimizations:\ 13 | \ 14 | -Cache persistableProperyNames results for each class (Collect propertyNames once per runtime)\ 15 | -Create NSKeyedArchiver implementation\ 16 | \ 17 | Done:\ 18 | \ 19 | -More control\ 20 | -Subclass template to represent / reconstruct values\ 21 | \ 22 | -Added some control over representing\ 23 | -Can turn on / off representing identifiers\ 24 | -ClassName representing property can be customized\ 25 | -Mapping can be implemented between represented / runtime class names\ 26 | -Mapping can be implemented between representations / runtime property names\ 27 | \ 28 | -Store features\ 29 | -Pick superclass properties (only when conforming EPPZRepresentable)\ 30 | \ 31 | -Store improvements\ 32 | -Fixed reference storing endless loop\ 33 | -Mark object being (!) represented, instead after representation\ 34 | -Look into collections (NSArray, NSDictionary) as well (not just EPPZRepresentables)\ 35 | -NSArray members iterated\ 36 | -NSDictionary members iterated \ 37 | -Added EPPZRepresentableException to throw rich exceptions for some given type of errors\ 38 | -Actually keep collect errors during development here with rich debug information\ 39 | -Attempt to represent unknown NSObjects\ 40 | \ 41 | -Store references\ 42 | -Save hash (memory address) along representable, so duplicates can be eliminated\ 43 | -Added object pool to track represented objects\ 44 | -Reconstruction tracks stored IDs\ 45 | -Actually awesome :)\ 46 | \ 47 | -Represent foreign classes\ 48 | \ 49 | -Now represents some new types\ 50 | -Type representation extracted\ 51 | -CGRect, CGPoint, CGSize, CGAffineTransform\ 52 | -and UIColor for now (easily extendable)\ 53 | \ 54 | -Represent foreign classes\ 55 | -Implement presistablePropertyName in a category (!)\ 56 | -Works fine with a UIView category, see testbed UIView model\ 57 | -Now save four major CG type (CGRect, CGPoint, CGSize, CGAffineTransform)\ 58 | -Accept key paths in persistableProperyNames\ 59 | -Works only when the instance is created (what is referred in the key path)\ 60 | -Subclasses can implement willLoad to create blank objects to populate\ 61 | \ 62 | -Implement initialize from dictionary representation\ 63 | -Issue with not collecting representable name correctly?\ 64 | -Just comment EPPZViewController.m at 68\ 65 | -Resolved} -------------------------------------------------------------------------------- /eppz!kit/EPPZRepresentableException.h: -------------------------------------------------------------------------------- 1 | // 2 | // EPPZRepresentableException.h 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 9/24/13. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import 16 | 17 | @interface EPPZRepresentableException : NSException 18 | 19 | 20 | +(EPPZRepresentableException*)object:(NSObject*) object hasNoSuchPropertyNamed:(NSString*) propertyName; 21 | +(EPPZRepresentableException*)object:(NSObject*) object couldNotRepresentPropertyNamed:(NSString*) propertyName; 22 | +(EPPZRepresentableException*)object:(NSObject*) object couldNotWriteDictionaryRepresentation:(NSDictionary*) dictionaryRepresentation toPlistNamed:(NSString*) plistName; 23 | 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /eppz!kit/EPPZRepresentableException.m: -------------------------------------------------------------------------------- 1 | // 2 | // EPPZRepresentableException.m 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 9/24/13. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import "EPPZRepresentableException.h" 16 | 17 | @implementation EPPZRepresentableException 18 | 19 | 20 | +(EPPZRepresentableException*)object:(NSObject*) object hasNoSuchPropertyNamed:(NSString*) propertyName 21 | { 22 | NSString *reason = [NSString stringWithFormat:@"Probably you have defined custom 'representablePropertyNames' for this class <%@>, but no '%@' property exist anymore.", NSStringFromClass(object.class), propertyName]; 23 | return (EPPZRepresentableException*)[NSException exceptionWithName:@"No such property." reason:reason userInfo:nil]; 24 | } 25 | 26 | +(EPPZRepresentableException*)object:(NSObject*) object couldNotRepresentPropertyNamed:(NSString*) propertyName; 27 | { 28 | NSString *reason = [NSString stringWithFormat:@"Class <%@> could not represent property '%@'.", NSStringFromClass(object.class), propertyName]; 29 | return (EPPZRepresentableException*)[NSException exceptionWithName:@"Could not represent class." reason:reason userInfo:nil]; 30 | } 31 | 32 | +(EPPZRepresentableException*)object:(NSObject*) object couldNotWriteDictionaryRepresentation:(NSDictionary*) dictionaryRepresentation toPlistNamed:(NSString*) plistName 33 | { 34 | NSString *reason = [NSString stringWithFormat:@"Class <%@> could not saved to plist named '%@'. Probably represented dictionary tree below contains some non-plist compilant values. %@", NSStringFromClass(object.class), plistName, dictionaryRepresentation]; 35 | return (EPPZRepresentableException*)[NSException exceptionWithName:@"Could not save plist representation." reason:reason userInfo:nil]; 36 | } 37 | 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /eppz!kit/EPPZRepresentableInspectorViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // EPPZRepresentableInspectorViewController.h 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 1/23/14. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | 16 | #import "NSObject+EPPZRepresentable.h" 17 | #import 18 | #import "EPPZRepresentablePropertyCell.h" 19 | 20 | 21 | @interface EPPZRepresentableInspectorViewController : UIViewController 22 | 23 | 24 | 25 | +(void)presentInViewController:(UIViewController*) viewController 26 | withRepresentable:(NSObject*) representable; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /eppz!kit/EPPZRepresentablePropertyCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // EPPZRepresentablePropertyCell.h 3 | // eppz!kit 4 | // 5 | // Created by Gardrobe on 1/24/14. 6 | // Copyright (c) 2014 eppz!. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "NSObject+EPPZRepresentable.h" 11 | 12 | 13 | @interface EPPZRepresentablePropertyCell : UITableViewCell 14 | 15 | @property (nonatomic, readonly) BOOL isDisclosing; 16 | @property (nonatomic, readonly) NSString *propertyName; 17 | 18 | +(id)configuredCellInTableView:(UITableView*) tableView 19 | index:(NSUInteger) index 20 | representable:(NSObject*) representable 21 | dictionaryRepresentation:(NSDictionary*) dictionaryRepresentation; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /eppz!kit/EPPZRepresenter.h: -------------------------------------------------------------------------------- 1 | // 2 | // EPPZRepresenter.h 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 8/22/13. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import 16 | #import 17 | #import 18 | 19 | #import "UIColor+EPPZRepresenter.h" 20 | 21 | /* 22 | 23 | Represents: 24 | 25 | CGRect 26 | CGPoint 27 | CGSize 28 | CGAffineTransform 29 | 30 | UIColor 31 | 32 | */ 33 | 34 | 35 | @interface EPPZRepresenter : NSObject 36 | 37 | +(id)runtimeValueFromRepresentationValue:(id) representationValue; 38 | +(id)representationValueFromRuntimeValue:(id) runtimeValue; 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /eppz!kit/EPPZSingleton.h: -------------------------------------------------------------------------------- 1 | // 2 | // EPPZSingleton.h 3 | // EPPZKit 4 | // 5 | // Created by Borbás Geri on 1/23/12. 6 | // Copyright (c) 2012 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import 16 | 17 | 18 | #define EPPZ [EPPZSingleton sharedInstance] 19 | 20 | 21 | @interface EPPZSingleton : NSObject 22 | 23 | @property (nonatomic, retain, readonly) NSMutableArray *delegates; 24 | 25 | +(id)sharedInstance; 26 | 27 | -(void)addDelegate:(id) object; 28 | -(void)removeDelegate:(id) object; 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /eppz!kit/EPPZSingletonSubclass.h: -------------------------------------------------------------------------------- 1 | // 2 | // EPPZSingletonSubclass.h 3 | // EPPZKit 4 | // 5 | // Created by Borbás Geri on 5/26/12. 6 | // Copyright (c) 2011 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | 16 | #import "EPPZSingleton.h" 17 | 18 | 19 | extern NSMutableDictionary *_sharedEPPZSingletonInstances; 20 | 21 | 22 | @interface EPPZSingleton (Protected) 23 | 24 | +(NSString*)className; 25 | 26 | -(void)messageDelegates:(SEL) selector; 27 | -(void)messageDelegates:(SEL) selector withObject:(id) object; 28 | -(void)messageDelegates:(SEL) selector withObject:(id) object withObject:(id) anotherObject; 29 | 30 | -(id)queryLastDelegate:(SEL) selector; 31 | -(id)queryLastDelegate:(SEL) selector withObject:(id) object; 32 | -(id)queryLastDelegate:(SEL) selector withObject:(id) object withObject:(id) anotherObject; 33 | 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /eppz!kit/EPPZTagFinder.h: -------------------------------------------------------------------------------- 1 | // 2 | // EPPZTagFinder.h 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 8/8/13. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import 16 | #import 17 | 18 | 19 | /* 20 | 21 | EPPZTagFinder *tagFinder = [EPPZTagFinder findTags:@"" inString:@"This string contains a strong tag."]; 22 | It gives you the stripped string (tagFinder.strippedString) with ranges (tagFinder.ranges) that points to the tagged ranges in it. 23 | 24 | */ 25 | 26 | 27 | @interface EPPZTagFinder : NSObject 28 | 29 | 30 | @property (nonatomic, readonly) NSString *string; 31 | @property (nonatomic, readonly) NSString *strippedString; 32 | @property (nonatomic, readonly) NSString *tag; 33 | 34 | +(id)tagFinderForFindTags:(NSString*) tag inString:(NSString*) string; 35 | @property (nonatomic, readonly) NSArray *rangeValuesOfTag; //Array of NSValues storing NSRanges. 36 | 37 | +(NSArray*)findTags:(NSString*) tag inString:(NSString*) string; 38 | 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /eppz!kit/EPPZTimer.h: -------------------------------------------------------------------------------- 1 | // 2 | // EPPZTimer.h 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 8/11/13. 6 | // Copyright (c) 2013 eppz!. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface EPPZTimer : NSObject 12 | 13 | @property (nonatomic, readonly) NSTimer *timer; 14 | +(id)scheduledTimerWithTimeInterval:(NSTimeInterval) interval 15 | target:(id) target 16 | selector:(SEL) selector 17 | userInfo:(id) userInfo 18 | repeats:(BOOL) repeat; 19 | -(void)invalidate; 20 | @end 21 | -------------------------------------------------------------------------------- /eppz!kit/EPPZTimer.m: -------------------------------------------------------------------------------- 1 | // 2 | // EPPZTimer.m 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 8/11/13. 6 | // Copyright (c) 2013 eppz!. All rights reserved. 7 | // 8 | 9 | #import "EPPZTimer.h" 10 | 11 | 12 | @interface EPPZTimer () 13 | @property (nonatomic, weak) id target; 14 | @property (nonatomic) SEL selector; 15 | @property (nonatomic, strong) NSTimer *timer_; 16 | @end 17 | 18 | 19 | @implementation EPPZTimer 20 | 21 | 22 | #pragma mark - Creation 23 | 24 | +(id)scheduledTimerWithTimeInterval:(NSTimeInterval) interval 25 | target:(id) target 26 | selector:(SEL) selector 27 | userInfo:(id) userInfo 28 | repeats:(BOOL) repeat 29 | { 30 | return [[self alloc] initWithTimeInterval:interval 31 | target:target 32 | selector:selector 33 | userInfo:userInfo 34 | repeats:repeat]; 35 | } 36 | 37 | -(id)initWithTimeInterval:(NSTimeInterval) interval 38 | target:(id) target 39 | selector:(SEL) selector 40 | userInfo:(id) userInfo 41 | repeats:(BOOL) repeat 42 | { 43 | if (self = [super init]) 44 | { 45 | self.target = target; 46 | self.selector = selector; 47 | self.timer_ = [NSTimer scheduledTimerWithTimeInterval:interval 48 | target:self 49 | selector:@selector(tick:) 50 | userInfo:userInfo 51 | repeats:repeat]; 52 | } 53 | return self; 54 | } 55 | 56 | -(void)tick:(NSTimer*) timer 57 | { 58 | if (self.target != nil) 59 | { 60 | if ([self.target respondsToSelector:self.selector]) 61 | { 62 | #pragma clang diagnostic push 63 | #pragma clang diagnostic ignored "-Warc-performSelector-leaks" 64 | [self.target performSelector:self.selector withObject:self.timer]; 65 | #pragma clang diagnostic pop 66 | } 67 | } 68 | 69 | else 70 | { 71 | [self.timer_ invalidate]; 72 | //That will release EPPZTimer instance as well. 73 | } 74 | } 75 | 76 | -(NSTimer*)timer { return _timer_; } 77 | 78 | -(void)invalidate 79 | { 80 | [self.timer_ invalidate]; 81 | //EPPZTimer is not retined by the NSTimer anymore (will release along owner). 82 | } 83 | 84 | 85 | @end 86 | -------------------------------------------------------------------------------- /eppz!kit/EPPZTools.h: -------------------------------------------------------------------------------- 1 | // 2 | // EPPZTools.h 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 8/22/13. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import 16 | 17 | 18 | #define METHOD_LOGGING YES 19 | #define LOG_METHOD if (METHOD_LOGGING) NSLog(@"%@ %@", NSStringFromClass(self.class), NSStringFromSelector(_cmd)) 20 | #define LOG LOG_METHOD; 21 | #define _LOG LOG // Alias. 22 | 23 | // Fake literal for NSSet. 24 | #define $(...) [NSSet setWithObjects:__VA_ARGS__, nil] 25 | 26 | void crash(); 27 | 28 | typedef void (^EPPZRepeatBlock)(); 29 | void repeat(NSUInteger until, EPPZRepeatBlock repeatBlock); 30 | 31 | typedef void (^EPPZCounterBlock)(NSUInteger index); 32 | void count(NSUInteger until, EPPZCounterBlock counterBlock); 33 | 34 | typedef void (^WaitCompletionBlock)(); 35 | void waitFor(NSTimeInterval duration, WaitCompletionBlock completion); 36 | 37 | void getFontList(); -------------------------------------------------------------------------------- /eppz!kit/EPPZTools.m: -------------------------------------------------------------------------------- 1 | // 2 | // EPPZTools.m 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 8/28/13. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import "EPPZTools.h" 16 | 17 | 18 | void crash() 19 | { 20 | NSLog(@"Crashing by intention by insert nil to a mutable array."); 21 | [[NSMutableArray new] addObject:NSStringFromClass(nil)]; 22 | } 23 | 24 | void repeat(NSUInteger until, EPPZRepeatBlock repeatBlock) 25 | { 26 | for (NSUInteger index = 0; index <= until; index++) 27 | { repeatBlock(); } 28 | } 29 | 30 | void count(NSUInteger until, EPPZCounterBlock counterBlock) 31 | { 32 | for (NSUInteger index = 0; index <= until; index++) 33 | { counterBlock(index); } 34 | } 35 | 36 | void waitFor(NSTimeInterval duration, WaitCompletionBlock completion) 37 | { 38 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, duration * NSEC_PER_SEC), 39 | dispatch_get_main_queue(), ^{ completion(); }); 40 | } -------------------------------------------------------------------------------- /eppz!kit/EPPZUserDefaults.h: -------------------------------------------------------------------------------- 1 | // 2 | // EPPZUserDefault.h 3 | // eppz!tools 4 | // 5 | // Created by Borbás Geri on 7/11/13. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import 16 | #import 17 | 18 | 19 | @interface EPPZUserDefaults : NSObject 20 | 21 | +(NSArray*)persistablePropertyNames; //Subclass template [Optional]. 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /eppz!kit/EPPZVersions.h: -------------------------------------------------------------------------------- 1 | // 2 | // EPPZVersions.h 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 12/14/12. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import "EPPZSingletonSubclass.h" 16 | 17 | 18 | #define VERSIONS_ [EPPZVersions sharedInstance] 19 | 20 | 21 | @interface EPPZVersions : EPPZSingleton 22 | 23 | @property (nonatomic, weak) NSUserDefaults *userDefaults; //Visible for subclasses 24 | @property (nonatomic, readonly) NSInteger launchCount; 25 | @property (nonatomic, readonly) NSString *sessionNumber; 26 | 27 | 28 | -(void)takeOff; 29 | -(void)checkFeatures; 30 | 31 | -(void)applicationDidFinishLaunching; 32 | -(void)applicationWillEnterForeground; 33 | -(void)applicationDidEnterBackground; 34 | 35 | 36 | #pragma mark - App environment 37 | 38 | -(void)markFirstRunIfNeeded; 39 | -(BOOL)isFirstRun; 40 | -(BOOL)isFirstRunCurrentVersion; 41 | 42 | -(BOOL)isBrandNewInstall; 43 | -(BOOL)hasPreviousBundleVersionInstalled; 44 | -(BOOL)hasBundleVersionEverInstalled:(NSString*) versionString; 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /eppz!kit/EPPZViewOwner.h: -------------------------------------------------------------------------------- 1 | // 2 | // EPPZViewOwner.h 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 7/18/13. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import 16 | #import 17 | 18 | 19 | @interface EPPZViewOwner : NSObject 20 | @property (nonatomic, weak) IBOutlet UIView *view; 21 | +(UIView*)viewFromNibNamed:(NSString*) nibName; 22 | +(UIView*)viewFromNibNamed:(NSString*) nibName bundle:(NSBundle*) bundle; 23 | @end 24 | 25 | -------------------------------------------------------------------------------- /eppz!kit/EPPZViewOwner.m: -------------------------------------------------------------------------------- 1 | // 2 | // EPPZViewOwner.m 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 7/18/13. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import "EPPZViewOwner.h" 16 | 17 | 18 | @implementation EPPZViewOwner 19 | 20 | 21 | +(UIView*)viewFromNibNamed:(NSString*) nibName 22 | { return [self viewFromNibNamed:nibName bundle:[NSBundle mainBundle]]; } 23 | 24 | +(UIView*)viewFromNibNamed:(NSString*) nibName bundle:(NSBundle*) bundle 25 | { 26 | EPPZViewOwner *owner = [EPPZViewOwner new]; 27 | [bundle loadNibNamed:nibName owner:owner options:nil]; 28 | return owner.view; 29 | } 30 | 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /eppz!kit/GAIEcommercePromotion.h: -------------------------------------------------------------------------------- 1 | /*! 2 | @header GAIEcommercePromotion.h 3 | @abstract Google Analytics iOS SDK Hit Format Header 4 | @copyright Copyright 2014 Google Inc. All rights reserved. 5 | */ 6 | 7 | #import 8 | 9 | /*! 10 | * Class to construct promotion related fields for Google Analytics hits. The fields from this class 11 | * can be used to represent internal promotions that run within an app, such as banners, banner ads 12 | * etc. 13 | * 14 | * Typical usage: 15 | * 16 | * GAIDictionaryBuilder *builder = [GAIDictionaryBuilder createScreenView]; 17 | * GAIEcommercePromotion *promotion = [[GAIEcommercePromotion alloc] init]; 18 | * [promotion setId:@"PROMO-ID1234"]; 19 | * [promotion setName:@"Home screen banner"]; 20 | * [builder set:kGAIPromotionClick forKey:kGAIPromotionAction]; 21 | * [builder addPromotion:promotion]; 22 | * [tracker send:builder.build]]; 23 | * 24 | */ 25 | @interface GAIEcommercePromotion : NSObject 26 | 27 | /*! 28 | Sets the id that is used to identify a promotion in GA reports. 29 | */ 30 | - (GAIEcommercePromotion *)setId:(NSString *)pid; 31 | 32 | /*! 33 | Sets the name that is used to identify a promotion in GA reports. 34 | */ 35 | - (GAIEcommercePromotion *)setName:(NSString *)name; 36 | 37 | /*! 38 | Sets the name of the creative associated with the promotion. 39 | */ 40 | - (GAIEcommercePromotion *)setCreative:(NSString *)creative; 41 | 42 | /*! 43 | Sets the position of the promotion. 44 | */ 45 | - (GAIEcommercePromotion *)setPosition:(NSString *)position; 46 | 47 | /*! 48 | Builds an NSDictionary of fields stored in this instance. The index parameter is the 49 | index of this promotion in that promotion list. 50 |
51 | Normally, users will have no need to call this method. 52 | */ 53 | - (NSDictionary *)buildWithIndex:(NSUInteger)index; 54 | @end 55 | -------------------------------------------------------------------------------- /eppz!kit/GAILogger.h: -------------------------------------------------------------------------------- 1 | /*! 2 | @header GAILogger.h 3 | @abstract Google Analytics iOS SDK Source 4 | @copyright Copyright 2011 Google Inc. All rights reserved. 5 | */ 6 | 7 | #import 8 | 9 | typedef NS_ENUM(NSUInteger, GAILogLevel) { 10 | kGAILogLevelNone = 0, 11 | kGAILogLevelError = 1, 12 | kGAILogLevelWarning = 2, 13 | kGAILogLevelInfo = 3, 14 | kGAILogLevelVerbose = 4 15 | }; 16 | 17 | /*! 18 | Protocol to be used for logging debug and informational messages from the SDK. 19 | Implementations of this protocol can be provided to the |GAI| class, 20 | to be used as the logger by the SDK. See the |logger| property in GAI.h. 21 | */ 22 | @protocol GAILogger 23 | @required 24 | 25 | /*! 26 | Only messages of |logLevel| and below are logged. 27 | */ 28 | @property (nonatomic, assign) GAILogLevel logLevel; 29 | 30 | /*! 31 | Logs message with log level |kGAILogLevelVerbose|. 32 | */ 33 | - (void)verbose:(NSString *)message; 34 | 35 | /*! 36 | Logs message with log level |kGAILogLevelInfo|. 37 | */ 38 | - (void)info:(NSString *)message; 39 | 40 | /*! 41 | Logs message with log level |kGAILogLevelWarning|. 42 | */ 43 | - (void)warning:(NSString *)message; 44 | 45 | /*! 46 | Logs message with log level |kGAILogLevelError|. 47 | */ 48 | - (void)error:(NSString *)message; 49 | @end 50 | -------------------------------------------------------------------------------- /eppz!kit/GAITrackedViewController.h: -------------------------------------------------------------------------------- 1 | /*! 2 | @header GAITrackedViewController.h 3 | @abstract Google Analytics for iOS Tracked View Controller Header 4 | @copyright Copyright 2012 Google Inc. All rights reserved. 5 | */ 6 | 7 | #import 8 | #import 9 | 10 | @protocol GAITracker; 11 | 12 | /*! 13 | Extends UIViewController to generate Google Analytics screenview calls 14 | whenever the view appears; this is done by overriding the `viewDidAppear:` 15 | method. The screen name must be set for any tracking calls to be made. 16 | 17 | By default, this will use [GAI defaultTracker] for tracking calls, but one can 18 | override this by setting the tracker property. 19 | */ 20 | @interface GAITrackedViewController : UIViewController 21 | 22 | /*! 23 | The tracker on which view tracking calls are be made, or `nil`, in which case 24 | [GAI defaultTracker] will be used. 25 | */ 26 | @property(nonatomic, assign) id tracker; 27 | /*! 28 | The screen name, for purposes of Google Analytics tracking. If this is `nil`, 29 | no tracking calls will be made. 30 | */ 31 | @property(nonatomic, copy) NSString *screenName; 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /eppz!kit/GAITracker.h: -------------------------------------------------------------------------------- 1 | /*! 2 | @header GAITracker.h 3 | @abstract Google Analytics iOS SDK Tracker Header 4 | @copyright Copyright 2013 Google Inc. All rights reserved. 5 | */ 6 | 7 | #import 8 | 9 | /*! 10 | Google Analytics tracking interface. Obtain instances of this interface from 11 | [GAI trackerWithTrackingId:] to track screens, events, transactions, timing, 12 | and exceptions. The implementation of this interface is thread-safe, and no 13 | calls are expected to block or take a long time. All network and disk activity 14 | will take place in the background. 15 | */ 16 | @protocol GAITracker 17 | 18 | /*! 19 | Name of this tracker. 20 | */ 21 | @property(nonatomic, readonly) NSString *name; 22 | 23 | /*! 24 | Allow collection of IDFA and related fields if set to true. Default is false. 25 | */ 26 | @property(nonatomic) BOOL allowIDFACollection; 27 | 28 | /*! 29 | Set a tracking parameter. 30 | 31 | @param parameterName The parameter name. 32 | 33 | @param value The value to set for the parameter. If this is nil, the 34 | value for the parameter will be cleared. 35 | */ 36 | - (void)set:(NSString *)parameterName 37 | value:(NSString *)value; 38 | 39 | /*! 40 | Get a tracking parameter. 41 | 42 | @param parameterName The parameter name. 43 | 44 | @returns The parameter value, or nil if no value for the given parameter is 45 | set. 46 | */ 47 | - (NSString *)get:(NSString *)parameterName; 48 | 49 | /*! 50 | Queue tracking information with the given parameter values. 51 | 52 | @param parameters A map from parameter names to parameter values which will be 53 | set just for this piece of tracking information, or nil for none. 54 | */ 55 | - (void)send:(NSDictionary *)parameters; 56 | 57 | @end 58 | -------------------------------------------------------------------------------- /eppz!kit/NSArray+EPPZKit.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSArray+EPPZKit.h 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 10/5/13. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import 16 | #import "EPPZRandom.h" 17 | 18 | 19 | @interface NSArray (EPPZKit) 20 | -(id)nextObjectAfterObject:(id) object; 21 | -(id)randomObject; 22 | @end 23 | -------------------------------------------------------------------------------- /eppz!kit/NSArray+EPPZKit.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSArray+EPPZKit.m 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 10/5/13. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import "NSArray+EPPZKit.h" 16 | 17 | 18 | @implementation NSArray (EPPZKit) 19 | 20 | -(id)nextObjectAfterObject:(id) object 21 | { 22 | // Have current object at all? 23 | if ([self containsObject:object] == NO) return nil; 24 | 25 | // Seek next available index. 26 | NSUInteger currentIndex = [self indexOfObject:object]; 27 | NSUInteger lastIndex = self.count - 1; 28 | NSUInteger nextIndex; 29 | if (currentIndex == lastIndex) nextIndex = 0; 30 | else nextIndex = currentIndex + 1; 31 | 32 | // Return object. 33 | return [self objectAtIndex:nextIndex]; 34 | } 35 | 36 | -(id)randomObject 37 | { 38 | // Checks. 39 | if (self.count == 0) return nil; 40 | 41 | int randomIndex = randomIntegerInRange((int)self.count); 42 | return [self objectAtIndex:randomIndex]; 43 | } 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /eppz!kit/NSDate+EPPZKit.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSDate+EPPZKit.h 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 7/29/13. 6 | // Copyright (c) 2013 eppz!. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface NSDate (EPPZKit) 13 | 14 | +(NSString*)diplayStringOfInterval:(NSTimeInterval) interval; 15 | +(NSString*)displayStringOfIntervalFromDate:(NSDate*) from toDate:(NSDate*) to; 16 | -(NSString*)diplayStringOfIntervalSinceDate:(NSDate*) date; 17 | 18 | +(void)testDisplayStringOfInterval; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /eppz!kit/NSDate+EPPZKit.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSDate+EPPZKit.m 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 7/29/13. 6 | // Copyright (c) 2013 eppz!. All rights reserved. 7 | // 8 | 9 | #import "NSDate+EPPZKit.h" 10 | 11 | 12 | @implementation NSDate (EPPZKit) 13 | 14 | 15 | +(NSString*)diplayStringOfInterval:(NSTimeInterval) interval 16 | { 17 | NSDate *now = [NSDate date]; 18 | NSDate *nowPlusInterval = [[NSDate alloc] initWithTimeInterval:interval sinceDate:now]; 19 | return [self displayStringOfIntervalFromDate:now toDate:nowPlusInterval]; 20 | } 21 | 22 | +(NSString*)displayStringOfIntervalFromDate:(NSDate*) from toDate:(NSDate*) to 23 | { 24 | NSCalendar *calendar = [NSCalendar currentCalendar]; 25 | unsigned int units = NSDayCalendarUnit | NSHourCalendarUnit | NSMinuteCalendarUnit | NSSecondCalendarUnit; 26 | NSDateComponents *components = [calendar components:units fromDate:from toDate:to options:0]; 27 | 28 | NSString *dayUnitString = (components.day > 1) ? @"days" : @"day"; 29 | NSString *daysString = (components.day > 0) ? [NSString stringWithFormat:@"%li %@ ", (long)components.day, dayUnitString] : @""; 30 | 31 | NSString *hourLeadingZero = (components.hour < 10) ? @"0" : @""; 32 | NSString *minuteLeadingZero = (components.minute < 10) ? @"0" : @""; 33 | NSString *secondLeadingZero = (components.second < 10) ? @"0" : @""; 34 | 35 | NSString *displayString = [NSString stringWithFormat:@"%@%@%li:%@%li:%@%li", 36 | daysString, 37 | hourLeadingZero, (long)components.hour, 38 | minuteLeadingZero, (long)components.minute, 39 | secondLeadingZero, (long)components.second]; 40 | 41 | return displayString; 42 | } 43 | 44 | -(NSString*)diplayStringOfIntervalSinceDate:(NSDate*) date 45 | { return [NSDate displayStringOfIntervalFromDate:self toDate:date]; } 46 | 47 | +(void)testDisplayStringOfInterval 48 | { 49 | NSArray *intervals = @[ 50 | @(5), 51 | @(15), 52 | @(150), 53 | @(1500), 54 | @(15000), 55 | @(150000), 56 | @(1500000) 57 | ]; 58 | 59 | for (NSNumber *eachIntervalNumber in intervals) 60 | { 61 | NSTimeInterval eachInterval = (NSTimeInterval)eachIntervalNumber.floatValue; 62 | NSLog(@"Display string of <%.2f> is '%@'", eachInterval, [NSDate diplayStringOfInterval:eachInterval]); 63 | 64 | } 65 | } 66 | 67 | 68 | @end 69 | -------------------------------------------------------------------------------- /eppz!kit/NSDecimalNumber+LocalizedPrice.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSDecimalNumber+LocalizedPrice.h 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 7/27/13. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import 16 | 17 | 18 | @interface NSDecimalNumber (LocalizedPrice) 19 | -(NSString*)stringWithPriceLocale:(NSLocale*) priceLocale; 20 | @end 21 | -------------------------------------------------------------------------------- /eppz!kit/NSDecimalNumber+LocalizedPrice.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSDecimalNumber+LocalizedPrice.m 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 7/27/13. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import "NSDecimalNumber+LocalizedPrice.h" 16 | 17 | 18 | @implementation NSDecimalNumber (LocalizedPrice) 19 | 20 | -(NSString*)stringWithPriceLocale:(NSLocale*) priceLocale 21 | { 22 | NSNumberFormatter *numberFormatter = [NSNumberFormatter new]; 23 | [numberFormatter setFormatterBehavior:NSNumberFormatterBehavior10_4]; 24 | [numberFormatter setNumberStyle:NSNumberFormatterCurrencyStyle]; 25 | [numberFormatter setLocale:priceLocale]; 26 | return [numberFormatter stringFromNumber:self]; 27 | } 28 | 29 | @end 30 | 31 | -------------------------------------------------------------------------------- /eppz!kit/NSDictionary+EPPZKit.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSDictionary+EPPZKit.h 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 20/01/14. 6 | // Copyright (c) 2014 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import 16 | 17 | 18 | @interface NSDictionary (EPPZKit) 19 | 20 | -(NSDictionary*)dictionaryBySwappingKeysAndValues; 21 | -(NSDictionary*)dictionaryByRemovingValueForKey:(id) key; 22 | 23 | -(id)valueForKeyOrNil:(NSString*) keyPath; 24 | -(id)valueForKeyPathOrNil:(NSString*) keyPath; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /eppz!kit/NSDictionary+EPPZKit.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSDictionary+EPPZKit.m 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 20/01/14. 6 | // Copyright (c) 2014 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import "NSDictionary+EPPZKit.h" 16 | 17 | 18 | @implementation NSDictionary (EPPZKit) 19 | 20 | 21 | -(NSDictionary*)dictionaryBySwappingKeysAndValues 22 | { 23 | NSMutableDictionary *mutable = [NSMutableDictionary new]; 24 | [self enumerateKeysAndObjectsUsingBlock:^(id eachKey, id eachValue, BOOL *stop) 25 | { 26 | // Check if value is suitable to be a key. 27 | if ([eachValue conformsToProtocol:@protocol(NSCopying)]) 28 | { 29 | // Set. 30 | id eachObject = (id)eachValue; 31 | [mutable setObject:eachKey forKey:eachObject]; 32 | } 33 | }]; 34 | 35 | // Return immutable. 36 | return [NSDictionary dictionaryWithDictionary:mutable]; 37 | } 38 | 39 | -(NSDictionary*)dictionaryByRemovingValueForKey:(id) key 40 | { 41 | // Checks. 42 | if (key == nil) return self; 43 | if ([[self allKeys] containsObject:key] == NO) return self; 44 | 45 | NSMutableDictionary *mutable = [NSMutableDictionary dictionaryWithDictionary:self]; 46 | [mutable removeObjectForKey:key]; 47 | return [NSDictionary dictionaryWithDictionary:mutable]; 48 | } 49 | 50 | -(id)valueForKeyOrNil:(NSString*) key 51 | { 52 | // Checks. 53 | if (self.count == 0) return nil; 54 | if ([self.allKeys containsObject:key] == NO) return nil; 55 | 56 | return [self objectForKey:key]; 57 | } 58 | 59 | -(id)valueForKeyPathOrNil:(NSString*) keyPath 60 | { 61 | // Checks. 62 | if (self.count == 0) return nil; 63 | 64 | // Try to get. 65 | id value = nil; 66 | @try { value = [self valueForKeyPath:keyPath]; } 67 | @catch (NSException *exception) { } 68 | @finally { } 69 | 70 | return value; 71 | } 72 | 73 | 74 | @end 75 | -------------------------------------------------------------------------------- /eppz!kit/NSObject+EPPZConfigurable.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+EPPZConfigurable.h 3 | // tangle! 4 | // 5 | // Created by Gardrobe on 2/16/14. 6 | // Copyright (c) 2014 eppz! development, LLC. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "EPPZConfiguration.h" 11 | 12 | 13 | @class EPPZConfiguration; 14 | @protocol EPPZConfigurable 15 | 16 | +(instancetype)instanceForConfiguration:(EPPZConfiguration*) configuration; 17 | 18 | @end 19 | 20 | 21 | @interface NSObject (EPPZConfigurable) 22 | 23 | @property (nonatomic, strong) EPPZConfiguration *configuration; 24 | 25 | +(instancetype)instanceWithConfigurationNamed:(NSString*) configurationPlistName; 26 | +(instancetype)instanceWithConfiguration:(EPPZConfiguration*) configuration; 27 | 28 | -(void)configureWithConfigurationNamed:(NSString*) configurationPlistName; 29 | -(void)configure:(EPPZConfiguration*) configuration; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /eppz!kit/NSObject+EPPZConfigurable.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+EPPZConfigurable.m 3 | // tangle! 4 | // 5 | // Created by Gardrobe on 2/16/14. 6 | // Copyright (c) 2014 eppz! development, LLC. All rights reserved. 7 | // 8 | 9 | #import "NSObject+EPPZConfigurable.h" 10 | 11 | 12 | @implementation NSObject (EPPZConfigurable) 13 | 14 | 15 | #pragma mark - Synthesize `configuration` 16 | 17 | -(EPPZConfiguration*)configuration 18 | { return objc_getAssociatedObject(self, @"configuration"); } 19 | 20 | -(void)setConfiguration:(EPPZConfiguration*) configuration 21 | { objc_setAssociatedObject(self, @"configuration", configuration, OBJC_ASSOCIATION_RETAIN_NONATOMIC); } 22 | 23 | 24 | #pragma mark - Creation 25 | 26 | +(instancetype)instanceWithConfigurationNamed:(NSString*) configurationPlistName 27 | { return [self instanceWithConfiguration:[EPPZConfiguration loadFromPlistNamed:configurationPlistName]]; } 28 | 29 | +(instancetype)instanceWithConfiguration:(EPPZConfiguration*) configuration 30 | { 31 | id instance = [self instanceForConfiguration:configuration]; 32 | [instance configure:configuration]; 33 | return instance; 34 | } 35 | 36 | -(void)configureWithConfigurationNamed:(NSString*) configurationPlistName 37 | { [self configure:[EPPZConfiguration loadFromPlistNamed:configurationPlistName]]; } 38 | 39 | 40 | #pragma mark - Template 41 | 42 | +(instancetype)instanceForConfiguration:(EPPZConfiguration*) configuration 43 | { return [self new]; } 44 | 45 | 46 | #pragma mark - Configure 47 | 48 | -(void)configure:(EPPZConfiguration*) configuration 49 | { 50 | [configuration.representedPropertyNames enumerateObjectsUsingBlock:^(NSString *eachPropertyName, NSUInteger index, BOOL *stop) 51 | { 52 | id configurationValue = [configuration valueForKey:eachPropertyName]; 53 | if (configurationValue != nil) 54 | { 55 | // Configure contained objects way down the object graph. 56 | if ([configurationValue isKindOfClass:[EPPZConfiguration class]]) 57 | { 58 | if ([self respondsToSelector:NSSelectorFromString(eachPropertyName)]) 59 | { [[self valueForKey:eachPropertyName] configure:configurationValue]; } 60 | } 61 | 62 | // Or try to set configuration value directly if there is a value. 63 | @try { [self setValue:configurationValue forKey:eachPropertyName]; } 64 | @catch (NSException *exception) 65 | { NSLog(@"Could not set `%@` for `%@` on `%@`", configurationValue, eachPropertyName, self); } 66 | @finally { } 67 | } 68 | }]; 69 | 70 | self.configuration = configuration; 71 | } 72 | 73 | 74 | 75 | @end 76 | -------------------------------------------------------------------------------- /eppz!kit/NSObject+EPPZRepresentable_Archive.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+EPPZRepresentable_Archive.h 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 8/28/13. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import 16 | #import "EPPZFileManager.h" 17 | 18 | 19 | @interface NSObject (EPPZRepresentable_Archive) 20 | 21 | -(BOOL)storeAsArchiveNamed:(NSString*) archiveFileName; //To Documents. 22 | -(BOOL)storeAsArchiveAtPath:(NSString*) archiveFilePath; 23 | 24 | +(id)loadFromArchiveNamed:(NSString*) archiveFileName; //From Bundle (or from Documents if not found in Bundle). 25 | +(id)loadFromArchiveAtPath:(NSString*) archiveFilePath; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /eppz!kit/NSObject+EPPZRepresentable_Archive.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+EPPZRepresentable_Archive.m 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 8/28/13. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import "NSObject+EPPZRepresentable.h" 16 | #import "NSObject+EPPZRepresentable_Archive.h" 17 | 18 | 19 | @implementation NSObject (EPPZRepresentable_Archive) 20 | 21 | 22 | #pragma mark - Store 23 | 24 | -(BOOL)storeAsArchiveNamed:(NSString*) archiveFileName 25 | { return NO; } 26 | 27 | -(BOOL)storeAsArchiveAtPath:(NSString*) archiveFilePath 28 | { return NO; } 29 | 30 | 31 | #pragma mark - Load 32 | 33 | +(id)loadFromArchiveNamed:(NSString*) archiveFileName 34 | { return nil; } 35 | 36 | +(id)loadFromArchiveAtPath:(NSString*) archiveFilePath 37 | { return nil; } 38 | 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /eppz!kit/NSObject+EPPZRepresentable_Plist.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+EPPZRepresentable_Plist.h 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 8/22/13. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import 16 | #import "EPPZFileManager.h" 17 | 18 | 19 | @interface NSObject (EPPZRepresentable_Plist) 20 | 21 | -(BOOL)storeAsPlistNamed:(NSString*) plistFileName; //To Documents. 22 | -(BOOL)storeAsPlistAtPath:(NSString*) plistFilePath; 23 | 24 | +(id)loadFromPlistNamed:(NSString*) plistFileName; //From Bundle (or from Documents if not found in Bundle). 25 | +(id)loadFromPlistAtPath:(NSString*) plistFilePath; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /eppz!kit/NSString+EPPZKit.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+EPPZKit.h 3 | // EPPZKit 4 | // 5 | // Created by Borbás Geri on 1/19/12. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import 16 | #import 17 | #import 18 | #import 19 | #import 20 | 21 | 22 | //Extend NSString with some smart functions. 23 | @interface NSString (EPPZKit) 24 | 25 | 26 | -(BOOL)isEqualToStringIgnoringCase:(NSString*) string; 27 | -(NSString*)firstFiveCharacter; 28 | -(NSString*)firstTenCharacter; 29 | 30 | 31 | #pragma mark - MD5 32 | 33 | -(NSString*)md5; // lowercase result 34 | +(NSString*)md5HashFromString:(NSString*) source; // UPPERCASE result 35 | +(NSString*)uniqueIDFromString:(NSString*) source; //Alias for the above 36 | 37 | 38 | #pragma mark - URL encoding 39 | 40 | -(NSString*)urlEncode; 41 | -(NSString*)urlDecode; 42 | 43 | 44 | #pragma mark - Date detector 45 | 46 | -(NSDate*)dateValue; 47 | 48 | 49 | #pragma mark - (NSStringDrawing) compatibility 50 | 51 | -(CGSize)_sizeWithFont:(UIFont*) font; 52 | 53 | 54 | #pragma mark - (UIStringDrawing) compatibility 55 | 56 | -(void)_drawAtPoint:(CGPoint) point withFont:(UIFont*) font foregroundColor:(UIColor*) color; 57 | -(void)_drawInRect:(CGRect) frame withFont:(UIFont*) font foregroundColor:(UIColor*) color; 58 | 59 | 60 | @end -------------------------------------------------------------------------------- /eppz!kit/NSString+EPPZReachability.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+EPPZReachability.h 3 | // eppz!reachability 4 | // 5 | // Created by Borbás Geri on 6/16/13. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import 16 | 17 | 18 | @interface NSString (EPPZReachability) 19 | 20 | 21 | -(BOOL)isIPaddress; 22 | +(BOOL)isIPaddress:(NSString*) string; 23 | +(void)testIsIPaddress; 24 | 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /eppz!kit/SKProduct+LocalizedPrice.h: -------------------------------------------------------------------------------- 1 | // 2 | // SKProduct+LocalizedPrice.h 3 | // tangram! 4 | // 5 | // Created by Borbás Geri on 10/11/11. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import 16 | 17 | 18 | @interface SKProduct (LocalizedPrice) 19 | @property (nonatomic, readonly) NSString *localizedPrice; 20 | @end 21 | 22 | 23 | -------------------------------------------------------------------------------- /eppz!kit/SKProduct+LocalizedPrice.m: -------------------------------------------------------------------------------- 1 | // 2 | // SKProduct+LocalizedPrice.m 3 | // tangram! 4 | // 5 | // Created by Borbás Geri on 10/11/11. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import "SKProduct+LocalizedPrice.h" 16 | 17 | 18 | @implementation SKProduct (LocalizedPrice) 19 | 20 | -(NSString*)localizedPrice 21 | { 22 | NSNumberFormatter *numberFormatter = [NSNumberFormatter new]; 23 | [numberFormatter setFormatterBehavior:NSNumberFormatterBehavior10_4]; 24 | [numberFormatter setNumberStyle:NSNumberFormatterCurrencyStyle]; 25 | [numberFormatter setLocale:self.priceLocale]; 26 | return [numberFormatter stringFromNumber:self.price]; 27 | } 28 | 29 | @end 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /eppz!kit/UICircle.h: -------------------------------------------------------------------------------- 1 | // 2 | // UICircle.h 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 11/24/13. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import 16 | #import 17 | 18 | 19 | @interface UICircle : UIView 20 | @property (nonatomic) CGFloat radius; 21 | @end 22 | -------------------------------------------------------------------------------- /eppz!kit/UICircle.m: -------------------------------------------------------------------------------- 1 | // 2 | // UICircle.m 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 11/24/13. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import "UICircle.h" 16 | 17 | 18 | @interface EPPZCircleLayer : CALayer 19 | @property (nonatomic, strong) UIColor *color; 20 | @end 21 | 22 | 23 | @implementation EPPZCircleLayer 24 | 25 | -(void)drawInContext:(CGContextRef) context 26 | { 27 | CGContextSetFillColorWithColor(context, self.color.CGColor); 28 | CGContextFillEllipseInRect(context, self.bounds); 29 | } 30 | 31 | @end 32 | 33 | 34 | @implementation UICircle 35 | 36 | 37 | #pragma mark - Creation 38 | 39 | -(void)awakeFromNib 40 | { 41 | [super awakeFromNib]; 42 | [self setup]; 43 | } 44 | 45 | -(instancetype)initWithFrame:(CGRect) frame 46 | { 47 | if (self = [super initWithFrame:frame]) 48 | { 49 | [self setup]; 50 | } 51 | return self; 52 | } 53 | 54 | -(void)setup 55 | { 56 | // Setup circle layer. 57 | EPPZCircleLayer *layer = [EPPZCircleLayer layer]; 58 | layer.contentsScale = [[UIScreen mainScreen] scale]; 59 | layer.frame = self.bounds; 60 | layer.color = self.backgroundColor; 61 | [layer setNeedsDisplay]; 62 | 63 | // Add. 64 | [self.layer addSublayer:layer]; 65 | 66 | // Hide background. 67 | self.backgroundColor = [UIColor clearColor]; 68 | } 69 | 70 | 71 | #pragma mark - Layout 72 | 73 | -(void)setRadius:(CGFloat) radius 74 | { 75 | _radius = radius; 76 | 77 | // Layout. 78 | self.frame = (CGRect){ 79 | self.center.x - radius, 80 | self.center.y - radius, 81 | radius * 2.0, 82 | radius * 2.0 83 | }; 84 | 85 | // Render. 86 | [self setNeedsDisplay]; 87 | } 88 | 89 | 90 | @end 91 | -------------------------------------------------------------------------------- /eppz!kit/UIColor+EPPZKit.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIColor+EPPZKit.h 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 11/25/13. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import 16 | #import 17 | 18 | 19 | #define RGB(r, g, b) [UIColor colorWithRed:(float)r / 255.0 green:(float)g / 255.0 blue:(float)b / 255.0 alpha:1.0] 20 | #define RGBA(r, g, b, a) [UIColor colorWithRed:(float)r / 255.0 green:(float)g / 255.0 blue:(float)b / 255.0 alpha:a] 21 | 22 | #define RGB_(r, g, b) [UIColor colorWithRed:r green:g blue:b alpha:1.0] 23 | #define RGBA_(r, g, b, a) [UIColor colorWithRed:r green:g blue:b alpha:a] 24 | 25 | 26 | @interface UIColor (EPPZKit) 27 | 28 | @property (nonatomic, readonly) CGFloat red; 29 | @property (nonatomic, readonly) CGFloat green; 30 | @property (nonatomic, readonly) CGFloat blue; 31 | @property (nonatomic, readonly) CGFloat alpha; 32 | 33 | -(UIColor*)colorWithAlpha:(CGFloat) alpha; 34 | -(UIColor*)blendWithColor:(UIColor*) color amount:(CGFloat) amount; 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /eppz!kit/UIColor+EPPZKit.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIColor+EPPZKit.m 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 11/25/13. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import "UIColor+EPPZKit.h" 16 | 17 | 18 | typedef enum { R, G, B, A } UIColorComponentIndices; 19 | 20 | 21 | @implementation UIColor (EPPZKit) 22 | 23 | 24 | -(CGFloat)red 25 | { return CGColorGetComponents(self.CGColor)[R]; } 26 | 27 | -(CGFloat)green 28 | { return CGColorGetComponents(self.CGColor)[G]; } 29 | 30 | -(CGFloat)blue 31 | { return CGColorGetComponents(self.CGColor)[B]; } 32 | 33 | -(CGFloat)alpha 34 | { return CGColorGetComponents(self.CGColor)[A]; } 35 | 36 | -(UIColor*)colorWithAlpha:(CGFloat) alpha 37 | { 38 | const CGFloat *components = CGColorGetComponents(self.CGColor); 39 | CGFloat _R, _G, _B, _A; 40 | _R = components[R]; 41 | _G = components[G]; 42 | _B = components[B]; 43 | _A = components[A]; 44 | 45 | return RGBA_(_R, _G, _B, alpha); 46 | } 47 | 48 | -(UIColor*)blendWithColor:(UIColor*) color amount:(CGFloat) amount 49 | { 50 | const CGFloat *components = CGColorGetComponents(self.CGColor); 51 | CGFloat _R, _G, _B, _A; 52 | _R = components[R]; 53 | _G = components[G]; 54 | _B = components[B]; 55 | _A = components[A]; 56 | 57 | const CGFloat *otherComponents = CGColorGetComponents(color.CGColor); 58 | CGFloat _r, _g, _b, _a; 59 | _r = otherComponents[R]; 60 | _g = otherComponents[G]; 61 | _b = otherComponents[B]; 62 | _a = otherComponents[A]; 63 | 64 | CGFloat i = (fabsf((float)amount) > 1.0) ? 1.0 : fabsf((float)amount); // Clamp to 0.0 - 1.0 65 | CGFloat j = 1.0 - amount; 66 | 67 | return RGBA_(_R * j + _r * i, 68 | _G * j + _g * i, 69 | _B * j + _b * i, 70 | _A * j + _a * i); 71 | } 72 | 73 | 74 | @end 75 | -------------------------------------------------------------------------------- /eppz!kit/UIColor+EPPZRepresenter.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIColor+EPPZRepresenter.h 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 8/28/13. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import 16 | 17 | @interface UIColor (EPPZRepresenter) 18 | 19 | /*! 20 | 21 | Return with the string representation of the given color. 22 | 23 | @discussion 24 | [UIColor whiteColor] converts to @"[1.000000, 1.000000, 1.000000, 1.000000]". 25 | 26 | */ 27 | NSString *NSStringFromUIColor(UIColor *color); 28 | 29 | /*! 30 | 31 | Returns a UIColor instance configured with the given string representation. 32 | 33 | @discussion 34 | If the string is given in a components format, function returns [UIColor whiteColor] for "[1, 1, 1, 1]". 35 | Alternatively you can reconstruct colors from class factory method names. 36 | Function returns [UIColor whiteColor] for both "whiteColor" and "white". 37 | 38 | */ 39 | UIColor *UIColorFromNSString(NSString *string); 40 | 41 | @end 42 | -------------------------------------------------------------------------------- /eppz!kit/UIFont+EPPZKit.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIFont+EPPZKit.h 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 11/26/13. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import 16 | 17 | 18 | @interface UIFont (EPPZKit) 19 | 20 | +(void)logFontList; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /eppz!kit/UIFont+EPPZKit.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIFont+EPPZKit.m 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 11/26/13. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import "UIFont+EPPZKit.h" 16 | 17 | 18 | @implementation UIFont (EPPZKit) 19 | 20 | 21 | +(void)logFontList 22 | { 23 | for (NSString *eachFamiliyName in [UIFont familyNames]) 24 | { 25 | NSLog(@"Family: %@", eachFamiliyName); 26 | for (NSString *eachFontName in [UIFont fontNamesForFamilyName:eachFamiliyName]) 27 | { NSLog(@" Font: %@", eachFontName); } 28 | } 29 | } 30 | 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /eppz!kit/UIImage+EPPZKit.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIImage+EPPZKit.h 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 11/23/13. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import 16 | #import "EPPZFileManager.h" 17 | 18 | 19 | typedef enum 20 | { 21 | UIImageFileFormatJPG, //0 22 | UIImageFileFormatPNG //1 23 | } UIImageFileFormat; 24 | 25 | 26 | 27 | @interface UIImage (EPPZKit) 28 | 29 | -(void)saveToDocuments; 30 | -(void)saveToDocumentsWithFileName:(NSString*) fileName; 31 | -(void)saveToDocumentsWithFileName:(NSString*) fileName format:(UIImageFileFormat) format; 32 | 33 | -(void)saveToCache; 34 | -(void)saveToCacheWithFileName:(NSString*) fileName; 35 | -(void)saveToCacheWithFileName:(NSString*) fileName format:(UIImageFileFormat) format; 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /eppz!kit/UIImage+EPPZKit.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIImage+EPPZKit.m 3 | // eppz!kit 4 | // 5 | // Created by Borbás Geri on 11/23/13. 6 | // Copyright (c) 2013 eppz! development, LLC. 7 | // 8 | // donate! by following http://www.twitter.com/_eppz 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 | // 14 | 15 | #import "UIImage+EPPZKit.h" 16 | 17 | @implementation UIImage (EPPZKit) 18 | 19 | 20 | -(void)saveToDocuments 21 | { 22 | NSString *fileName = [NSString stringWithFormat:@"%@", @(self.hash)]; 23 | [self saveToDocumentsWithFileName:fileName]; 24 | } 25 | 26 | -(void)saveToDocumentsWithFileName:(NSString*) fileName 27 | { [self saveToDocumentsWithFileName:fileName format:UIImageFileFormatJPG]; } 28 | 29 | -(void)saveToDocumentsWithFileName:(NSString*) fileName format:(UIImageFileFormat) format 30 | { 31 | // Either JPG or PNG data. 32 | NSData *data = (format == UIImageFileFormatJPG) ? UIImageJPEGRepresentation(self, 1.0) : UIImagePNGRepresentation(self); 33 | NSString *extension = (format == UIImageFileFormatJPG) ? @"jpg" : @"png"; 34 | NSString *path = [FILES pathForNewFileNameInDocumentsDirectory:[fileName stringByAppendingPathExtension:extension]]; 35 | [data writeToFile:path atomically:YES]; 36 | } 37 | 38 | -(void)saveToCache 39 | { 40 | NSString *fileName = [NSString stringWithFormat:@"%@", @(self.hash)]; 41 | [self saveToCacheWithFileName:fileName]; 42 | } 43 | 44 | -(void)saveToCacheWithFileName:(NSString*) fileName 45 | { [self saveToCacheWithFileName:fileName format:UIImageFileFormatJPG]; } 46 | 47 | -(void)saveToCacheWithFileName:(NSString*) fileName format:(UIImageFileFormat) format 48 | { 49 | // Either JPG or PNG data. 50 | NSData *data = (format == UIImageFileFormatJPG) ? UIImageJPEGRepresentation(self, 1.0) : UIImagePNGRepresentation(self); 51 | NSString *extension = (format == UIImageFileFormatJPG) ? @"jpg" : @"png"; 52 | NSString *path = [FILES pathForNewFileNameInCacheDirectory:[fileName stringByAppendingPathExtension:extension]]; 53 | [data writeToFile:path atomically:YES]; 54 | } 55 | 56 | 57 | @end 58 | -------------------------------------------------------------------------------- /eppz!kit/iOS device model identifiers.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Geri-Borbas/iOS.Library.eppz_kit/80874ca7cc34811e0489f188d4fc4e07c0430854/eppz!kit/iOS device model identifiers.xlsx -------------------------------------------------------------------------------- /eppz!kit/libGoogleAnalytics.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Geri-Borbas/iOS.Library.eppz_kit/80874ca7cc34811e0489f188d4fc4e07c0430854/eppz!kit/libGoogleAnalytics.a -------------------------------------------------------------------------------- /lib!eppz!kit.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Geri-Borbas/iOS.Library.eppz_kit/80874ca7cc34811e0489f188d4fc4e07c0430854/lib!eppz!kit.a --------------------------------------------------------------------------------