Skip to content

Instantly share code, notes, and snippets.

@alicanbatur
Created February 24, 2015 13:29
Show Gist options
  • Save alicanbatur/02e2a5c9fe0df022037d to your computer and use it in GitHub Desktop.
Save alicanbatur/02e2a5c9fe0df022037d to your computer and use it in GitHub Desktop.
UIToolbar* numberToolbar = [[UIToolbar alloc]initWithFrame:CGRectMake(0, 0, self.view.bounds.size.width, 50)];
numberToolbar.barStyle = UIBarStyleDefault;
[numberToolbar setTintColor:COLOR_CUSTOM_KEYBOARD];
numberToolbar.items = [NSArray arrayWithObjects:
[[UIBarButtonItem alloc]initWithTitle:@"Vazgeç" style:UIBarButtonItemStyleBordered target:self action:@selector(cancelNumberPad)],
[[UIBarButtonItem alloc]initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil action:nil],
[[UIBarButtonItem alloc]initWithTitle:@"Tamam" style:UIBarButtonItemStyleDone target:self action:@selector(doneWithNumberPad)],
nil];
[numberToolbar sizeToFit];
nameTextField.inputAccessoryView = numberToolbar;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment