Permalink
Browse files

Added README + My CocoaHeads example for "a Static Library with a Res…

…ource bundle"
  • Loading branch information...
1 parent a7b54e0 commit 9c0f225efaf1528416517673ba18873e105e8024 @AliSoftware committed Jan 16, 2013
Showing with 2,725 additions and 6 deletions.
  1. +15 −0 LibraryWithRsrc/Demo/Demo2App/AppDelegate/CHAppDelegate.h
  2. +24 −0 LibraryWithRsrc/Demo/Demo2App/AppDelegate/CHAppDelegate.m
  3. +13 −0 LibraryWithRsrc/Demo/Demo2App/CHViewController/CHViewController.h
  4. +39 −0 LibraryWithRsrc/Demo/Demo2App/CHViewController/CHViewController.m
  5. +523 −0 LibraryWithRsrc/Demo/Demo2App/CHViewController/CHViewController.xib
  6. +350 −0 LibraryWithRsrc/Demo/Demo2App/Demo2App.xcodeproj/project.pbxproj
  7. +86 −0 ...mo/Demo2App/Demo2App.xcodeproj/xcuserdata/OlivierHalligon.xcuserdatad/xcschemes/Demo2App.xcscheme
  8. +22 −0 ...2App/Demo2App.xcodeproj/xcuserdata/OlivierHalligon.xcuserdatad/xcschemes/xcschememanagement.plist
  9. +87 −0 ...hRsrc/Demo/Demo2App/Demo2App.xcodeproj/xcuserdata/olivier.xcuserdatad/xcschemes/Demo2App.xcscheme
  10. +22 −0 ...emo/Demo2App/Demo2App.xcodeproj/xcuserdata/olivier.xcuserdatad/xcschemes/xcschememanagement.plist
  11. +9 −0 LibraryWithRsrc/Demo/Demo2App/Resources/en.lproj/Localizable.strings
  12. +9 −0 LibraryWithRsrc/Demo/Demo2App/Resources/fr.lproj/Localizable.strings
  13. BIN LibraryWithRsrc/Demo/Demo2App/Supporting Files/Default-568h@2x.png
  14. BIN LibraryWithRsrc/Demo/Demo2App/Supporting Files/Default.png
  15. BIN LibraryWithRsrc/Demo/Demo2App/Supporting Files/Default@2x.png
  16. +49 −0 LibraryWithRsrc/Demo/Demo2App/Supporting Files/Demo2App-Info.plist
  17. +14 −0 LibraryWithRsrc/Demo/Demo2App/Supporting Files/Demo2App-Prefix.pch
  18. BIN LibraryWithRsrc/Demo/Demo2App/Supporting Files/Icon.png
  19. BIN LibraryWithRsrc/Demo/Demo2App/Supporting Files/Icon@2x.png
  20. +18 −0 LibraryWithRsrc/Demo/Demo2App/Supporting Files/main.m
  21. +13 −0 LibraryWithRsrc/Demo/Demo2Lib/Classes/CHLibViewController.h
  22. +32 −0 LibraryWithRsrc/Demo/Demo2Lib/Classes/CHLibViewController.m
  23. +19 −0 LibraryWithRsrc/Demo/Demo2Lib/Classes/Demo2Lib.h
  24. +41 −0 LibraryWithRsrc/Demo/Demo2Lib/Classes/Demo2Lib.m
  25. +15 −0 LibraryWithRsrc/Demo/Demo2Lib/Classes/UIImage+Bundle.h
  26. +71 −0 LibraryWithRsrc/Demo/Demo2Lib/Classes/UIImage+Bundle.m
  27. +397 −0 LibraryWithRsrc/Demo/Demo2Lib/Demo2Lib.xcodeproj/project.pbxproj
  28. +59 −0 ...mo/Demo2Lib/Demo2Lib.xcodeproj/xcuserdata/OlivierHalligon.xcuserdatad/xcschemes/Demo2Lib.xcscheme
  29. +59 −0 ...o/Demo2Lib/Demo2Lib.xcodeproj/xcuserdata/OlivierHalligon.xcuserdatad/xcschemes/Demo2Rsrc.xcscheme
  30. +32 −0 ...2Lib/Demo2Lib.xcodeproj/xcuserdata/OlivierHalligon.xcuserdatad/xcschemes/xcschememanagement.plist
  31. +59 −0 ...hRsrc/Demo/Demo2Lib/Demo2Lib.xcodeproj/xcuserdata/olivier.xcuserdatad/xcschemes/Demo2Lib.xcscheme
  32. +59 −0 ...Rsrc/Demo/Demo2Lib/Demo2Lib.xcodeproj/xcuserdata/olivier.xcuserdatad/xcschemes/Demo2Rsrc.xcscheme
  33. +32 −0 ...emo/Demo2Lib/Demo2Lib.xcodeproj/xcuserdata/olivier.xcuserdatad/xcschemes/xcschememanagement.plist
  34. +425 −0 LibraryWithRsrc/Demo/Demo2Lib/Resources/CHLibViewController.xib
  35. BIN LibraryWithRsrc/Demo/Demo2Lib/Resources/CocoaHeads.png
  36. BIN LibraryWithRsrc/Demo/Demo2Lib/Resources/CocoaHeads@2x.png
  37. +9 −0 LibraryWithRsrc/Demo/Demo2Lib/Resources/en.lproj/Localizable.strings
  38. +9 −0 LibraryWithRsrc/Demo/Demo2Lib/Resources/fr.lproj/Localizable.strings
  39. +7 −0 LibraryWithRsrc/Demo/Demo2Lib/Supporting Files/Demo2Lib-Prefix.pch
  40. +26 −0 LibraryWithRsrc/Demo/Demo2Lib/Supporting Files/Demo2Rsrc-Info.plist
  41. +10 −0 LibraryWithRsrc/Demo/DemoRsrc.xcworkspace/contents.xcworkspacedata
  42. BIN ...c/Demo/DemoRsrc.xcworkspace/xcuserdata/OlivierHalligon.xcuserdatad/UserInterfaceState.xcuserstate
  43. BIN ...yWithRsrc/Demo/DemoRsrc.xcworkspace/xcuserdata/olivier.xcuserdatad/UserInterfaceState.xcuserstate
  44. +10 −0 ...aryWithRsrc/Demo/DemoRsrc.xcworkspace/xcuserdata/olivier.xcuserdatad/WorkspaceSettings.xcsettings
  45. +5 −0 ...thRsrc/Demo/DemoRsrc.xcworkspace/xcuserdata/olivier.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist
  46. +1 −0 LibraryWithRsrc/UIImage+Bundle.h
  47. +1 −0 LibraryWithRsrc/UIImage+Bundle.m
  48. +54 −6 README.md
