안녕하세요 저는 three20에 newbee입니다. "SettingsViewController setOriginalNavigatorURL 인식 할 수없는 셀렉터가 전송되었습니다."예외가 발생합니다. 내 앱에 내비게이션 컨트롤러가 이미있는 경우 TTLauncherView를 어떻게 사용합니까?Three20 : TTLauncherView를 사용하여 presentModalViewController 던지고 setOriginalNavigatorURL 던지고 인식 할 수없는 선택기
UINavigationController 내에 UITableViewController가 있습니다. 표에서 "설정"행을 선택하면 실행기를 시작하고 싶습니다. 다음은 내가 무엇을했는지이다 : 나는 TTLauncherView을 만든 경우에는 loadView와의 UIViewController을하고 SettingsViewController에 하위 뷰로 추가 :
- (void)tableView:(UITableView *)tableView
didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
switch ([indexPath row]){
case 0:
[self launchSettings];
break;
// ....
}
-(void)launchSettings
{
TTNavigator* navigator = [TTNavigator navigator];
navigator.persistenceMode = TTNavigatorPersistenceModeAll;
TTURLMap* map = navigator.URLMap;
[map from:@"*" toViewController:[TTWebController class]];
[map from:@"tt://launcher/" toViewController:
[SettingsViewController class]];
if (![navigator restoreViewControllers]) {
[navigator openURLAction:
[TTURLAction actionWithURLPath:@"tt://launcher"]];
}
[self presentModalViewController:[navigator openURLAction:
[TTURLAction actionWithURLPath:@"tt://launcher"]] animated:YES];
}
은 내가 SettingsViewController이
- (void)loadView {
[super loadView];
TTLauncherView* launcherView = [[TTLauncherView alloc]
initWithFrame:self.view.bounds];
launcherView.backgroundColor = [UIColor blackColor];
launcherView.columnCount = 4;
launcherView.pages = [NSArray arrayWithObjects:
[NSArray arrayWithObjects:
[self launcherItemWithTitle:@"Google"
image:@"bundle://safari_logo.png"
URL:@"http://google.com"],
[self launcherItemWithTitle:@"Apple"
image:@"bundle://safari_logo.png"
URL:@"http://apple.com"]
, nil]
, nil];
[self.view addSubview:launcherView];
[launcherView release];
}
- (TTLauncherItem *)launcherItemWithTitle:(NSString *)pTitle
image:(NSString *)image URL:(NSString *)url {
TTLauncherItem *launcherItem = [[TTLauncherItem alloc]
initWithTitle:pTitle
image:image
URL:url canDelete:YES];
return [launcherItem autorelease];
}
지적 해 주셔서 감사합니다. 네, 오타입니다. – savvybud