uitextview

iPhone Programming: Deactivate spell check in UITextView

有些话、适合烂在心里 提交于 2020-01-28 06:39:53
问题 UITextAutocorrectionTypeNo didn't work for me. I'm working on a crossword app for the iPhone. The questions are in UITextViews and I use UITextFields for the User-Input of each letter. By touching a question(UITextView), the TextField for the first answer char becomesFirstResponder. It all works fine but the UITextViews are still spell checking and mark the wrong words in the question, even if I set them UITextAutocorrectionTypeNo . //init of my Riddle-Class ... for (int i = 0; i <

UITextViews in a UITableView link detection bug in iOS 7

一笑奈何 提交于 2020-01-26 23:57:48
问题 I have custom UITableViewCells that contain a UITextView. I have link detection in the UITextView turned on in Interface Builder. When I first load the table view, everything seems to be working, but as I scroll up and down the table view, the link detection gets messed up. Specifically, cells that just have regular text (which are presented normally initially) are being shown as links (all the text in the text view is coloured blue and is an active link), and the links point to objects that

UITextView stange animation glitch on paste action (iOS11)

落花浮王杯 提交于 2020-01-24 10:34:05
问题 I'm facing a very strange bug. When I paste anything inside UITextView , I receive a surprising glitch of animation. To reproduce it I've just created a black .xcodeproj , added UITextView to ViewController via storyboard and ran the application. The only similiar problem I've found is https://twitter.com/twostraws/status/972914692195790849 And it says that it's a bug of UIKit in iOS11. But there lot of applications on my iPhone with UITextview that works correctly on iOS11. You can see the

Justified text with UITextView and NSMutableAttributedString

女生的网名这么多〃 提交于 2020-01-24 10:27:13
问题 I'm trying to put a justified text for a UITextView with NSMutableAttributedString , the NSMutableAttributedString is composed of different NSAttributedString because I need bold and regular font, so I append different NSString , this is my NSMutableAttributedString : NSAttributedString *one = [[NSAttributedString alloc] initWithString:@"abc" attributes:boldDict]; NSAttributedString *two = [[NSAttributedString alloc] initWithString:@" def" attributes:regularDict]; NSAttributedString *three =

UITextView contentInset not working in UITextView on iOS 7?

戏子无情 提交于 2020-01-24 03:57:46
问题 I'm trying to set a UITextView 's contentInset property. When doing so, the UIEdgeInset 's top variable works just fine. So [self.textView setContentInset: 'UIEdgeInsetsMake(50, 0, 0, 0)]; works. But assigning any other variable of UIEdgeInsets doesn't work. Only the top adjusts. bottom doesn't adjust, neither do left or right . So [self.textView setContentInset: UIEdgeInsetsMake(0, 50, 100, 50)]; doesn't do anything to my textView. Am I missing something? Any ideas? 回答1: Use

UITextView contentInset not working in UITextView on iOS 7?

↘锁芯ラ 提交于 2020-01-24 03:57:01
问题 I'm trying to set a UITextView 's contentInset property. When doing so, the UIEdgeInset 's top variable works just fine. So [self.textView setContentInset: 'UIEdgeInsetsMake(50, 0, 0, 0)]; works. But assigning any other variable of UIEdgeInsets doesn't work. Only the top adjusts. bottom doesn't adjust, neither do left or right . So [self.textView setContentInset: UIEdgeInsetsMake(0, 50, 100, 50)]; doesn't do anything to my textView. Am I missing something? Any ideas? 回答1: Use

Simply calling UITextView `sizeThatFits:` causes glitchy scrolling / input behavior?

两盒软妹~` 提交于 2020-01-23 08:04:02
问题 I find that in iOS 8 using UITextView sizeThatFits: causes glitchy scrolling behavior. The Text View is constantly scrolling away from the line you are typing on. It seems to be scrolling to the top of the view and then back again. If it matters, the view is set as an inputAccessoryView. Via the keyboard I'll type: 1 return 2 return 3 return 4 The TextView the moment before I type 4 : In the delegate method I call sizeThatFits: . - (void)textViewDidChange:(UITextView *)textView { [textView

Simply calling UITextView `sizeThatFits:` causes glitchy scrolling / input behavior?

做~自己de王妃 提交于 2020-01-23 08:02:10
问题 I find that in iOS 8 using UITextView sizeThatFits: causes glitchy scrolling behavior. The Text View is constantly scrolling away from the line you are typing on. It seems to be scrolling to the top of the view and then back again. If it matters, the view is set as an inputAccessoryView. Via the keyboard I'll type: 1 return 2 return 3 return 4 The TextView the moment before I type 4 : In the delegate method I call sizeThatFits: . - (void)textViewDidChange:(UITextView *)textView { [textView

UITableView won't scroll after editing view frame and origin

孤街醉人 提交于 2020-01-22 02:18:05
问题 I'm trying to implement a UITextView in a table cell at the bottom of a table view. I've tried the suggestions here Making a UITableView scroll when text field is selected, and other solutions as well, but they're a bit different because I have to artificially add extra height to the current view in order to create space for the keyboard. Here's what I added to the previous solution in order to port it to my app. -(void) keyboardWillShow:(NSNotification *)note { CGRect frame = self.view.frame

Designated Initializer of UITextView

喜你入骨 提交于 2020-01-21 11:19:48
问题 When I create a new subclass of UITextView in the Xcode 6 Beta, the following code is automatically provided. import UIKit class TerminalView: UITextView { init(frame: CGRect) { super.init(frame: frame) // Initialization code } } The previous code (completely provided by Xcode with nothing removed) gives the following error. Must call a designated initializer of the superclass 'UITextView' As far as I know, the designated for all subclasses of UIView is -initWithFrame: (or in Swift, init