ポップオーバーに関する簡単な質問です。ポップビューから何かを選択したときにポップビューを閉じる方法を把握していないようです(テーブルビュー)
だから私は UIPopoverController を使用してポップアップするテーブルビューにリスト項目を持っているので、アイテムを選択すると、ポップオフしてフェードアウトしたいと思います。
MainViewController
- (IBAction)popoverFontName:(id)sender
CGRect popoverRect = [self.view convertRect:[popoverFontName frame]
fromView:[popoverFontName superview]];
TitleController *titleC=[[TitleController alloc]init];
popup =[[UIPopoverController alloc]initWithContentViewController:titleC];
[popup presentPopoverFromRect:popoverRect inView:self.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
[popup setPopoverContentSize:CGSizeMake(50.0, 300.0)];
[titleC release];
}
タイトルコントローラー
- (void)tableView:(UITableView *)tableView
didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
NSString *selectedLang = [titleList objectAtIndex:indexPath.row];
//Initialize the detail view controller and display it.
MyDetViewCont *myDetViewCont = [[MyDetViewCont alloc] initWithNibName:@"myDetViewCont" bundle:[NSBundle mainBundle]]; // view controller instance
}
タイトルコントローラーで、ポップオーバーを閉じる方法がわかりません