myLauncher is a lightweight open source Objective-C library that allows you to add a iPhone like launcher into your iPhone app.
If you would like to ask questions about myLauncher, post your question to myLauncher's google group:
Google Group - http://groups.google.com/group/mylauncher
These steps assume you understand the basics of iOS application development. Follow the following steps in order to add myLauncher into your project:
-
Clone the myLauncher repository: 'git clone git://github.com/rigoneri/mylauncher.git'
-
Locate the MyLauncher folder under '../myLauncher/myLauncher/Classes/'
- Copy the MyLauncher folder into your project folder.
- Import all the files within that folder into your Xcode project.
-
Locate the RootViewController files under '../myLauncher/myLauncher/'
- Copy RootViewController.h and RootViewController.m into your project folder
- Import both files into your Xcode project.
-
In your application delegate header file make the following changes (AppDelegate.h):
-
Import the RootViewController header file:
#import "RootViewController.h"
-
Add appControllers instance variable:
NSMutableDictionary *appControllers;
-
Add the property declaration for appControllers:
@property (nonatomic, retain) NSMutableDictionary *appControllers;
-
-
In your application delegate implementation file make the following changes (AppDelegate.m):
-
Import your view controllers before the @implementation block, for example:
#import "ItemViewController.h"
-
Inside the implementation block synthesize appControllers:
@synthesize appControllers;
-
Inside applicationDidFinishLaunching add your ItemViewController into appControllers:
appControllers = [[NSMutableDictionary alloc] init]; [appControllers setObject:[ItemViewController class] forKey:@"ItemViewController"];
-
Also inside applicationDidFinishLaunching modify your UINavigationController to initialize with RootViewController:
navigationController = [[UINavigationController alloc] initWithRootViewController:[[[RootViewController alloc] init] autorelease]];
-
Inside dealloc release appControllers
[appControllers release];
-
-
In your prefix file make the following changes (AppName_Prefix.pch):
-
Inside the ifdef import the app delegate, for example:
#import "AppDelegate.h"
-
Outside the ifdef define the shortcut for color:
#define COLOR(r,g,b) [UIColor colorWithRed:r/255.0 green:g/255.0 blue:b/255.0 alpha:1]
-
-
IMPORTANT: You will need to make the necessary changes inside the application delegate and RootViewController in order to have the correct icons and in order to load the correct view controllers.
I'm currently working on one app that will be using myLauncher. Let me know if you use myLauncher in your app so I can add it to this list.
Follow me on twitter @rigoneri
Checkout my apps at rigoneri.com