내 키보드 위에 UIView
/Toolbar
을 포함 시키려고했지만 행운이 없었습니다. 도구 모음을 추가 할 때 스크램블되어 있으므로 UIView
에 넣어야하지만 UIView
은 키보드 위에 나타나지 않습니다. 아래 코드 :inputaccessoryview가 표시되지 않음 (StoryBoard)
내 헤더 :
@property (nonatomic, Strong) IBOutlet UITextView *textView;
@property (nonatomic, strong) IBOutlet UIToolbar *TitleBar;
@property (nonatomic, weak) IBOutlet UIView *AddView;
ViewDidLoad
:
- (void)viewDidLoad
{
// observe keyboard hide and show notifications to resize the text view appropriately
/*[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(keyboardWillShow:)
name:UIKeyboardWillShowNotification
object:nil];
*/
if ([self respondsToSelector:@selector(setNeedsStatusBarAppearanceUpdate)]) {
// iOS 7
[self performSelector:@selector(setNeedsStatusBarAppearanceUpdate)];
} else {
// iOS 6
[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationSlide];
}
self.attributionTitle.delegate = self;
self.attribution.delegate = self;
textView.scrollEnabled = YES;
// quoteText.layer.borderColor = [UIColor blackColor].CGColor;
// quoteText.layer.borderWidth = 1.0f;
// textView.delegate = self; // code or in IB
[textView becomeFirstResponder];
[super viewDidLoad];
// Do any additional setup after loading the view.
}
textViewDidBeginEditing
:
-(void)textViewDidBeginEditing:(UITextView *)textView
{
self.textView.inputAccessoryView = self.AddView;
}
가 연결되어있는 UIView
을 보여주는 것입니다
하단 검은 막대에보기를 추가한다는 것은 무엇을 의미합니까? 스토리 보드에서 뷰를 실제로 소유하고있는 뷰 컨트롤러에 배치되지 않은 뷰를 정의 할 수 있습니까? 이러한보기는 스토리 보드에 시각적으로 표시되며 부모보기 컨트롤러와 어느 정도 겹쳐서 연결됩니까? – devios1