-(void)showsearch:(id)sender
{
SearchViewController *searchview =[[SearchViewController alloc] initWithNibName:@"SearchViewController" bundle:nil];
settingpopoverController = [[[UIPopoverController alloc]
initWithContentViewController:searchview] autorelease];
[searchview release];
[settingpopoverController presentPopoverFromBarButtonItem:sender
permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
}
當我點擊按鈕,應用程序崩潰,我得到[UIPopoverController dealloc] reached while popover is still visible.
消息。popover仍然可見時
你似乎在混合*查看*和*控制器*。 SearchViewController是一個控制器,但你稱它爲一個視圖。 – Ross 2010-10-24 16:13:42