ngui滚动指定位置
时间: 2023-10-13 17:04:43 浏览: 160
根据引用\[1\]和引用\[2\]的内容,可以使用UIScrollView的Scroll方法来实现NGUI的滚动到指定位置。首先,需要计算出需要滚动的距离,即scrollDelta。然后,使用scrollver.Scroll(-scrollDelta)来向下滚动到指定位置。最后,别忘了调用scrollver.UpdatePosition()来更新scrollview的位置,以确保滚动效果的正确显示。这样就可以实现NGUI的滚动到指定位置的功能。
#### 引用[.reference_title]
- *1* [NGUI 滚动到指定位置](https://blog.csdn.net/weixin_30482181/article/details/97507796)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [NGUI UIScrollView滚到指定的位置](https://blog.csdn.net/yanchezuo/article/details/40051059)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
- *3* [NGUI的ScrollView平滑移动到指定位置](https://blog.csdn.net/qq_33100967/article/details/51206083)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文