【发布时间】:2013-11-25 21:34:13
【问题描述】:
我目前有一个包含子 UIViewController (Child) 的父 ViewController。子 UIViewController 有一个 UITableView。在 Child.viewDidAppear 上,我调用 TableView.flashScrollIndicators。
由于某种原因,滚动指示器没有闪烁。我注意到如果我调用 dispatch_after ,第二遍会闪现。起初我以为是尺寸问题,但我不认为是这样。这似乎是一个布局问题(我使用的是 Storybards、iOS 7,并且没有 AutoLayout)。有什么想法吗?
这是我创建孩子的代码。
- (void)viewDidLoad {
[super viewDidLoad];
// add it to the heirarchy
if ([[self childViewControllers] count] == 0) {
[self setViewControllers:[[NSMutableArray alloc] init]];
ProductSelectionViewController *destination = (ProductSelectionViewController *)[[self storyboard] instantiateViewControllerWithIdentifier:@"ProductSelectionViewController"];
[self addChildViewController:destination];
// present the child
[destination didMoveToParentViewController:self];
[[self containerView] addSubview:[destination view]];
[[self viewControllers] addObject:destination];
[destination setDelegate:self];
}
}
【问题讨论】:
标签: ios uitableview uiviewcontroller