Objective c 导航堆栈中的iOS 6情节串连板UITableView不会设置回动画
我在UINavigationController中嵌入了一个UITableViewController。我只在iOS 6中使用故事板。当我点击我的报告行时,我会得到一个很好的向右推的动画。当我按下“自动生成的后退”按钮时,我的导航标题会淡出并向左设置动画,但我的UITableView会突然出现。我的目标是让UITableview具有标准的后退动画,就像按下后退按钮时的标准动画一样。希望这是帮助我调试所需的相关代码。我完全不知所措。当我导航回导航树时,我在向下钻取的每个视图上都会看到相同的行为。它们都是UITableViewController子类 我无法发布我的故事板图片,直到我有更多的声誉点。如果需要帮助查看层次结构,我可以通过电子邮件向某人发送它的图片 我的故事板层次结构是:Objective c 导航堆栈中的iOS 6情节串连板UITableView不会设置回动画,objective-c,uinavigationcontroller,ios6,uitableview,Objective C,Uinavigationcontroller,Ios6,Uitableview,我在UINavigationController中嵌入了一个UITableViewController。我只在iOS 6中使用故事板。当我点击我的报告行时,我会得到一个很好的向右推的动画。当我按下“自动生成的后退”按钮时,我的导航标题会淡出并向左设置动画,但我的UITableView会突然出现。我的目标是让UITableview具有标准的后退动画,就像按下后退按钮时的标准动画一样。希望这是帮助我调试所需的相关代码。我完全不知所措。当我导航回导航树时,我在向下钻取的每个视图上都会看到相同的行为。它
UITabviewController
-UINavigationViewController
--ReportsVC
---AvaliableEquipmentVC
----AvaliableEquipmentDetailVC
报告svc.h
#import <UIKit/UIKit.h>
@interface ReportsVC : UITableViewController
@property (strong, nonatomic) NSMutableArray *reportList;
@end
在我的AvailableEquipmentVC中,除了查询JSON列表以获取TableView数据之外,我没有做任何特殊的事情。当我按下通过序列图像板自动生成的后退按钮时,我不会将动画返回到UITableViewController ReportsVC。好的,找出我的问题所在。在我最上面的对象TableViewController中,我有一个(void)ViewWillDisplay和一个(void)ViewDidDisplay方法。在这些方法中,我必须添加[super viewWillAppear:animated];以及[超级视图显示:动画];他们每个人都有一行。这导致动画再次开始工作。我忘了我把它们改写成自定义逻辑。你可以通过电子邮件给我发一张照片,我来看看。rdelmar@comcast.netJust寄来的。谢谢你看一看……对不起,我看不出有什么不对劲。如果你能寄给我整个项目,我可能会告诉你更多。好的。。。我明天需要去掉一些URL代码,然后才能这样做。如果明天下午我还不能弄清楚,我会把它寄给你的。再次感谢您抽出时间查看。。。
#import "ReportsVC.h"
#import "AvaliableEquipment.h"
@interface ReportsVC ()
@end
@implementation ReportsVC
- (id)initWithStyle:(UITableViewStyle)style
{
self = [super initWithStyle:style];
if (self) {
// Custom initialization
}
return self;
}
- (void)viewDidLoad
{
[super viewDidLoad];
self.reportList = [[NSMutableArray alloc] init];
// List Reports Here
[self.reportList addObject:@"Avaliable Equipment"];
[self.reportList addObject:@"Active Lease Business"];
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
#pragma mark - Table view data source
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
// Return the number of sections.
return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
// Return the number of rows in the section.
return [self.reportList count];
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"ReportNameCell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
UILabel *reportTitle = (UILabel *)[cell viewWithTag:100];
NSString *text = [self.reportList objectAtIndex:indexPath.row];
reportTitle.text = text;
return cell;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
switch (indexPath.row)
{
case 0: [self performSegueWithIdentifier:@"AvaliableEquipment" sender:nil]; break;
case 1: [self performSegueWithIdentifier:@"ActiveLeaseBusiness" sender:nil]; break;
}
}