Note that there are some explanatory texts on larger screens.

plurals
  1. POmissing UIToolBar in UIScrollView
    primarykey
    data
    text
    <p>I'm adding UIToolBar to my UITextField using:</p> <pre><code>- (void)viewDidLoad { [super viewDidLoad]; self.email.delegate = self; self.password.delegate = self; UIToolbar* toolbar = [[UIToolbar alloc] initWithFrame:CGRectMake(0, 0, self.view.bounds.size.width, 44)]; UIBarButtonItem* previous = [[UIBarButtonItem alloc] initWithTitle:@"Anterior" style:UIBarButtonItemStyleBordered target:self action:@selector(move:)]; UIBarButtonItem* next = [[UIBarButtonItem alloc] initWithTitle:@"Próximo" style:UIBarButtonItemStyleBordered target:self action:@selector(move:)]; UIBarButtonItem* space = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:(UIBarButtonSystemItemFlexibleSpace) target:nil action:nil]; UIBarButtonItem* ok = [[UIBarButtonItem alloc] initWithTitle:@"Ok" style:UIBarButtonItemStyleBordered target:self action:@selector(ok:)]; [toolbar setItems:[[NSArray alloc] initWithObjects:previous, next, space, ok, nil]]; [toolbar setTranslucent:YES]; [toolbar setTintColor:[UIColor blackColor]]; for (UIView* view in self.view.subviews) { if ([view isKindOfClass:[UITextField class]]) { [(UITextField*)view setInputAccessoryView:toolbar]; } } } </code></pre> <p>Now I'm adding a UIScrollView to my UIViewController and my UIToolBar doesn't show anymore. What am I missing? I think I'm adding the toolbar to the view and not to the scrollview, and because the scrollview is above the view, I can't see the toolbar. How can I fix it? I need to add to scroll view to move the content behind the keyboard.</p>
    singulars
    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.
    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