Permalink
Browse files

Initial Commit

  • Loading branch information...
0 parents commit a897280f5d8b5bdaa18c249de858a248dbcdc6bc @jinthagerman jinthagerman committed Feb 20, 2012
Showing with 1,701 additions and 0 deletions.
  1. +1 −0 .gitignore
  2. +15 −0 Classes/AppDelegate.h
  3. +80 −0 Classes/AppDelegate.m
  4. +13 −0 Classes/FifthViewController.h
  5. +29 −0 Classes/FifthViewController.m
  6. +13 −0 Classes/FirstViewController.h
  7. +24 −0 Classes/FirstViewController.m
  8. +13 −0 Classes/FourthViewController.h
  9. +29 −0 Classes/FourthViewController.m
  10. +47 −0 Classes/JBTabBarController-Info.plist
  11. +15 −0 Classes/JBTabBarController-Prefix.pch
  12. +13 −0 Classes/SecondViewController.h
  13. +29 −0 Classes/SecondViewController.m
  14. +13 −0 Classes/ThirdViewController.h
  15. +39 −0 Classes/ThirdViewController.m
  16. +2 −0 Classes/en.lproj/InfoPlist.strings
  17. +18 −0 Classes/main.m
  18. BIN Extras/At.png
  19. +14 −0 Extras/At.svg
  20. BIN Extras/Brain.png
  21. +38 −0 Extras/Brain.svg
  22. BIN Extras/Elephant.png
  23. +5 −0 Extras/Elephant.svg
  24. BIN Extras/Fist.png
  25. +49 −0 Extras/Fist.svg
  26. BIN Extras/Levitate.png
  27. +5 −0 Extras/Levitate.svg
  28. BIN Extras/iOSTabBarItemImageLayerStyles.asl
  29. +38 −0 JBTabBarController/JBTabBar.h
  30. +161 −0 JBTabBarController/JBTabBar.m
  31. +13 −0 JBTabBarController/JBTabBarButton.h
  32. +57 −0 JBTabBarController/JBTabBarButton.m
  33. +27 −0 JBTabBarController/JBTabBarController.h
  34. +133 −0 JBTabBarController/JBTabBarController.m
  35. +15 −0 JBTabBarController/UITabBarItem+JBAdditions.h
  36. +24 −0 JBTabBarController/UITabBarItem+JBAdditions.m
  37. +461 −0 JBTabBarControllerExample.xcodeproj/project.pbxproj
  38. +7 −0 JBTabBarControllerExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata
  39. BIN ...le.xcodeproj/project.xcworkspace/xcuserdata/gbudelmann.xcuserdatad/UserInterfaceState.xcuserstate
  40. +10 −0 ...mple.xcodeproj/project.xcworkspace/xcuserdata/gbudelmann.xcuserdatad/WorkspaceSettings.xcsettings
  41. +133 −0 ...arControllerExample.xcodeproj/xcuserdata/gbudelmann.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist
  42. +84 −0 ...rExample.xcodeproj/xcuserdata/gbudelmann.xcuserdatad/xcschemes/JBTabBarControllerExample.xcscheme
  43. +27 −0 ...rControllerExample.xcodeproj/xcuserdata/gbudelmann.xcuserdatad/xcschemes/xcschememanagement.plist
  44. +7 −0 README
  45. BIN Resources/TabBar Images/bg-selected.png
  46. BIN Resources/TabBar Images/bg-selected@2x.png
  47. BIN Resources/TabBar Images/bg.png
  48. BIN Resources/TabBar Images/bg@2x.png
  49. BIN Resources/TabBar Item Images/At-selected.png
  50. BIN Resources/TabBar Item Images/At-selected@2x.png
  51. BIN Resources/TabBar Item Images/At-unselected.png
  52. BIN Resources/TabBar Item Images/At-unselected@2x.png
  53. BIN Resources/TabBar Item Images/Brain-selected.png
  54. BIN Resources/TabBar Item Images/Brain-selected@2x.png
  55. BIN Resources/TabBar Item Images/Brain-unselected.png
  56. BIN Resources/TabBar Item Images/Brain-unselected@2x.png
  57. BIN Resources/TabBar Item Images/Elephant-selected.png
  58. BIN Resources/TabBar Item Images/Elephant-selected@2x.png
  59. BIN Resources/TabBar Item Images/Elephant-unselected.png
  60. BIN Resources/TabBar Item Images/Elephant-unselected@2x.png
  61. BIN Resources/TabBar Item Images/Fist-selected.png
  62. BIN Resources/TabBar Item Images/Fist-selected@2x.png
  63. BIN Resources/TabBar Item Images/Fist-unselected.png
  64. BIN Resources/TabBar Item Images/Fist-unselected@2x.png
  65. BIN Resources/TabBar Item Images/Levitate-selected.png
  66. BIN Resources/TabBar Item Images/Levitate-selected@2x.png
  67. BIN Resources/TabBar Item Images/Levitate-unselected.png
  68. BIN Resources/TabBar Item Images/Levitate-unselected@2x.png
