【发布时间】:2013-08-24 17:58:27
【问题描述】:
我正在开发一个小型 iOS 应用,但在视图控制器的导航中遇到了问题。 这是我的代码(我从网上得到的):
- (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath: (NSIndexPath *)indexPath
{
DetailsViewController *page = [[DetailsViewController alloc] init];
CGRect theFrame = page.view.frame;
theFrame.origin = CGPointMake(self.view.frame.size.width, 0);
page.view.frame = theFrame;
theFrame.origin = CGPointMake(0,0);
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:0.2f];
page.view.frame = theFrame;
[UIView commitAnimations];
[self.view addSubview:page.view];
}
我可以通过它导航到新的视图控制器。这工作正常,但我现在需要在点击按钮后回到我原来的控制器。这就是我卡住的地方,我没有使用任何导航控制器,而且是 iOS 新手。 如果你们中的任何人知道如何以更好的方式做到这一点,那将是很高兴听到它!
【问题讨论】:
-
你想设置类似导航推送弹出的动画吗?
-
@iPatel 他没有使用 navigationController
-
他还说我卡住了,我没有使用任何导航控制器,请阅读
-
@NitinGohel- 是的,兄弟。你是对的:)
-
@Gaurav 你必须对给出你问题答案的人的答案做出回应。
标签: ios