diff --git a/.gitignore b/.gitignore index c4dd027..99a3f88 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ # osx noise .DS_Store +._* # xcode noise build/* diff --git a/InfoBar/FirstViewController.h b/Code/Demo/FirstViewController.h similarity index 78% rename from InfoBar/FirstViewController.h rename to Code/Demo/FirstViewController.h index 59cdeeb..efbe90a 100644 --- a/InfoBar/FirstViewController.h +++ b/Code/Demo/FirstViewController.h @@ -9,9 +9,7 @@ #import -@interface FirstViewController : UIViewController { - -} +@interface FirstViewController : UIViewController - (IBAction)runAction; diff --git a/InfoBar/FirstViewController.m b/Code/Demo/FirstViewController.m similarity index 71% rename from InfoBar/FirstViewController.m rename to Code/Demo/FirstViewController.m index 915fd94..150ce60 100644 --- a/InfoBar/FirstViewController.m +++ b/Code/Demo/FirstViewController.m @@ -7,7 +7,8 @@ // #import "FirstViewController.h" -#import "JBInfoBarManager.h" +#import "InfoBarAppDelegate.h" +#import "UITabBarController+JBInfoBar.h" @implementation FirstViewController @@ -20,8 +21,9 @@ - (void)viewDidLoad */ - (IBAction)runAction { - [[JBInfoBarManager sharedManager] showInfoBarWithMessage:@"Action from View 1"]; - [NSTimer scheduledTimerWithTimeInterval:5.0 target:[JBInfoBarManager sharedManager] selector:@selector(hideInfoBar) userInfo:nil repeats:NO]; + InfoBarAppDelegate *appDelegate = (InfoBarAppDelegate*) [[UIApplication sharedApplication] delegate]; + [appDelegate.tabBarController showInfoBarWithMessage:@"Action from View 1"]; + [NSTimer scheduledTimerWithTimeInterval:5.0 target:appDelegate.tabBarController selector:@selector(hideInfoBar) userInfo:nil repeats:NO]; } - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation diff --git a/InfoBar/InfoBarAppDelegate.h b/Code/Demo/InfoBarAppDelegate.h similarity index 92% rename from InfoBar/InfoBarAppDelegate.h rename to Code/Demo/InfoBarAppDelegate.h index a92c17d..9a893ba 100644 --- a/InfoBar/InfoBarAppDelegate.h +++ b/Code/Demo/InfoBarAppDelegate.h @@ -7,13 +7,13 @@ // #import + #import "JBInfoBar.h" -@interface InfoBarAppDelegate : NSObject { -} -@property (nonatomic, retain) IBOutlet UIWindow *window; +@interface InfoBarAppDelegate : NSObject +@property (nonatomic, retain) IBOutlet UIWindow *window; @property (nonatomic, retain) IBOutlet UITabBarController *tabBarController; @end diff --git a/InfoBar/InfoBarAppDelegate.m b/Code/Demo/InfoBarAppDelegate.m similarity index 75% rename from InfoBar/InfoBarAppDelegate.m rename to Code/Demo/InfoBarAppDelegate.m index a3f2b71..f154f54 100644 --- a/InfoBar/InfoBarAppDelegate.m +++ b/Code/Demo/InfoBarAppDelegate.m @@ -7,7 +7,8 @@ // #import "InfoBarAppDelegate.h" -#import "JBInfoBarManager.h" +#import "UITabBarController+JBInfoBar.h" + @implementation InfoBarAppDelegate @@ -16,29 +17,20 @@ @implementation InfoBarAppDelegate @synthesize tabBarController=_tabBarController; -- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions -{ +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for customization after application launch. // Add the tab bar controller's current view as a subview of the window self.window.rootViewController = self.tabBarController; [self.window makeKeyAndVisible]; // Add the infoBar - [[JBInfoBarManager sharedManager] initInfoBarWithFrame:CGRectMake(0, self.tabBarController.tabBar.frame.origin.y, - self.tabBarController.tabBar.frame.size.width, 30) - backgroundColor:[UIColor colorWithRed:0.0f green:0.0f blue:0.0f alpha:0.6f] - textColor:[UIColor whiteColor] - textFont:[UIFont systemFontOfSize:17.0f]]; - - [self.tabBarController.view insertSubview:[[JBInfoBarManager sharedManager] infoBar] belowSubview:self.tabBarController.tabBar]; - [[JBInfoBarManager sharedManager] showInfoBarWithMessage:@"Test Up!"]; + [self.tabBarController showInfoBarWithMessage:@"Test Up!"]; return YES; } -- (void)hideInfoBar -{ - [[JBInfoBarManager sharedManager] hideInfoBarWithMessage:@"Finished!"]; +- (void)hideInfoBar { + [self.tabBarController hideInfoBarWithMessage:@"Finished!"]; } - (void)applicationWillResignActive:(UIApplication *)application diff --git a/InfoBar/InfoBar-Info.plist b/Code/Demo/InfoBarDemo-Info.plist similarity index 100% rename from InfoBar/InfoBar-Info.plist rename to Code/Demo/InfoBarDemo-Info.plist diff --git a/InfoBar/InfoBar-Prefix.pch b/Code/Demo/InfoBarDemo-Prefix.pch similarity index 100% rename from InfoBar/InfoBar-Prefix.pch rename to Code/Demo/InfoBarDemo-Prefix.pch diff --git a/InfoBar/SecondViewController.h b/Code/Demo/SecondViewController.h similarity index 100% rename from InfoBar/SecondViewController.h rename to Code/Demo/SecondViewController.h diff --git a/InfoBar/SecondViewController.m b/Code/Demo/SecondViewController.m similarity index 71% rename from InfoBar/SecondViewController.m rename to Code/Demo/SecondViewController.m index d28e69d..536605b 100644 --- a/InfoBar/SecondViewController.m +++ b/Code/Demo/SecondViewController.m @@ -7,7 +7,8 @@ // #import "SecondViewController.h" -#import "JBInfoBarManager.h" +#import "InfoBarAppDelegate.h" +#import "UITabBarController+JBInfoBar.h" @implementation SecondViewController @@ -20,8 +21,9 @@ - (void)viewDidLoad */ - (IBAction)runAction { - [[JBInfoBarManager sharedManager] showInfoBarWithMessage:@"Action from View 2"]; - [NSTimer scheduledTimerWithTimeInterval:5.0 target:[JBInfoBarManager sharedManager] selector:@selector(hideInfoBar) userInfo:nil repeats:NO]; + InfoBarAppDelegate *appDelegate = (InfoBarAppDelegate*) [[UIApplication sharedApplication] delegate]; + [appDelegate.tabBarController showInfoBarWithMessage:@"Action from View 2"]; + [NSTimer scheduledTimerWithTimeInterval:5.0 target:appDelegate.tabBarController selector:@selector(hideInfoBar) userInfo:nil repeats:NO]; } - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation diff --git a/InfoBar/en.lproj/FirstView.xib b/Code/Demo/en.lproj/FirstView.xib similarity index 100% rename from InfoBar/en.lproj/FirstView.xib rename to Code/Demo/en.lproj/FirstView.xib diff --git a/InfoBar/en.lproj/InfoPlist.strings b/Code/Demo/en.lproj/InfoPlist.strings similarity index 100% rename from InfoBar/en.lproj/InfoPlist.strings rename to Code/Demo/en.lproj/InfoPlist.strings diff --git a/InfoBar/en.lproj/MainWindow.xib b/Code/Demo/en.lproj/MainWindow.xib similarity index 100% rename from InfoBar/en.lproj/MainWindow.xib rename to Code/Demo/en.lproj/MainWindow.xib diff --git a/InfoBar/en.lproj/SecondView.xib b/Code/Demo/en.lproj/SecondView.xib similarity index 100% rename from InfoBar/en.lproj/SecondView.xib rename to Code/Demo/en.lproj/SecondView.xib diff --git a/InfoBar/main.m b/Code/Demo/main.m similarity index 100% rename from InfoBar/main.m rename to Code/Demo/main.m diff --git a/Code/Library/InfoBarStaticLibrary-Prefix.pch b/Code/Library/InfoBarStaticLibrary-Prefix.pch new file mode 100644 index 0000000..849e75c --- /dev/null +++ b/Code/Library/InfoBarStaticLibrary-Prefix.pch @@ -0,0 +1,7 @@ +// +// Prefix header for all source files of the 'InfoBarStaticLibrary' target in the 'InfoBarStaticLibrary' project +// + +#ifdef __OBJC__ + #import +#endif diff --git a/Code/Library/JBInfoBar.h b/Code/Library/JBInfoBar.h new file mode 100644 index 0000000..54fc73e --- /dev/null +++ b/Code/Library/JBInfoBar.h @@ -0,0 +1,45 @@ +// +// JBInfoBar.h +// InfoBar +// +// Created by Junior B. on 20.02.11. +// Copyright 2011 ThinkDiff.ch. All rights reserved. +// + +#import + + +@interface JBInfoBar : UIView { + CGPoint hiddenCP; + CGPoint showCP; + +@private + UILabel *infoLabel; + NSTimer *hideTimer; +} + + +- (id)initWithFrame:(CGRect)frame; + +- (void)showWithMessage:(NSString *)message; +- (void)showWithMessage:(NSString *)message hideAfterDelay:(NSTimeInterval)delay; + +- (void)hide; +- (void)hideWithMessage:(NSString *)message; +- (void)hideImmediately; + + +@property (nonatomic, copy) NSString *message; + +@property (nonatomic, readonly, assign) BOOL visible; + +@property (nonatomic, assign) NSTimeInterval hideAnimationDelay; +@property (nonatomic, assign) NSTimeInterval hideAnimationDuration; +@property (nonatomic, assign) NSTimeInterval showAnimationDuration; + +@property (nonatomic, retain) UIColor *textColor; +@property (nonatomic, retain) UIFont *textFont; + +@property (nonatomic, readonly) UILabel *infoLabel; + +@end diff --git a/Code/Library/JBInfoBar.m b/Code/Library/JBInfoBar.m new file mode 100644 index 0000000..02865a7 --- /dev/null +++ b/Code/Library/JBInfoBar.m @@ -0,0 +1,201 @@ +// +// JBInfoBar.m +// InfoBar +// +// Created by Junior B. on 20.02.11. +// Copyright 2011 ThinkDiff.ch. All rights reserved. +// + +#import "JBInfoBar.h" + +#define kDefaultFont [UIFont systemFontOfSize:17.0f] + +#define kDefaultBackgroundColor [UIColor colorWithRed:0.0f green:0.0f blue:0.0f alpha:0.6f] +#define kDefaultTextColor [UIColor whiteColor] + +#define kDefaultHideAnimationDelay 0.0f +#define kDefaultHideAnimationDuration 1.5f +#define kDefaultShowAnimationDuration 0.5f + + +@interface JBInfoBar () + +- (void) prepareCenterPoints; +- (void) prepareInfoLabel; +- (void) prepareDefaultTimings; + +- (void) cancelAndClearHideTimer; + +@end + + +@implementation JBInfoBar + +@synthesize visible; +@synthesize hideAnimationDelay; +@synthesize hideAnimationDuration; +@synthesize showAnimationDuration; + + +#pragma Public Action Methods + +- (void)showWithMessage:(NSString *)_message { + [self cancelAndClearHideTimer]; + + self.message = _message; + + if(visible) + return; + + [self setHidden:NO]; + [UIView transitionWithView:self duration:showAnimationDuration + options:UIViewAnimationOptionTransitionNone + animations:^ { + self.center = showCP; + } + completion:nil]; + visible = YES; +} + +- (void)showWithMessage:(NSString *)message hideAfterDelay:(NSTimeInterval)delay { + [self showWithMessage:message]; + + hideTimer = [[NSTimer scheduledTimerWithTimeInterval:delay target:self selector:@selector(hide) userInfo:nil repeats:NO] retain]; +} + +- (void)hide { + [self cancelAndClearHideTimer]; + + if(!visible) + return; + + [UIView animateWithDuration:hideAnimationDuration + delay:hideAnimationDelay + options:UIViewAnimationOptionTransitionNone + animations:^ { + self.center = hiddenCP; + } + completion:^(BOOL finished) { + [self setHidden:YES]; + }]; + visible = NO; +} + +- (void)hideWithMessage:(NSString *)_message { + [self cancelAndClearHideTimer]; + + self.message = _message; + + [self hide]; +} + +- (void)hideImmediately { + [self cancelAndClearHideTimer]; + + if(!visible) + return; + + self.center = hiddenCP; + [self setHidden:YES]; + visible = NO; +} + +#pragma mark Utility Methods + +- (void) cancelAndClearHideTimer { + [hideTimer invalidate]; + [hideTimer release]; + hideTimer = nil; +} + +#pragma mark Property Accessors + +- (void)setMessage:(NSString *)_message { + infoLabel.text = _message; +} + +- (NSString*)message { + return infoLabel.text; +} + +- (void) setTextColor:(UIColor *)textColor { + infoLabel.textColor = textColor; +} + +- (UIColor*) textColor { + return infoLabel.textColor; +} + +- (void) setTextFont:(UIFont *)textFont { + infoLabel.font = textFont; +} + +- (UIFont*) textFont { + return infoLabel.font; +} + +- (UILabel *)infoLabel { + return infoLabel; +} + +/* +// Only override drawRect: if you perform custom drawing. +// An empty implementation adversely affects performance during animation. +- (void)drawRect:(CGRect)rect +{ + // Drawing code +} + */ + +#pragma mark Instance Lifecycle + +- (id)initWithFrame:(CGRect)frame { + self = [super initWithFrame:frame]; + if (self) { + visible = NO; + + [self prepareCenterPoints]; + [self prepareInfoLabel]; + + self.backgroundColor = kDefaultBackgroundColor; + self.hidden = YES; + + [self prepareDefaultTimings]; + } + return self; +} + +- (void) prepareCenterPoints { + double centerX = self.frame.origin.x + self.frame.size.width / 2.0; + double hiddenCenterY = self.frame.origin.y + self.frame.size.height / 2.0; + double shownCenterY = self.frame.origin.y - self.frame.size.height / 2.0; + + hiddenCP = CGPointMake(centerX, hiddenCenterY); + showCP = CGPointMake(centerX, shownCenterY); +} + +- (void) prepareInfoLabel { + infoLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)]; + + infoLabel.textAlignment = UITextAlignmentCenter; + infoLabel.backgroundColor = [UIColor clearColor]; + + infoLabel.font = kDefaultFont; + infoLabel.textColor = kDefaultTextColor; + + [self addSubview:infoLabel]; +} + +- (void) prepareDefaultTimings { + hideAnimationDelay = kDefaultHideAnimationDelay; + hideAnimationDuration = kDefaultHideAnimationDuration; + showAnimationDuration = kDefaultShowAnimationDuration; +} + +- (void)dealloc { + [infoLabel release]; + + [super dealloc]; +} + +@end diff --git a/Code/Library/UIKit Additions/UITabBarController+JBInfoBar.h b/Code/Library/UIKit Additions/UITabBarController+JBInfoBar.h new file mode 100644 index 0000000..05362c5 --- /dev/null +++ b/Code/Library/UIKit Additions/UITabBarController+JBInfoBar.h @@ -0,0 +1,18 @@ +// +// UITabBarController+JBInfoBar.h +// InfoBar +// +// Created by Graham Haworth on 4/16/12. +// + +#import "JBInfoBar.h" +#import "UIViewController+JBInfoBar.h" + +#import + + +@interface UITabBarController (JBInfoBar) + +- (JBInfoBar*) createDefaultInfoBarWithHeight:(NSInteger)height; + +@end diff --git a/Code/Library/UIKit Additions/UITabBarController+JBInfoBar.m b/Code/Library/UIKit Additions/UITabBarController+JBInfoBar.m new file mode 100644 index 0000000..cbc0ce3 --- /dev/null +++ b/Code/Library/UIKit Additions/UITabBarController+JBInfoBar.m @@ -0,0 +1,39 @@ +// +// UITabBarController+JBInfoBar.m +// InfoBar +// +// Created by Graham Haworth on 4/16/12. +// + +#import "UIViewController+JBInfoBar.h" + + +@implementation UITabBarController (JBInfoBar) + +- (void) insertInfoBar:(JBInfoBar *)infoBar { + [self.view insertSubview:infoBar belowSubview:self.tabBar]; +} + +- (JBInfoBar*) createDefaultInfoBarWithHeight:(NSInteger)height { + CGRect frame = CGRectMake(0, self.tabBar.frame.origin.y, self.tabBar.frame.size.width, height); + JBInfoBar *infoBar = [[[JBInfoBar alloc] initWithFrame:frame] autorelease]; + infoBar.tag = [[self class] defaultInfoBarTag]; + return infoBar; +} + +@end + + + + + + + + + + + + + + + diff --git a/Code/Library/UIKit Additions/UIViewController+JBInfoBar.h b/Code/Library/UIKit Additions/UIViewController+JBInfoBar.h new file mode 100644 index 0000000..7a98d27 --- /dev/null +++ b/Code/Library/UIKit Additions/UIViewController+JBInfoBar.h @@ -0,0 +1,31 @@ +// +// UIViewController+JBInfoBar.h +// InfoBar +// +// Created by Graham Haworth on 4/16/12. +// + +#import + +#import "JBInfoBar.h" + + +@interface UIViewController (JBInfoBar) + ++ (void) setDefaultInfoBarTag:(NSInteger)tag; ++ (NSInteger) defaultInfoBarTag; + +- (void) showInfoBarWithMessage:(NSString *)message; +- (void) showInfoBarWithMessage:(NSString *)message hideAfterDelay:(NSTimeInterval)delay; + +- (void) hideInfoBar; +- (void) hideInfoBarWithMessage:(NSString *)message; +- (void) hideInfoBarImmediately; + +// These probably should not be used unless special configuration is needed +- (JBInfoBar*) createDefaultInfoBar; +- (JBInfoBar*) createDefaultInfoBarWithHeight:(NSInteger)height; + +@property (nonatomic, retain) JBInfoBar *infoBar; + +@end diff --git a/Code/Library/UIKit Additions/UIViewController+JBInfoBar.m b/Code/Library/UIKit Additions/UIViewController+JBInfoBar.m new file mode 100644 index 0000000..7c80242 --- /dev/null +++ b/Code/Library/UIKit Additions/UIViewController+JBInfoBar.m @@ -0,0 +1,112 @@ +// +// UIViewController+JBInfoBar.m +// InfoBar +// +// Created by Graham Haworth on 4/16/12. +// + +#import "UIViewController+JBInfoBar.h" + + +#define kDefaultUndefinedInfoBarTag 2048 +#define kDefaultInfoBarHeight 30 + + +@implementation UIViewController (JBInfoBar) + + +#pragma mark Public Accessors + +- (JBInfoBar*) infoBar { + return (JBInfoBar*) [self.view viewWithTag:defaultInfoBarTag]; +} + +- (void) setInfoBar:(JBInfoBar *)infoBar { + JBInfoBar *oldInfoBar = [self infoBar]; + if(oldInfoBar) + [oldInfoBar removeFromSuperview]; + + [self insertInfoBar:infoBar]; +} + + +#pragma mark Action Methods + +- (void) showInfoBarWithMessage:(NSString *)message { + JBInfoBar *infoBar = [self getOrCreateInfoBar]; + [infoBar showWithMessage:message]; +} + +- (void) showInfoBarWithMessage:(NSString *)message hideAfterDelay:(NSTimeInterval)delay { + JBInfoBar *infoBar = [self getOrCreateInfoBar]; + [infoBar showWithMessage:message hideAfterDelay:delay]; +} + +- (void) hideInfoBar { + [self.infoBar hide]; +} + +- (void) hideInfoBarWithMessage:(NSString *)message { + [self.infoBar hideWithMessage:message]; +} + +- (void) hideInfoBarImmediately { + [self.infoBar hideImmediately]; +} + + +#pragma mark Utility Methods + +- (void) insertInfoBar:(JBInfoBar *)infoBar { + [self.view insertSubview:infoBar belowSubview:self.view]; +} + +- (JBInfoBar*) createDefaultInfoBar { + return [self createDefaultInfoBarWithHeight:kDefaultInfoBarHeight]; +} + +- (JBInfoBar*) createDefaultInfoBarWithHeight:(NSInteger)height { + CGRect frame = CGRectMake(0, self.view.frame.size.height, self.view.frame.size.width, height); + JBInfoBar *infoBar = [[[JBInfoBar alloc] initWithFrame:frame] autorelease]; + infoBar.tag = [[self class] defaultInfoBarTag]; + return infoBar; +} + +- (JBInfoBar*) getOrCreateInfoBar { + JBInfoBar *infoBar = self.infoBar; + if(!infoBar) { + infoBar = [self createDefaultInfoBar]; + [self insertInfoBar:infoBar]; + } + return infoBar; +} + + +#pragma mark Global Configuration + +static NSInteger defaultInfoBarTag = kDefaultUndefinedInfoBarTag; + ++ (void) setDefaultInfoBarTag:(NSInteger)tag { + defaultInfoBarTag = tag; +} + ++ (NSInteger) defaultInfoBarTag { + return defaultInfoBarTag; +} + +@end + + + + + + + + + + + + + + + diff --git a/InfoBar.xcodeproj/project.pbxproj b/InfoBar.xcodeproj/project.pbxproj index d4e9150..debe861 100644 --- a/InfoBar.xcodeproj/project.pbxproj +++ b/InfoBar.xcodeproj/project.pbxproj @@ -10,44 +10,63 @@ 5B5FB2811311514600719F62 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5B5FB2801311514600719F62 /* UIKit.framework */; }; 5B5FB2831311514600719F62 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5B5FB2821311514600719F62 /* Foundation.framework */; }; 5B5FB2851311514600719F62 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5B5FB2841311514600719F62 /* CoreGraphics.framework */; }; - 5B5FB28B1311514600719F62 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 5B5FB2891311514600719F62 /* InfoPlist.strings */; }; - 5B5FB28E1311514600719F62 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 5B5FB28D1311514600719F62 /* main.m */; }; - 5B5FB2911311514600719F62 /* InfoBarAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 5B5FB2901311514600719F62 /* InfoBarAppDelegate.m */; }; - 5B5FB2941311514600719F62 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 5B5FB2921311514600719F62 /* MainWindow.xib */; }; - 5B5FB2971311514600719F62 /* FirstViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5B5FB2961311514600719F62 /* FirstViewController.m */; }; - 5B5FB29A1311514600719F62 /* SecondViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5B5FB2991311514600719F62 /* SecondViewController.m */; }; - 5B5FB29D1311514600719F62 /* FirstView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 5B5FB29B1311514600719F62 /* FirstView.xib */; }; - 5B5FB2A01311514600719F62 /* SecondView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 5B5FB29E1311514600719F62 /* SecondView.xib */; }; - 5B7A0B851311522400FE6193 /* JBInfoBar.m in Sources */ = {isa = PBXBuildFile; fileRef = 5B7A0B841311522400FE6193 /* JBInfoBar.m */; }; - 5B7A0B8D131153F900FE6193 /* Icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 5B7A0B8C131153F900FE6193 /* Icon@2x.png */; }; - 5B7A0B8F1311540100FE6193 /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 5B7A0B8E1311540100FE6193 /* Icon.png */; }; - 79438EEB131E5A880057CEAB /* JBInfoBarManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 79438EEA131E5A880057CEAB /* JBInfoBarManager.m */; }; + BF3AA0A71620FA6700A82B96 /* UIViewController+JBInfoBar.h in Headers */ = {isa = PBXBuildFile; fileRef = BF3AA0A61620FA6700A82B96 /* UIViewController+JBInfoBar.h */; }; + BF3AA0B31620FAE200A82B96 /* UITabBarController+JBInfoBar.h in Headers */ = {isa = PBXBuildFile; fileRef = BF3AA0B11620FAE100A82B96 /* UITabBarController+JBInfoBar.h */; }; + BF3AA0B41620FAE200A82B96 /* UITabBarController+JBInfoBar.m in Sources */ = {isa = PBXBuildFile; fileRef = BF3AA0B21620FAE100A82B96 /* UITabBarController+JBInfoBar.m */; }; + BF7B4635153C6E1E00616962 /* FirstViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BF7B4620153C6E1E00616962 /* FirstViewController.m */; }; + BF7B4637153C6E1E00616962 /* InfoBarAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = BF7B4624153C6E1E00616962 /* InfoBarAppDelegate.m */; }; + BF7B4638153C6E1E00616962 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = BF7B4625153C6E1E00616962 /* main.m */; }; + BF7B4639153C6E1E00616962 /* SecondViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BF7B4627153C6E1E00616962 /* SecondViewController.m */; }; + BF7B463A153C6E1E00616962 /* FirstView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BF7B4628153C6E1E00616962 /* FirstView.xib */; }; + BF7B463B153C6E1E00616962 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = BF7B462A153C6E1E00616962 /* InfoPlist.strings */; }; + BF7B463C153C6E1E00616962 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = BF7B462C153C6E1E00616962 /* MainWindow.xib */; }; + BF7B463D153C6E1E00616962 /* SecondView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BF7B462E153C6E1E00616962 /* SecondView.xib */; }; + BF7B4647153C6EF300616962 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5B5FB2821311514600719F62 /* Foundation.framework */; }; + BF7B4657153C6FC600616962 /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = BF7B4655153C6FC600616962 /* Icon.png */; }; + BF7B4658153C6FC600616962 /* Icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = BF7B4656153C6FC600616962 /* Icon@2x.png */; }; + BF7B465E153C702900616962 /* libInfoBarStaticLibrary.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BF7B4646153C6EF300616962 /* libInfoBarStaticLibrary.a */; }; + BF7B4662153C734700616962 /* JBInfoBar.m in Sources */ = {isa = PBXBuildFile; fileRef = BF7B4632153C6E1E00616962 /* JBInfoBar.m */; }; + BF7B466E153C860500616962 /* UIViewController+JBInfoBar.m in Sources */ = {isa = PBXBuildFile; fileRef = BF7B466C153C860500616962 /* UIViewController+JBInfoBar.m */; }; /* End PBXBuildFile section */ +/* Begin PBXContainerItemProxy section */ + BF7B465F153C708800616962 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 5B5FB2731311514600719F62 /* Project object */; + proxyType = 1; + remoteGlobalIDString = BF7B4645153C6EF300616962; + remoteInfo = InfoBarStaticLibrary; + }; +/* End PBXContainerItemProxy section */ + /* Begin PBXFileReference section */ - 5B5FB27C1311514600719F62 /* InfoBar.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = InfoBar.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 5B5FB27C1311514600719F62 /* InfoBarDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = InfoBarDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 5B5FB2801311514600719F62 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 5B5FB2821311514600719F62 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 5B5FB2841311514600719F62 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; - 5B5FB2881311514600719F62 /* InfoBar-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "InfoBar-Info.plist"; sourceTree = ""; }; - 5B5FB28A1311514600719F62 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; - 5B5FB28C1311514600719F62 /* InfoBar-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "InfoBar-Prefix.pch"; sourceTree = ""; }; - 5B5FB28D1311514600719F62 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 5B5FB28F1311514600719F62 /* InfoBarAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = InfoBarAppDelegate.h; sourceTree = ""; }; - 5B5FB2901311514600719F62 /* InfoBarAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = InfoBarAppDelegate.m; sourceTree = ""; }; - 5B5FB2931311514600719F62 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainWindow.xib; sourceTree = ""; }; - 5B5FB2951311514600719F62 /* FirstViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FirstViewController.h; sourceTree = ""; }; - 5B5FB2961311514600719F62 /* FirstViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FirstViewController.m; sourceTree = ""; }; - 5B5FB2981311514600719F62 /* SecondViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SecondViewController.h; sourceTree = ""; }; - 5B5FB2991311514600719F62 /* SecondViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SecondViewController.m; sourceTree = ""; }; - 5B5FB29C1311514600719F62 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/FirstView.xib; sourceTree = ""; }; - 5B5FB29F1311514600719F62 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/SecondView.xib; sourceTree = ""; }; - 5B7A0B831311522400FE6193 /* JBInfoBar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JBInfoBar.h; sourceTree = ""; }; - 5B7A0B841311522400FE6193 /* JBInfoBar.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JBInfoBar.m; sourceTree = ""; }; - 5B7A0B8C131153F900FE6193 /* Icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon@2x.png"; path = "../Icon@2x.png"; sourceTree = ""; }; - 5B7A0B8E1311540100FE6193 /* Icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Icon.png; path = ../Icon.png; sourceTree = ""; }; - 79438EE9131E5A880057CEAB /* JBInfoBarManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JBInfoBarManager.h; sourceTree = ""; }; - 79438EEA131E5A880057CEAB /* JBInfoBarManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JBInfoBarManager.m; sourceTree = ""; }; + BF3AA0A61620FA6700A82B96 /* UIViewController+JBInfoBar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIViewController+JBInfoBar.h"; sourceTree = ""; }; + BF3AA0B11620FAE100A82B96 /* UITabBarController+JBInfoBar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UITabBarController+JBInfoBar.h"; sourceTree = ""; }; + BF3AA0B21620FAE100A82B96 /* UITabBarController+JBInfoBar.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UITabBarController+JBInfoBar.m"; sourceTree = ""; }; + BF7B461F153C6E1E00616962 /* FirstViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FirstViewController.h; sourceTree = ""; }; + BF7B4620153C6E1E00616962 /* FirstViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FirstViewController.m; sourceTree = ""; }; + BF7B4621153C6E1E00616962 /* InfoBarDemo-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "InfoBarDemo-Info.plist"; sourceTree = ""; }; + BF7B4622153C6E1E00616962 /* InfoBarDemo-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "InfoBarDemo-Prefix.pch"; sourceTree = ""; }; + BF7B4623153C6E1E00616962 /* InfoBarAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InfoBarAppDelegate.h; sourceTree = ""; }; + BF7B4624153C6E1E00616962 /* InfoBarAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InfoBarAppDelegate.m; sourceTree = ""; }; + BF7B4625153C6E1E00616962 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + BF7B4626153C6E1E00616962 /* SecondViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SecondViewController.h; sourceTree = ""; }; + BF7B4627153C6E1E00616962 /* SecondViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SecondViewController.m; sourceTree = ""; }; + BF7B4629153C6E1E00616962 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/FirstView.xib; sourceTree = ""; }; + BF7B462B153C6E1E00616962 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + BF7B462D153C6E1E00616962 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainWindow.xib; sourceTree = ""; }; + BF7B462F153C6E1E00616962 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/SecondView.xib; sourceTree = ""; }; + BF7B4631153C6E1E00616962 /* JBInfoBar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JBInfoBar.h; sourceTree = ""; }; + BF7B4632153C6E1E00616962 /* JBInfoBar.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JBInfoBar.m; sourceTree = ""; }; + BF7B4646153C6EF300616962 /* libInfoBarStaticLibrary.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libInfoBarStaticLibrary.a; sourceTree = BUILT_PRODUCTS_DIR; }; + BF7B4652153C6F6600616962 /* InfoBarStaticLibrary-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "InfoBarStaticLibrary-Prefix.pch"; sourceTree = ""; }; + BF7B4655153C6FC600616962 /* Icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Icon.png; sourceTree = ""; }; + BF7B4656153C6FC600616962 /* Icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon@2x.png"; sourceTree = ""; }; + BF7B466C153C860500616962 /* UIViewController+JBInfoBar.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIViewController+JBInfoBar.m"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -55,19 +74,29 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + BF7B465E153C702900616962 /* libInfoBarStaticLibrary.a in Frameworks */, 5B5FB2811311514600719F62 /* UIKit.framework in Frameworks */, 5B5FB2831311514600719F62 /* Foundation.framework in Frameworks */, 5B5FB2851311514600719F62 /* CoreGraphics.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; + BF7B4643153C6EF300616962 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + BF7B4647153C6EF300616962 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ 5B5FB2711311514600719F62 = { isa = PBXGroup; children = ( - 5B5FB2861311514600719F62 /* InfoBar */, + BF7B461D153C6E1E00616962 /* Code */, + BF7B4654153C6FC600616962 /* Resources */, 5B5FB27F1311514600719F62 /* Frameworks */, 5B5FB27D1311514600719F62 /* Products */, ); @@ -76,7 +105,8 @@ 5B5FB27D1311514600719F62 /* Products */ = { isa = PBXGroup; children = ( - 5B5FB27C1311514600719F62 /* InfoBar.app */, + 5B5FB27C1311514600719F62 /* InfoBarDemo.app */, + BF7B4646153C6EF300616962 /* libInfoBarStaticLibrary.a */, ); name = Products; sourceTree = ""; @@ -91,54 +121,100 @@ name = Frameworks; sourceTree = ""; }; - 5B5FB2861311514600719F62 /* InfoBar */ = { + BF7B461D153C6E1E00616962 /* Code */ = { isa = PBXGroup; children = ( - 5B7A0B81131151E800FE6193 /* InfoBarView */, - 5B5FB28F1311514600719F62 /* InfoBarAppDelegate.h */, - 5B5FB2901311514600719F62 /* InfoBarAppDelegate.m */, - 5B5FB2921311514600719F62 /* MainWindow.xib */, - 5B5FB2951311514600719F62 /* FirstViewController.h */, - 5B5FB2961311514600719F62 /* FirstViewController.m */, - 5B5FB2981311514600719F62 /* SecondViewController.h */, - 5B5FB2991311514600719F62 /* SecondViewController.m */, - 5B5FB29B1311514600719F62 /* FirstView.xib */, - 5B5FB29E1311514600719F62 /* SecondView.xib */, - 5B5FB2871311514600719F62 /* Supporting Files */, + BF7B4630153C6E1E00616962 /* Library */, + BF7B461E153C6E1E00616962 /* Demo */, ); - path = InfoBar; + path = Code; sourceTree = ""; }; - 5B5FB2871311514600719F62 /* Supporting Files */ = { + BF7B461E153C6E1E00616962 /* Demo */ = { isa = PBXGroup; children = ( - 5B7A0B8E1311540100FE6193 /* Icon.png */, - 5B7A0B8C131153F900FE6193 /* Icon@2x.png */, - 5B5FB2881311514600719F62 /* InfoBar-Info.plist */, - 5B5FB2891311514600719F62 /* InfoPlist.strings */, - 5B5FB28C1311514600719F62 /* InfoBar-Prefix.pch */, - 5B5FB28D1311514600719F62 /* main.m */, + BF7B4623153C6E1E00616962 /* InfoBarAppDelegate.h */, + BF7B4624153C6E1E00616962 /* InfoBarAppDelegate.m */, + BF7B461F153C6E1E00616962 /* FirstViewController.h */, + BF7B4620153C6E1E00616962 /* FirstViewController.m */, + BF7B4626153C6E1E00616962 /* SecondViewController.h */, + BF7B4627153C6E1E00616962 /* SecondViewController.m */, + BF7B4628153C6E1E00616962 /* FirstView.xib */, + BF7B462C153C6E1E00616962 /* MainWindow.xib */, + BF7B462E153C6E1E00616962 /* SecondView.xib */, + BF7B4641153C6EAB00616962 /* Supporting Files */, + ); + path = Demo; + sourceTree = ""; + }; + BF7B4630153C6E1E00616962 /* Library */ = { + isa = PBXGroup; + children = ( + BF7B4631153C6E1E00616962 /* JBInfoBar.h */, + BF7B4632153C6E1E00616962 /* JBInfoBar.m */, + BF7B466A153C860500616962 /* UIKit Additions */, + BF7B4653153C6F6B00616962 /* Supporting Files */, + ); + path = Library; + sourceTree = ""; + }; + BF7B4641153C6EAB00616962 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + BF7B4621153C6E1E00616962 /* InfoBarDemo-Info.plist */, + BF7B4622153C6E1E00616962 /* InfoBarDemo-Prefix.pch */, + BF7B462A153C6E1E00616962 /* InfoPlist.strings */, + BF7B4625153C6E1E00616962 /* main.m */, ); name = "Supporting Files"; sourceTree = ""; }; - 5B7A0B81131151E800FE6193 /* InfoBarView */ = { + BF7B4653153C6F6B00616962 /* Supporting Files */ = { isa = PBXGroup; children = ( - 5B7A0B831311522400FE6193 /* JBInfoBar.h */, - 5B7A0B841311522400FE6193 /* JBInfoBar.m */, - 79438EE9131E5A880057CEAB /* JBInfoBarManager.h */, - 79438EEA131E5A880057CEAB /* JBInfoBarManager.m */, + BF7B4652153C6F6600616962 /* InfoBarStaticLibrary-Prefix.pch */, ); - name = InfoBarView; + name = "Supporting Files"; + sourceTree = ""; + }; + BF7B4654153C6FC600616962 /* Resources */ = { + isa = PBXGroup; + children = ( + BF7B4655153C6FC600616962 /* Icon.png */, + BF7B4656153C6FC600616962 /* Icon@2x.png */, + ); + path = Resources; + sourceTree = ""; + }; + BF7B466A153C860500616962 /* UIKit Additions */ = { + isa = PBXGroup; + children = ( + BF3AA0A61620FA6700A82B96 /* UIViewController+JBInfoBar.h */, + BF7B466C153C860500616962 /* UIViewController+JBInfoBar.m */, + BF3AA0B11620FAE100A82B96 /* UITabBarController+JBInfoBar.h */, + BF3AA0B21620FAE100A82B96 /* UITabBarController+JBInfoBar.m */, + ); + path = "UIKit Additions"; sourceTree = ""; }; /* End PBXGroup section */ +/* Begin PBXHeadersBuildPhase section */ + BF7B4644153C6EF300616962 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + BF3AA0A71620FA6700A82B96 /* UIViewController+JBInfoBar.h in Headers */, + BF3AA0B31620FAE200A82B96 /* UITabBarController+JBInfoBar.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + /* Begin PBXNativeTarget section */ - 5B5FB27B1311514600719F62 /* InfoBar */ = { + 5B5FB27B1311514600719F62 /* InfoBarDemo */ = { isa = PBXNativeTarget; - buildConfigurationList = 5B5FB2A31311514600719F62 /* Build configuration list for PBXNativeTarget "InfoBar" */; + buildConfigurationList = 5B5FB2A31311514600719F62 /* Build configuration list for PBXNativeTarget "InfoBarDemo" */; buildPhases = ( 5B5FB2781311514600719F62 /* Sources */, 5B5FB2791311514600719F62 /* Frameworks */, @@ -147,12 +223,30 @@ buildRules = ( ); dependencies = ( + BF7B4660153C708800616962 /* PBXTargetDependency */, ); - name = InfoBar; + name = InfoBarDemo; productName = InfoBar; - productReference = 5B5FB27C1311514600719F62 /* InfoBar.app */; + productReference = 5B5FB27C1311514600719F62 /* InfoBarDemo.app */; productType = "com.apple.product-type.application"; }; + BF7B4645153C6EF300616962 /* InfoBarStaticLibrary */ = { + isa = PBXNativeTarget; + buildConfigurationList = BF7B464E153C6EF300616962 /* Build configuration list for PBXNativeTarget "InfoBarStaticLibrary" */; + buildPhases = ( + BF7B4642153C6EF300616962 /* Sources */, + BF7B4643153C6EF300616962 /* Frameworks */, + BF7B4644153C6EF300616962 /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = InfoBarStaticLibrary; + productName = InfoBarStaticLibrary; + productReference = BF7B4646153C6EF300616962 /* libInfoBarStaticLibrary.a */; + productType = "com.apple.product-type.library.static"; + }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ @@ -170,7 +264,8 @@ projectDirPath = ""; projectRoot = ""; targets = ( - 5B5FB27B1311514600719F62 /* InfoBar */, + BF7B4645153C6EF300616962 /* InfoBarStaticLibrary */, + 5B5FB27B1311514600719F62 /* InfoBarDemo */, ); }; /* End PBXProject section */ @@ -180,12 +275,12 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 5B5FB28B1311514600719F62 /* InfoPlist.strings in Resources */, - 5B5FB2941311514600719F62 /* MainWindow.xib in Resources */, - 5B5FB29D1311514600719F62 /* FirstView.xib in Resources */, - 5B5FB2A01311514600719F62 /* SecondView.xib in Resources */, - 5B7A0B8D131153F900FE6193 /* Icon@2x.png in Resources */, - 5B7A0B8F1311540100FE6193 /* Icon.png in Resources */, + BF7B463A153C6E1E00616962 /* FirstView.xib in Resources */, + BF7B463B153C6E1E00616962 /* InfoPlist.strings in Resources */, + BF7B463C153C6E1E00616962 /* MainWindow.xib in Resources */, + BF7B463D153C6E1E00616962 /* SecondView.xib in Resources */, + BF7B4657153C6FC600616962 /* Icon.png in Resources */, + BF7B4658153C6FC600616962 /* Icon@2x.png in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -196,46 +291,62 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 5B5FB28E1311514600719F62 /* main.m in Sources */, - 5B5FB2911311514600719F62 /* InfoBarAppDelegate.m in Sources */, - 5B5FB2971311514600719F62 /* FirstViewController.m in Sources */, - 5B5FB29A1311514600719F62 /* SecondViewController.m in Sources */, - 5B7A0B851311522400FE6193 /* JBInfoBar.m in Sources */, - 79438EEB131E5A880057CEAB /* JBInfoBarManager.m in Sources */, + BF7B4635153C6E1E00616962 /* FirstViewController.m in Sources */, + BF7B4637153C6E1E00616962 /* InfoBarAppDelegate.m in Sources */, + BF7B4638153C6E1E00616962 /* main.m in Sources */, + BF7B4639153C6E1E00616962 /* SecondViewController.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + BF7B4642153C6EF300616962 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + BF7B4662153C734700616962 /* JBInfoBar.m in Sources */, + BF7B466E153C860500616962 /* UIViewController+JBInfoBar.m in Sources */, + BF3AA0B41620FAE200A82B96 /* UITabBarController+JBInfoBar.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ +/* Begin PBXTargetDependency section */ + BF7B4660153C708800616962 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = BF7B4645153C6EF300616962 /* InfoBarStaticLibrary */; + targetProxy = BF7B465F153C708800616962 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + /* Begin PBXVariantGroup section */ - 5B5FB2891311514600719F62 /* InfoPlist.strings */ = { + BF7B4628153C6E1E00616962 /* FirstView.xib */ = { isa = PBXVariantGroup; children = ( - 5B5FB28A1311514600719F62 /* en */, + BF7B4629153C6E1E00616962 /* en */, ); - name = InfoPlist.strings; + name = FirstView.xib; sourceTree = ""; }; - 5B5FB2921311514600719F62 /* MainWindow.xib */ = { + BF7B462A153C6E1E00616962 /* InfoPlist.strings */ = { isa = PBXVariantGroup; children = ( - 5B5FB2931311514600719F62 /* en */, + BF7B462B153C6E1E00616962 /* en */, ); - name = MainWindow.xib; + name = InfoPlist.strings; sourceTree = ""; }; - 5B5FB29B1311514600719F62 /* FirstView.xib */ = { + BF7B462C153C6E1E00616962 /* MainWindow.xib */ = { isa = PBXVariantGroup; children = ( - 5B5FB29C1311514600719F62 /* en */, + BF7B462D153C6E1E00616962 /* en */, ); - name = FirstView.xib; + name = MainWindow.xib; sourceTree = ""; }; - 5B5FB29E1311514600719F62 /* SecondView.xib */ = { + BF7B462E153C6E1E00616962 /* SecondView.xib */ = { isa = PBXVariantGroup; children = ( - 5B5FB29F1311514600719F62 /* en */, + BF7B462F153C6E1E00616962 /* en */, ); name = SecondView.xib; sourceTree = ""; @@ -250,12 +361,14 @@ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = DEBUG; - GCC_VERSION = com.apple.compilers.llvmgcc42; + GCC_PREPROCESSOR_DEFINITIONS = "DEBUG=1"; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 4.0; + IPHONEOS_DEPLOYMENT_TARGET = 4.3; SDKROOT = iphoneos; + VALID_ARCHS = "armv7 armv7s i386"; }; name = Debug; }; @@ -265,12 +378,14 @@ ARCHS = "$(ARCHS_STANDARD_32_BIT)"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_VERSION = com.apple.compilers.llvmgcc42; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 4.0; + IPHONEOS_DEPLOYMENT_TARGET = 4.3; OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; SDKROOT = iphoneos; + VALID_ARCHS = "armv7 armv7s i386"; }; name = Release; }; @@ -281,9 +396,9 @@ COPY_PHASE_STRIP = NO; GCC_DYNAMIC_NO_PIC = NO; GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "InfoBar/InfoBar-Prefix.pch"; - INFOPLIST_FILE = "InfoBar/InfoBar-Info.plist"; - INSTALL_PATH = "$(LOCAL_APPS_DIR)"; + GCC_PREFIX_HEADER = "Code/Demo/InfoBarDemo-Prefix.pch"; + INFOPLIST_FILE = "Code/Demo/InfoBarDemo-Info.plist"; + OTHER_LDFLAGS = "-ObjC"; PRODUCT_NAME = "$(TARGET_NAME)"; WRAPPER_EXTENSION = app; }; @@ -295,15 +410,54 @@ ALWAYS_SEARCH_USER_PATHS = NO; COPY_PHASE_STRIP = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "InfoBar/InfoBar-Prefix.pch"; - INFOPLIST_FILE = "InfoBar/InfoBar-Info.plist"; - INSTALL_PATH = "$(LOCAL_APPS_DIR)"; + GCC_PREFIX_HEADER = "Code/Demo/InfoBarDemo-Prefix.pch"; + INFOPLIST_FILE = "Code/Demo/InfoBarDemo-Info.plist"; + OTHER_LDFLAGS = "-ObjC"; PRODUCT_NAME = "$(TARGET_NAME)"; VALIDATE_PRODUCT = YES; WRAPPER_EXTENSION = app; }; name = Release; }; + BF7B464F153C6EF300616962 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + "ARCHS[sdk=iphoneos*]" = ( + armv6, + armv7, + ); + COPY_PHASE_STRIP = NO; + DSTROOT = /tmp/InfoBarStaticLibrary.dst; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "Code/Library/InfoBarStaticLibrary-Prefix.pch"; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + OTHER_LDFLAGS = "-ObjC"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + }; + name = Debug; + }; + BF7B4650153C6EF300616962 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + "ARCHS[sdk=iphoneos*]" = ( + armv6, + armv7, + ); + COPY_PHASE_STRIP = YES; + DSTROOT = /tmp/InfoBarStaticLibrary.dst; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "Code/Library/InfoBarStaticLibrary-Prefix.pch"; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + OTHER_LDFLAGS = "-ObjC"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -316,7 +470,7 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 5B5FB2A31311514600719F62 /* Build configuration list for PBXNativeTarget "InfoBar" */ = { + 5B5FB2A31311514600719F62 /* Build configuration list for PBXNativeTarget "InfoBarDemo" */ = { isa = XCConfigurationList; buildConfigurations = ( 5B5FB2A41311514600719F62 /* Debug */, @@ -325,6 +479,15 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + BF7B464E153C6EF300616962 /* Build configuration list for PBXNativeTarget "InfoBarStaticLibrary" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + BF7B464F153C6EF300616962 /* Debug */, + BF7B4650153C6EF300616962 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; /* End XCConfigurationList section */ }; rootObject = 5B5FB2731311514600719F62 /* Project object */; diff --git a/InfoBar/JBInfoBar.h b/InfoBar/JBInfoBar.h deleted file mode 100644 index e7fc52b..0000000 --- a/InfoBar/JBInfoBar.h +++ /dev/null @@ -1,36 +0,0 @@ -// -// JBInfoBar.h -// InfoBar -// -// Created by Junior B. on 20.02.11. -// Copyright 2011 ThinkDiff.ch. All rights reserved. -// - -#import - - -@interface JBInfoBar : UIView { - CGPoint hiddenCP; - CGPoint showCP; - - BOOL isHidden; - - UILabel *infoLabel; -} - -@property (nonatomic,assign) NSTimeInterval hideAnimationDelay; -@property (nonatomic,assign) NSTimeInterval hideAnimationDuration; -@property (nonatomic,assign) NSTimeInterval showAnimationDuration; -@property (readonly,assign) BOOL isHidden; - -- (id)initWithFrame:(CGRect)frame - backgroundColor:(UIColor *)bColor - textColor:(UIColor *)tColor - textFont:(UIFont *)tFont; -- (void)showBarWithMessage:(NSString *)message; -- (void)hideBarWithMessage:(NSString *)message; -- (void)hideBarImmediately; -- (void)setMessage:(NSString *)message; -- (UILabel *)infoLabel; - -@end diff --git a/InfoBar/JBInfoBar.m b/InfoBar/JBInfoBar.m deleted file mode 100644 index 7b113f1..0000000 --- a/InfoBar/JBInfoBar.m +++ /dev/null @@ -1,119 +0,0 @@ -// -// JBInfoBar.m -// InfoBar -// -// Created by Junior B. on 20.02.11. -// Copyright 2011 ThinkDiff.ch. All rights reserved. -// - -#import "JBInfoBar.h" - -@implementation JBInfoBar - -@synthesize isHidden, hideAnimationDelay, hideAnimationDuration, showAnimationDuration; - -- (id)initWithFrame:(CGRect)frame - backgroundColor:(UIColor *)bColor - textColor:(UIColor *)tColor - textFont:(UIFont *)tFont -{ - self = [super initWithFrame:frame]; - if (self) { - // Initialization code - isHidden = YES; - hiddenCP = CGPointMake(frame.origin.x + frame.size.width / 2.0, frame.origin.y + frame.size.height / 2.0); - showCP = CGPointMake(frame.origin.x + frame.size.width / 2.0, frame.origin.y - frame.size.height / 2.0); - - if (!bColor) { - [self setBackgroundColor:[UIColor colorWithRed:0.3 green:0.3 blue:0.3 alpha:0.5]]; - } else { - [self setBackgroundColor:bColor]; - } - - [self setHidden:YES]; - - infoLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)]; - [infoLabel setTextAlignment:UITextAlignmentCenter]; - - if (!tFont) { - [infoLabel setFont:[UIFont fontWithName:@"MavenPro" size:14]]; - } else { - [infoLabel setFont:tFont]; - } - - if (!tColor) { - [infoLabel setTextColor:[UIColor colorWithRed:0.95 green:0.95 blue:0.95 alpha:1.0]]; - } else { - [infoLabel setTextColor:tColor]; - } - - [infoLabel setBackgroundColor:[UIColor clearColor]]; - - [self addSubview:infoLabel]; - - self.hideAnimationDelay = 0.0f; - self.hideAnimationDuration = 1.5f; - self.showAnimationDuration = 0.5f; - } - return self; -} - -- (void)setMessage:(NSString *)message { - if (message != nil) infoLabel.text = message; -} - -- (UILabel *)infoLabel { - return infoLabel; -} - -- (void)showBarWithMessage:(NSString *)message { - [self setMessage:message]; - if (isHidden) { - [self setHidden:NO]; - [UIView transitionWithView:self duration:showAnimationDuration - options:UIViewAnimationOptionTransitionNone - animations:^ { self.center = showCP; } - completion:nil]; - isHidden = NO; - } -} - -- (void)hideBarWithMessage:(NSString *)message { - if (message) - [self setMessage:message]; - if (!isHidden) { - [UIView animateWithDuration:hideAnimationDuration - delay:hideAnimationDelay - options:UIViewAnimationOptionTransitionNone - animations:^ { self.center = hiddenCP; } - completion:^(BOOL finished) { - [self setHidden:YES]; - }]; - isHidden = YES; - } -} - -- (void)hideBarImmediately { - if (!isHidden) { - self.center = hiddenCP; - [self setHidden:YES]; - isHidden = YES; - } -} - -/* -// Only override drawRect: if you perform custom drawing. -// An empty implementation adversely affects performance during animation. -- (void)drawRect:(CGRect)rect -{ - // Drawing code -} -*/ - -- (void)dealloc -{ - [infoLabel release]; - [super dealloc]; -} - -@end diff --git a/InfoBar/JBInfoBarManager.h b/InfoBar/JBInfoBarManager.h deleted file mode 100644 index 98090d4..0000000 --- a/InfoBar/JBInfoBarManager.h +++ /dev/null @@ -1,29 +0,0 @@ -// -// JBInfoBarManager.h -// InfoBar -// -// Created by Junior on 02/03/2011. -// Copyright 2011 __MyCompanyName__. All rights reserved. -// - -#import -#import "JBInfoBar.h" - -@interface JBInfoBarManager : NSObject { - JBInfoBar *infoBar; -} - -@property (nonatomic, assign) JBInfoBar *infoBar; - -+ (JBInfoBarManager *)sharedManager; - -- (void)initInfoBarWithFrame:(CGRect)frame - backgroundColor:(UIColor *)bColor - textColor:(UIColor *)tColor - textFont:(UIFont *)tFont; - -- (void)showInfoBarWithMessage:(NSString *)message; -- (void)hideInfoBarWithMessage:(NSString *)message; -- (void)hideInfoBarImmediately; - -@end diff --git a/InfoBar/JBInfoBarManager.m b/InfoBar/JBInfoBarManager.m deleted file mode 100644 index addb6a7..0000000 --- a/InfoBar/JBInfoBarManager.m +++ /dev/null @@ -1,108 +0,0 @@ -// -// JBInfoBarManager.m -// InfoBar -// -// Created by Junior on 02/03/2011. -// Copyright 2011 __MyCompanyName__. All rights reserved. -// - -#import "JBInfoBarManager.h" - -static JBInfoBarManager *sharedJBInfoBarManager = nil; - -@implementation JBInfoBarManager - -@synthesize infoBar; - -#pragma mark Init - -- (id)init { - self = [super init]; - if (self) { - infoBar = nil; - } - return self; -} - -#pragma mark - -#pragma mark Manager - -- (void)initInfoBarWithFrame:(CGRect)frame - backgroundColor:(UIColor *)bColor - textColor:(UIColor *)tColor - textFont:(UIFont *)tFont { - if (infoBar) { - [infoBar removeFromSuperview]; - [infoBar release], infoBar = nil; - } - infoBar = [[JBInfoBar alloc] initWithFrame:frame - backgroundColor:bColor - textColor:tColor - textFont:tFont]; -} - -- (void)showInfoBarWithMessage:(NSString *)message { - [infoBar showBarWithMessage:message]; -} - -- (void)hideInfoBarWithMessage:(NSString *)message { - [infoBar hideBarWithMessage:message]; -} - -- (void)hideInfoBar { - [infoBar hideBarWithMessage:nil]; -} - -- (void)hideInfoBarImmediately { - [infoBar hideBarImmediately]; -} - -#pragma mark - -#pragma mark Singleton - -+ (JBInfoBarManager *)sharedManager -{ - @synchronized(self) { - if (sharedJBInfoBarManager == nil) { - sharedJBInfoBarManager = [[super alloc] init]; - } - } - return sharedJBInfoBarManager; -} - -+ (id)allocWithZone:(NSZone *)zone -{ - @synchronized(self) { - if (sharedJBInfoBarManager == nil) { - sharedJBInfoBarManager = [super allocWithZone:zone]; - return sharedJBInfoBarManager; - } - } - return nil; -} - -- (id)copyWithZone:(NSZone *)zone -{ - return self; -} - -- (id)retain -{ - return self; -} - -- (NSUInteger)retainCount -{ - return NSUIntegerMax; //denotes an object that cannot be released -} - -- (oneway void)release -{ - //do nothing -} - -- (id)autorelease -{ - return self; -} -@end diff --git a/README b/README.md similarity index 97% rename from README rename to README.md index aa018ef..3cc3afd 100644 --- a/README +++ b/README.md @@ -1,11 +1,13 @@ -=== INFO === +INFO +==== InfoBar is a simple bar useful in apps that have tasks that run in backgrouns (like file download or updates). The goal is showing messages above the TabBar in an asynchronous way. To implement the InfoBar please copy JBInfoBar.h and JBInfoBar.m and add it to the delegate. -=== LICENSE === +LICENSE +======= InfoBar is released under MIT License Copyright (c) 2011 Junior B. - ThinkDiff.ch diff --git a/Icon.png b/Resources/Icon.png similarity index 100% rename from Icon.png rename to Resources/Icon.png diff --git a/Icon@2x.png b/Resources/Icon@2x.png similarity index 100% rename from Icon@2x.png rename to Resources/Icon@2x.png