简体   繁体   English

使用textview将光标移至下一行

[英]Cursor move to the next line using textview

Hi friends I am trying to move curser move to the next line. 嗨,朋友们,我正在尝试将光标移动到下一行。 it is worked but when I enter a character in textview curser again back to first line. 它是可行的,但是当我在textview curser中再次输入字符时,回到第一行。 please help me any one. 请任何人帮助我。 I am writing below code. 我正在写下面的代码。

if (textView == mailBodyTxtVew)
    {

        textView.text= [textView.text stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
        //[textView resignFirstResponder];
       // return NO;
    }
textView.text= [textView.text stringByAppendingString:@"\n"];

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在文本视图中插入图像后,如何将光标下一行移动/跳转到图像视图 - How to move/jump the cursor next line to the image view after inserting image with in the text view 横线后textview光标位置已更改 - textview cursor position changed after horizontal line 如何以编程方式将光标移动到下一个UITextField? - How to move the cursor to next UITextField programmatically? 在 Objective-C 中加载时将光标移动到预填充文本视图的开头 - Move Cursor to Beginning of Prepopulated Textview On Load in Objective-C 将光标移动到下一个UITextField,而无需在iOS中单击下一步 - move cursor to next UITextField without click on next in iOS 如何将插入符号(光标)移动到可可中的行尾 - How to move caret (cursor) to the end of the line in cocoa 如何使用TextView在表格视图中移动到下一个单元格/行 - how to move to next cell/row in table view with textview 避免当光标在同一行上时textview增长,顶部键盘上的textview,ios - avoid textview growing when cursor is on the same line, textview on top keyboard, ios 如何使用箭头键移动鼠标光标 - How to move the mouse cursor by using arrow keys 当光标转到下一行时,如何将UITextView的子视图按一行的大小移动? - How to shift subview of UITextView by size of one line when cursor goes to next line?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM