UIScrollView 不滚动到最后?
UIScrollView don't scroll to the end?
- (void)viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated];
CGFloat w = self.contentScrollView.bounds.size.width;
CGFloat contentoffSetx = self.childViewControllers.count * w;
self.contentScrollView.contentSize = CGSizeMake(contentoffSetx, 0);
}
我对 self.contentScrollView 有一些看法。但是我无法将 self.contentScrollView 滚动到 self.childViewControllers.lastObject.view
.
self.contentScrollView.contentSize
不够大??
- (void)viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated];
CGFloat w = [UIScreen mainScreen].bounds.size.width;
CGFloat contentoffSetx = self.childViewControllers.count * w;
self.contentScrollView.contentSize = CGSizeMake(contentoffSetx, 0);
}
- (void)viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated];
CGFloat w = self.contentScrollView.bounds.size.width;
CGFloat contentoffSetx = self.childViewControllers.count * w;
self.contentScrollView.contentSize = CGSizeMake(contentoffSetx, 0);
}
我对 self.contentScrollView 有一些看法。但是我无法将 self.contentScrollView 滚动到 self.childViewControllers.lastObject.view
.
self.contentScrollView.contentSize
不够大??
- (void)viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated];
CGFloat w = [UIScreen mainScreen].bounds.size.width;
CGFloat contentoffSetx = self.childViewControllers.count * w;
self.contentScrollView.contentSize = CGSizeMake(contentoffSetx, 0);
}