mono touch添加文本到新行,并将文本视图滚动到底部

public static class UITextViewExtenstions
{
	public static void AppendTextLine(this UITextView textView, string text)
	{
		textView.Text += string.Format ("\r\n{0}", text);
		textView.ScrollToBottom ();
	}
        public static void ScrollToBottom(this UITextViewExtenstions txtView)
	{
		textView.ScrollRangeToVisible (new NSRange (txtView.Text.Length - 1, 1));
	}
}

调用:

loggingView.AppendTextLine ("xxxxxxx");

你可能感兴趣的:(NSRange)