@@ -0,0 +1,15 @@
+//
+// CHAppDelegate.h
+// Demo2App
+//
+// Created by Olivier Halligon on 13/01/13.
+// Copyright (c) 2013 AliSoftware. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface CHAppDelegate : UIResponder <UIApplicationDelegate>
+
+@property (strong, nonatomic) UIWindow *window;
+
+@end
@@ -0,0 +1,24 @@
+//
+// CHAppDelegate.m
+// Demo2App
+//
+// Created by Olivier Halligon on 13/01/13.
+// Copyright (c) 2013 AliSoftware. All rights reserved.
+//
+
+#import "CHAppDelegate.h"
+#import "CHViewController.h"
+
+@implementation CHAppDelegate
+
+- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
+{
+ self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
+ // Override point for customization after application launch.
+ self.window.backgroundColor = [UIColor whiteColor];
+ self.window.rootViewController = [[CHViewController alloc] init];
+ [self.window makeKeyAndVisible];
+ return YES;
+}
+
+@end
@@ -0,0 +1,13 @@
+//
+// CHViewController.h
+// Demo2App
+//
+// Created by Olivier Halligon on 13/01/13.
+// Copyright (c) 2013 AliSoftware. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface CHViewController : UIViewController
+
+@end
@@ -0,0 +1,39 @@
+//
+// CHViewController.m
+// Demo2App
+//
+// Created by Olivier Halligon on 13/01/13.
+// Copyright (c) 2013 AliSoftware. All rights reserved.
+//
+
+#import "CHViewController.h"
+#import "Demo2Lib.h"
+#import "CHLibViewController.h"
+
+@interface CHViewController ()
+@property (weak, nonatomic) IBOutlet UIImageView *imageView;
+@property (weak, nonatomic) IBOutlet UILabel *label;
+@end
+
+
+
+
+@implementation CHViewController
+
+- (void)viewDidLoad
+{
+ [super viewDidLoad];
+ // Do any additional setup after loading the view from its nib.
+
+ self.label.text = NSLocalizedStringFromTableInBundle(@"greetings", nil, [Demo2Lib resourceBundle], @"");
+ //self.label.text = [Demo2Lib greetings]; // Localized text from library
+ self.imageView.image = [Demo2Lib cocoaHeadsImage]; // Image from library
+}
+
+- (IBAction)showModalVC:(id)sender
+{
+ UIViewController* libVC = [[CHLibViewController alloc] init]; // View Controller with XIB from library, itself using image from lib
+ [self presentViewController:libVC animated:YES completion:nil];
+}
+
+@end
Oops, something went wrong.

0 comments on commit 9c0f225

Please sign in to comment.