CocoaPods trunk is moving to be read-only. Read more on the blog, there are 17 months to go.
TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Dec 2014 |
Maintained by Martin Hartl.
Simple app styling via Plist inspired by DB5 - Q Branch
Store colors, numbers, booleans, CGRects, CGPoints and CGSizes, timeintervals and strings into a Plist which can be used within the app. This enables to change the look and feel of an App with just one file.
Just have a look into the example project.
Call "configWithPlistName" inside your didFinishLaunchingWithOptions-method contained in the AppDelegate with the name of the Plist as argument.
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[MHFancyPants configWithPlistName:@"<NameOfPlistFile>"];
return YES;
}
+ (BOOL)boolForKey:(NSString *)key;
+ (NSString *)stringForKey:(NSString *)key;
+ (NSInteger)integerForKey:(NSString *)key;
+ (CGFloat)floatForKey:(NSString *)key;
+ (NSTimeInterval)timeIntervalForKey:(NSString *)key;
+ (UIColor *)colorForKey:(NSString *)key;
+ (CGPoint)pointForKey:(NSString *)key;
+ (CGSize)sizeForKey:(NSString *)key;
+ (CGRect)rectForKey:(NSString *)key;
+ (UIEdgeInsets)edgeInsetsForKey:(NSString *)key;
Within a Plist file define:
Copyright (c) 2013 Martin Hartl
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:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
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.