目标 C:返回第 1 页按钮
我有一个包含 25 页的滚动视图(已启用分页),我想在每个页面中放置一个“返回第 1 页”按钮,我该如何做到这一点?听起来很容易,但我不知道。
很抱歉问这样的问题,我知道这里很多人都比我更先进,我只是在寻求一些帮助。
I have a scrollview with 25 pages (pagingEnabled) and i want to put a "Back to Page 1" Button in each page, how will i able to do that? it sounds easy but i have no idea.
sorry for asking this kind of question i know a lot of people here are more advanced than me, i'm just looking for some help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
要返回第一页,只需将代码:
附加到按钮对应的
IBAction
方法即可。To go back to the first page, just attach the code:
to the
IBAction
method corresponding to the button.请参阅
NSView
的 -scrollRectToVisible:
方法。See
NSView
's -scrollRectToVisible:
method.您的按钮操作只需说明
Your button action just needs to say