UITextView
에 대해 UIBarButtonItem
이 inputAccessoryView 인 UIToolBar
을 추가했습니다. 잘 작동하지만 UIBarButtonItem은 프레임 바깥쪽에 50 픽셀 밖에있을 수 없습니다. 그것은 큰 문제가 아니지만 그것은 나를 귀찮게. 왜 그런지 알아?UITextView 용 inputAccessoryView로 iOS - UIToolBar
UIToolbar *toolBar = [[UIToolbar alloc] initWithFrame:CGRectMake(0, self.view.bounds.size.height, 320, 44)];
toolBar.barStyle = UIBarStyleBlack;
toolBar.translucent = YES;
UIBarButtonItem *doneButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(doneWriting:)];
[toolBar setItems:[NSArray arrayWithObjects:doneButton, nil]];
self.messageTextView.inputAccessoryView = toolBar;
그것이 사실이라면, 나는 그것이 "바운드 (outside)"바깥에서 반응하는 "조잡한 (sloppy)"프로그래밍처럼 느껴진다. –