我的iPhone项目上有一个Popover:
当我点击一张小图片时,会显示出来:
-(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];
}
当我按下一个单元格时,我想要折叠弹出窗口。是否有类似self.close
的内容?
答案 0 :(得分: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;
使用以下任何一种方法来关闭控制器。