0
액세서리보기를 사용하여 UIKeyboardTypeNumPad에 빼기 단추를 추가하려고합니다. 내 문제는 그것이 키보드 (왼쪽 "0"키)에 있어야한다는 것입니다.uikeyboardtypenumpad에 빼기 단추 추가
- (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;
}
키보드 해킹을 사용하여 수행 할 수 있지만 사과가 내 앱을 거부 할 수 있습니다.
그러나 사과는 위의 코드로 내 앱을 거부하지 않았습니다 ... –
...하지만 리뷰하는 사람에 따라 다릅니다. –