mirror of
https://github.com/zhigang1992/ZGExpandZoomView.git
synced 2026-01-12 16:52:47 +08:00
Using layout subviews instead of will appear
This commit is contained in:
@@ -26,12 +26,12 @@ static CGFloat kImageOriginHight = 240.f;
|
||||
[self.tableView addSubview:self.expandZoomImageView];
|
||||
}
|
||||
|
||||
- (void)viewWillAppear:(BOOL)animated{
|
||||
[super viewWillAppear:animated];
|
||||
|
||||
- (void)viewWillLayoutSubviews {
|
||||
[super viewWillLayoutSubviews];
|
||||
self.expandZoomImageView.frame = CGRectMake(0, -kImageOriginHight, self.tableView.frame.size.width, kImageOriginHight);
|
||||
}
|
||||
|
||||
|
||||
- (void)scrollViewDidScroll:(UIScrollView *)scrollView{
|
||||
CGFloat yOffset = scrollView.contentOffset.y;
|
||||
if (yOffset < -kImageOriginHight) {
|
||||
|
||||
Reference in New Issue
Block a user