2013-10-23 94 views
0

我有酥料餅在我的iPhone項目:隱藏/關閉ViewControllers

popover screenshot

這都說明了,當我在一個小圖片請點擊:

-(void)tapDetected:(UITapGestureRecognizer *)sender 
{ 
    UIImageView *iboImageView = sender.view; 
    UITableView *tableView = (UITableView *)iboTableView; 
    NSIndexPath *index = [NSIndexPath indexPathWithIndex:iboImageView.tag]; 
    MovieCell *cell = (MovieCell *)[tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:iboImageView.tag inSection:0]]; 
    [ApplicationManager getInstance].currentMovie=cell.nameLabel.text; 

    DemoTableController *controller = [[DemoTableController alloc] initWithStyle:UITableViewStylePlain]; //This is my popover controller (what is displayed inside popover) 
    FPPopoverController *popover = [[FPPopoverController alloc] initWithViewController:controller]; 
    popover.contentSize = CGSizeMake(150,158); 
    [popover presentPopoverFromView:cell.iboPopImage]; 
} 

當我按下一個細胞我想摺疊popover。有沒有像self.close

+0

您需要查看您正在使用的'FPPopoverController'庫... – Wain

回答

3

從FPPopoverController.h文件:

/** @brief Dismiss the popover **/ 
-(void)dismissPopoverAnimated:(BOOL)animated; 

/** @brief Dismiss the popover with completion block for post-animation cleanup **/ 
typedef void (^FPPopoverCompletion)(); 
-(void)dismissPopoverAnimated:(BOOL)animated completion:(FPPopoverCompletion)completionBlock; 

使用以下任一方法辭退控制器。