如何跳转到scrollView的特定部分
大家好: 我有一个滚动视图,其中水平填充了一些 uibuttons。这些按钮的标题中实际上包含我的文本内容,并且按字母顺序排列。由于内容相当多,因此如果用户想从“A”到达“H”,则必须滚动滚动,我想知道如何使用户能够根据字母排序跳转到特定区域..就像这样发生在联系人应用程序中。将会写入字母表,当用户点击任何字母表时,scrollView 会滚动到以该字符开头的第一个按钮。任何想法....
Hello Guys:
I have a scrollView in which I've populated some uibuttons horizontally. The buttons actually have my text content in their title and are arranged alphabetically. As the content is quite much so user have to scroll n scroll if he wants to get to "H" from "A", I wanna know that how can i enable user to jump to a particular area depending on alphabet sorting.. like that happen in contacts app. There 'll be alphabets written and when user hits any alphabet scrollView scrolls to the first button starting with that character. Any ideas ....
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看看 -[UIScrollView setContentOffset:animated:]
Take a look at -[UIScrollView setContentOffset:animated:]