Я сейчас строю проект, используя Three20 (v 1.0.4) . Он строит и работает без ошибок и предупреждений. Это просто AppDelegate и класс TTLauncher.
AppDelegate.h
#import <Three20/Three20.h>
@interface AppDelegate : NSObject <UIApplicationDelegate>
{
}
@end
AppDelegate.m
#import "AppDelegate.h"
#import "LauncherController.h"
@implementation AppDelegate
//=============================================================
// UIApplicationDelegate
- (void)applicationDidFinishLaunching:(UIApplication*)application
{
TTNavigator* navigator = [TTNavigator navigator];
navigator.persistenceMode = TTNavigatorPersistenceModeAll;
TTURLMap* map = navigator.URLMap;
[map from:@"*" toViewController:[TTWebController class]];
[map from:@"tt://launcher" toViewController:[LauncherController class]];
[navigator openURLAction:[TTURLAction actionWithURLPath:@"tt://launcher"]];
}
- (BOOL)application:(UIApplication*)application handleOpenURL:(NSURL*)URL
{
[[TTNavigator navigator] openURLAction:[TTURLAction actionWithURLPath:URL.absoluteString]];
return YES;
}
@end
LauncherController.h
#import <Three20/Three20.h>
@interface LauncherController : TTViewController <TTLauncherViewDelegate>
{
TTLauncherView* _launcherView;
}
@end
LauncherController.m
#import "LauncherController.h"
@implementation LauncherController
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])
{
self.title = @"Launcher Screen";
}
return self;
}
- (void)dealloc
{
[super dealloc];
}
- (void)loadView
{
[super loadView];
_launcherView = [[TTLauncherView alloc] initWithFrame:self.view.bounds];
_launcherView.backgroundColor = [UIColor whiteColor];
_launcherView.delegate = self;
_launcherView.columnCount = 2;
_launcherView.pages =
[NSArray arrayWithObjects:
[[[TTLauncherItem alloc] initWithTitle:@"New Position" image:@"bundle://ic_positions2.png" URL:nil] autorelease], nil];
[self.view addSubview:_launcherView];
}
- (void)launcherView:(TTLauncherView*)launcher didSelectItem:(TTLauncherItem*)item {
}
- (void)launcherViewDidBeginEditing:(TTLauncherView*)launcher {
[self.navigationItem setRightBarButtonItem:[[[UIBarButtonItem alloc]
initWithBarButtonSystemItem:UIBarButtonSystemItemDone
target:_launcherView action:@selector(endEditing)] autorelease] animated:YES];
}
- (void)launcherViewDidEndEditing:(TTLauncherView*)launcher {
[self.navigationItem setRightBarButtonItem:nil animated:YES];
}
@end
Есть мысли о том, почему у меня появился следующий экран?