I am trying to add minus button to UIKeyboardTypeNumPad using accessory view. My problem is that I want it to be over the keyboard ( on left to "0" key).
- (UIView *)inputAccessoryView {
if (!inputAccessoryView) {
CGRect accessFrame = CGRectMake(0, 219, 106, 53);
inputAccessoryView = [[UIView alloc] initWithFrame:accessFrame];
inputAccessoryView.backgroundColor = [UIColor blueColor];
UIButton *compButton = [UIButton buttonWithType:UIButtonTypeCustom];
compButton.frame = CGRectMake(0, 219, 106, 53);
[compButton setTitle: @"Word" forState:UIControlStateNormal];
[compButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
[compButton addTarget:self action:@selector(minusButtonTouched:)
forControlEvents:UIControlEventTouchUpInside];
[inputAccessoryView addSubview:compButton];
}
return inputAccessoryView;
}
I can do it using keyboard hack, but i'm afraid apple might reject my app.