2
在iOS 8上面的代碼正常工作,但不是在iOS 7上,任何人都知道如何解決它?爲什麼我的CGAffineTransformMakeTranslation在iOS 7上不起作用?
- (void)scrollViewDidScroll:(UIScrollView *)scrollView{
// headerFixed is an UIView inside of a headerView, i wanna it to be fixed on Y:0
headerFixed.transform = CGAffineTransformMakeTranslation(0, MIN(scrollView.contentOffset.y, 0));
}
在iOS 8: https://www.youtube.com/watch?v=-428J20xbzM&feature=youtu.be
在iOS 7(BUG): https://www.youtube.com/watch?v=Dd_jh0zs1f0&feature=youtu.be
當你在7上運行這個時會發生什麼? – Chris
它滾動一半的tableView速度,並不停止在y0 –
看起來像我下面的解決方案工作,你會介意接受它嗎? –