Note that there are some explanatory texts on larger screens.

plurals
  1. POAccessoryView on TextView without Keyboard?
    primarykey
    data
    text
    <p>I'm learning about AccessoryViews and testing the Apple example: <a href="http://developer.apple.com/iphone/library/samplecode/KeyboardAccessory/Listings/Classes_ViewController_m.html" rel="nofollow noreferrer">KeyBoardAccessory</a></p> <p>I'm trying to show the accessory view avoiding the Keyboard to show, but I can't do it :-(</p> <p>I'm returning NO in textViewShouldBeginEditing to avoid keyboard and animating the resize of the TextView before return, but nothing happens.</p> <p>What I'm doing wrong?</p> <pre><code>- (void)viewWillAppear:(BOOL)animated { // Make the keyboard appear when the application launches. [super viewWillAppear:animated]; [textView becomeFirstResponder]; } - (BOOL)textViewShouldBeginEditing:(UITextView *)aTextView { NSLog(@"textViewShouldBeginEditing"); /* You can create the accessory view programmatically (in code), in the same nib file as the view controller's main view, or from a separate nib file. This example illustrates the latter; it means the accessory view is loaded lazily -- only if it is required. */ if (textView.inputAccessoryView == nil) { [[NSBundle mainBundle] loadNibNamed:@"AccessoryView" owner:self options:nil]; // Loading the AccessoryView nib file sets the accessoryView outlet. textView.inputAccessoryView = accessoryView; // After setting the accessory view for the text view, we no longer need a reference to the accessory view. self.accessoryView = nil; } [UIView beginAnimations:nil context:NULL]; [UIView setAnimationDuration:1]; textView.frame = CGRectMake(textView.frame.origin.x, textView.frame.origin.y, textView.frame.size.width, textView.frame.size.height - 100); [UIView commitAnimations]; return NO; } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload