ios - 在 ios 4.3 + iphone sdk 的 textview 中自动滚动

标签 ios objective-c textview ios4

自动滚动发生在 ios 4.3 中,当调用 textViewShouldBeginEditing 方法时。 我想停止这种自动滚动。 目前滚动向上。

最佳答案

[txtview scrollRectToVisible:CGRectMake(0, txtview.contentSize.height-txtview.frame.size.height, txtview.frame.size.width, txtview.frame.size.height) animated:NO];

在 TextView 中设置此框架开始编辑。 并设置textview的y位置txtview.contentSize.height-txtview.frame.size.height
在 textview 中应该更改字符。

它有效..

关于ios - 在 ios 4.3 + iphone sdk 的 textview 中自动滚动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13696637/

相关文章:

php - 如何使用苹果推送通知 p12 证书文件通过代码设置 ios 平台?

ios - OpenGLES阴影体积

ios - 在 iOS 中创建和部署静态库时避免 header 冲突

objective-c - 要在 objective-c 中使用 UTType 要包含什么 header ?

android - 实现 'com.github.hakobast:dropdown-textview:0.3.1'

ios - AVPlayer seekToTime 下载大量消耗大量数据的媒体段文件

ios - 如何一次从 iTunes 购买所有从 iTunes 搜索 API 返回的歌曲?

ios - 我是否正确创建此 C 数组并将其传递给 Objective-C 方法并使用属性引用它?

android - 每个 InputType 常量的语义是什么?

java - 如何从 Activity 中编辑 fragment 中的textview