Created
July 12, 2012 03:13
-
-
Save piaoapiao/3095442 to your computer and use it in GitHub Desktop.
获取选中文字
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uitextview | |
NSRange range = [txtView selectedRange]; | |
NSString *str = [txtView.text substringWithRange:range]; | |
uiwebview | |
NSString *selection = [_pLongPressTextView stringByEvaluatingJavaScriptFromString:@"window.getSelection().toString()"]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment