From 14db617096eba61249abb3d584060777dba1b1f1 Mon Sep 17 00:00:00 2001 From: Tom WIlson Date: Sat, 29 Jun 2013 18:49:44 +1000 Subject: [PATCH 1/2] Added Podspec --- DB5.podspec | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 DB5.podspec diff --git a/DB5.podspec b/DB5.podspec new file mode 100644 index 0000000..4b15c59 --- /dev/null +++ b/DB5.podspec @@ -0,0 +1,15 @@ +Pod::Spec.new do |s| + s.name = 'DB5' + s.version = '1.0' + s.license = 'MIT' + s.summary = 'App Configuration via Plist' + s.homepage = 'https://github.com/quartermaster/DB5/' + s.authors = { 'Brent Simmons' => '@brentsimmons' } + s.source = { :git => 'https://github.com/quartermaster/DB5.git', :tag => '1.0' } + s.source_files = 'Source/*.{h,m}' + s.requires_arc = true + + s.ios.deployment_target = '5.0' + s.ios.frameworks = 'CoreGraphics,UIKit,Foundation' + +end From fbc00940f1e94e9fe1b35bfbbf03998eddb6cacc Mon Sep 17 00:00:00 2001 From: Tom Wilson Date: Wed, 10 Jul 2013 11:28:04 +1000 Subject: [PATCH 2/2] add a method to access VSThemeLoader like a singleton --- Source/VSThemeLoader.h | 1 + Source/VSThemeLoader.m | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/Source/VSThemeLoader.h b/Source/VSThemeLoader.h index 4c2d2be..e8876d9 100644 --- a/Source/VSThemeLoader.h +++ b/Source/VSThemeLoader.h @@ -16,6 +16,7 @@ @property (nonatomic, strong, readonly) VSTheme *defaultTheme; @property (nonatomic, strong, readonly) NSArray *themes; ++ (VSThemeLoader *) instance; - (VSTheme *)themeNamed:(NSString *)themeName; @end diff --git a/Source/VSThemeLoader.m b/Source/VSThemeLoader.m index bbbe4c6..8d34767 100644 --- a/Source/VSThemeLoader.m +++ b/Source/VSThemeLoader.m @@ -19,6 +19,16 @@ @interface VSThemeLoader () @implementation VSThemeLoader ++ (VSThemeLoader *) instance +{ + static VSThemeLoader *_sharedInstance = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + _sharedInstance = [[self alloc] init]; + }); + + return _sharedInstance; +} - (id)init {