
- (voID) scrollVIEwDIDScroll: (UIScrollVIEw *) scrollVIEw { CGRect bounds = scrollVIEw.bounds ; CGPoint scrollLoc = scrollVIEw.contentOffset ; NSLog(@"bounds: %@ offset:%@",NsstringFromCGRect(bounds),NsstringFromCGPoint(scrollLoc)) ;} 无论我做什么,滚动或旋转设备,似乎contentOffset和bounds.origin始终是相同的.
为什么我们需要一个contentOffset,如果它与bounds origin相同,或者两者实际上是不同的情况是什么?
解决方法 根据 docs:总结The contentOffset property is always the current location of the top-left corner of the scroll bounds,whether scrolling is in progress or not.
以上是内存溢出为你收集整理的ios – UIScrollView:contentOffset和bounds.origin有什么区别?全部内容,希望文章能够帮你解决ios – UIScrollView:contentOffset和bounds.origin有什么区别?所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)