@@ -0,0 +1 @@
+.DS_Store
@@ -0,0 +1,15 @@
+//
+// JBAppDelegate.h
+// JBTabBarController
+//
+// Created by Jin Budelmann on 3/02/12.
+// Copyright (c) 2012 BitCrank. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface AppDelegate : UIResponder <UIApplicationDelegate>
+
+@property (strong, nonatomic) UIWindow *window;
+
+@end
@@ -0,0 +1,80 @@
+//
+// JBAppDelegate.m
+// JBTabBarController
+//
+// Created by Jin Budelmann on 3/02/12.
+// Copyright (c) 2012 BitCrank. All rights reserved.
+//
+
+#import "AppDelegate.h"
+#import "JBTabBarController.h"
+
+#import "FirstViewController.h"
+#import "SecondViewController.h"
+#import "ThirdViewController.h"
+#import "FourthViewController.h"
+#import "FifthViewController.h"
+
+@implementation AppDelegate
+
+@synthesize window = _window;
+
+- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
+{
+ self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
+ // Override point for customization after application launch.
+ JBTabBarController* tabBarController = [[JBTabBarController alloc] init];
+ tabBarController.viewControllers = [NSArray arrayWithObjects:[[UINavigationController alloc] initWithRootViewController:[[FirstViewController alloc] init]],
+ [[UINavigationController alloc] initWithRootViewController:[[SecondViewController alloc] init]],
+ [[UINavigationController alloc] initWithRootViewController:[[ThirdViewController alloc] init]],
+ [[UINavigationController alloc] initWithRootViewController:[[FourthViewController alloc] init]],
+ [[UINavigationController alloc] initWithRootViewController:[[FifthViewController alloc] init]],
+ nil];
+
+
+ self.window.rootViewController = tabBarController;
+
+ [self.window makeKeyAndVisible];
+ return YES;
+}
+
+- (void)applicationWillResignActive:(UIApplication *)application
+{
+ /*
+ Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
+ Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
+ */
+}
+
+- (void)applicationDidEnterBackground:(UIApplication *)application
+{
+ /*
+ Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
+ If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
+ */
+}
+
+- (void)applicationWillEnterForeground:(UIApplication *)application
+{
+ /*
+ Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
+ */
+}
+
+- (void)applicationDidBecomeActive:(UIApplication *)application
+{
+ /*
+ Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
+ */
+}
+
+- (void)applicationWillTerminate:(UIApplication *)application
+{
+ /*
+ Called when the application is about to terminate.
+ Save data if appropriate.
+ See also applicationDidEnterBackground:.
+ */
+}
+
+@end
@@ -0,0 +1,13 @@
+//
+// FifthViewController.h
+// JBTabBarControllerExample
+//
+// Created by Jin Budelmann on 20/02/12.
+// Copyright (c) 2012 BitCrank. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface FifthViewController : UIViewController
+
+@end
@@ -0,0 +1,29 @@
+//
+// FifthViewController.m
+// JBTabBarControllerExample
+//
+// Created by Jin Budelmann on 20/02/12.
+// Copyright (c) 2012 BitCrank. All rights reserved.
+//
+
+#import "FifthViewController.h"
+
+@implementation FifthViewController
+
+- (id)init
+{
+ self = [super init];
+ if (self) {
+ self.title = @"Levitate";
+ self.tabBarItem.image = [UIImage imageNamed:@"Levitate-unselected"];
+ self.tabBarItem.selectedImage = [UIImage imageNamed:@"Levitate-selected"];
+ }
+ return self;
+}
+
+- (void)viewDidLoad {
+ self.view.backgroundColor = [UIColor purpleColor];
+}
+
+
+@end
@@ -0,0 +1,13 @@
+//
+// FirstViewController.h
+// JBTabBarController
+//
+// Created by Jin Budelmann on 3/02/12.
+// Copyright (c) 2012 BitCrank. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface FirstViewController : UIViewController
+
+@end
@@ -0,0 +1,24 @@
+//
+// FirstViewController.m
+// JBTabBarController
+//
+// Created by Jin Budelmann on 3/02/12.
+// Copyright (c) 2012 BitCrank. All rights reserved.
+//
+
+#import "FirstViewController.h"
+
+@implementation FirstViewController
+
+- (id)init
+{
+ self = [super init];
+ if (self) {
+ self.title = @"At";
+ self.tabBarItem.image = [UIImage imageNamed:@"At-unselected"];
+ self.tabBarItem.selectedImage = [UIImage imageNamed:@"At-selected"];
+ }
+ return self;
+}
+
+@end
@@ -0,0 +1,13 @@
+//
+// FourthViewController.h
+// JBTabBarControllerExample
+//
+// Created by Jin Budelmann on 20/02/12.
+// Copyright (c) 2012 BitCrank. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface FourthViewController : UIViewController
+
+@end
@@ -0,0 +1,29 @@
+//
+// FourthViewController.m
+// JBTabBarControllerExample
+//
+// Created by Jin Budelmann on 20/02/12.
+// Copyright (c) 2012 BitCrank. All rights reserved.
+//
+
+#import "FourthViewController.h"
+
+@implementation FourthViewController
+
+- (id)init
+{
+ self = [super init];
+ if (self) {
+ self.title = @"Fist";
+ self.tabBarItem.image = [UIImage imageNamed:@"Fist-unselected"];
+ self.tabBarItem.selectedImage = [UIImage imageNamed:@"Fist-selected"];
+ }
+ return self;
+}
+
+- (void)viewDidLoad {
+ self.view.backgroundColor = [UIColor orangeColor];
+}
+
+
+@end
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>en</string>
+ <key>CFBundleDisplayName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIconFiles</key>
+ <array/>
+ <key>CFBundleIdentifier</key>
+ <string>bitcrank.${PRODUCT_NAME:rfc1034identifier}</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+ <key>LSRequiresIPhoneOS</key>
+ <true/>
+ <key>UIRequiredDeviceCapabilities</key>
+ <array>
+ <string>armv7</string>
+ </array>
+ <key>UISupportedInterfaceOrientations</key>
+ <array>
+ <string>UIInterfaceOrientationPortrait</string>
+ <string>UIInterfaceOrientationLandscapeLeft</string>
+ <string>UIInterfaceOrientationLandscapeRight</string>
+ </array>
+ <key>UISupportedInterfaceOrientations~ipad</key>
+ <array>
+ <string>UIInterfaceOrientationPortrait</string>
+ <string>UIInterfaceOrientationPortraitUpsideDown</string>
+ <string>UIInterfaceOrientationLandscapeLeft</string>
+ <string>UIInterfaceOrientationLandscapeRight</string>
+ </array>
+</dict>
+</plist>
@@ -0,0 +1,15 @@
+//
+// Prefix header for all source files of the 'JBTabBarController' target in the 'JBTabBarController' project
+//
+
+#import <Availability.h>
+
+#ifndef __IPHONE_3_0
+#warning "This project uses features only available in iOS SDK 3.0 and later."
+#endif
+
+#ifdef __OBJC__
+ #import <UIKit/UIKit.h>
+ #import <Foundation/Foundation.h>
+ #import "UITabBarItem+JBAdditions.h"
+#endif
@@ -0,0 +1,13 @@
+//
+// SecondViewController.h
+// JBTabBarController
+//
+// Created by Jin Budelmann on 3/02/12.
+// Copyright (c) 2012 BitCrank. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface SecondViewController : UIViewController
+
+@end
@@ -0,0 +1,29 @@
+//
+// SecondViewController.m
+// JBTabBarController
+//
+// Created by Jin Budelmann on 3/02/12.
+// Copyright (c) 2012 BitCrank. All rights reserved.
+//
+
+#import "SecondViewController.h"
+
+@implementation SecondViewController
+
+- (id)init
+{
+ self = [super init];
+ if (self) {
+ self.title = @"Brain";
+ self.tabBarItem.image = [UIImage imageNamed:@"Brain-unselected"];
+ self.tabBarItem.selectedImage = [UIImage imageNamed:@"Brain-selected"];
+ }
+ return self;
+}
+
+- (void)viewDidLoad {
+ self.view.backgroundColor = [UIColor blueColor];
+}
+
+
+@end
@@ -0,0 +1,13 @@
+//
+// ThirdViewController.h
+// JBTabBarController
+//
+// Created by Jin Budelmann on 3/02/12.
+// Copyright (c) 2012 BitCrank. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface ThirdViewController : UITableViewController
+
+@end
@@ -0,0 +1,39 @@
+//
+// ThirdViewController.m
+// JBTabBarController
+//
+// Created by Jin Budelmann on 3/02/12.
+// Copyright (c) 2012 BitCrank. All rights reserved.
+//
+
+#import "ThirdViewController.h"
+
+@implementation ThirdViewController
+
+- (id)init
+{
+ self = [super init];
+ if (self) {
+ self.title = @"Elephant";
+ self.tabBarItem.image = [UIImage imageNamed:@"Elephant-unselected"];
+ self.tabBarItem.selectedImage = [UIImage imageNamed:@"Elephant-selected"];
+ }
+ return self;
+}
+
+- (UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
+ UITableViewCell* cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:@"test"];
+ cell.detailTextLabel.text = @"Test Cell";
+ cell.textLabel.text = [NSString stringWithFormat:@"cell %@",indexPath];
+ return cell;
+}
+
+- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
+ return 1;
+}
+
+- (NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+ return 30;
+}
+
+@end
@@ -0,0 +1,2 @@
+/* Localized versions of Info.plist keys */
+
Oops, something went wrong.

0 comments on commit a897280

Please sign in to comment.