How to stop a UILabel scrolling?

拜拜、爱过 提交于 2019-12-25 03:28:14

问题


I have several UILabels. I setup a UIScrollView within a app that works fine. The problem that I'm having is I want some UILabels to scroll and some to remain frozen. I don't think this is a coding problem as much as a interface builder issue.


回答1:


You can simply add the UILabel as subView of scrollView which you want to scroll. And add the UILabel as subView of self.view which you dont want to scroll.




回答2:


If you mean you want the labels to be fixed on top of the scrollview, then simply drag them out in interface builder so they're at the same level in the hierarchy and not inside of the scrollview.



来源:https://stackoverflow.com/questions/6839031/how-to-stop-a-uilabel-scrolling

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!