【发布时间】:2014-02-25 03:37:25
【问题描述】:
我从我的 ViewController.m 中调用它
当我从弹出窗口中选择一行时,我试图调用下面的控制器
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
...
TSPopoverController *dismiss = [[TSPopoverController alloc]init];
[dismiss dismissPopoverAnimatd:YES];
}
在类中找到:TSPopoverController.m
- (void) dismissPopoverAnimatd:(BOOL)animated
{
if (self.view) {
if(animated) {
[UIView animateWithDuration:0.2
delay:0.0
options:UIViewAnimationOptionAllowAnimatedContent
animations:^{
popoverView.alpha = 0;
}
completion:^(BOOL finished) {
[self.contentViewController viewDidDisappear:animated];
popoverView=nil;
[self.view removeFromSuperview];
self.contentViewController = nil;
self.titleText = nil;
self.titleColor = nil;
self.titleFont = nil;
}
];
}else{
[self.contentViewController viewDidDisappear:animated];
popoverView=nil;
[self.view removeFromSuperview];
self.contentViewController = nil;
self.titleText = nil;
self.titleColor = nil;
self.titleFont = nil;
}
}
}
当我尝试调用该方法时:
- (void) dismissPopoverAnimatd:(BOOL)animated
什么都没有发生。当我在 popovertable 中做出选择时,谁能指出我如何让这个 popOverView 消失的正确方向?
【问题讨论】:
标签: objective-c xcode uitableview