danielamitay / DAKeyboardControl

DAKeyboardControl adds keyboard awareness and scrolling dismissal (ala iMessages app) to any view with only 1 line of code.
Other
1.58k stars 214 forks source link

UITextView custom inputaccessoryview doesn't show initially #84

Open jerrin15 opened 9 years ago

jerrin15 commented 9 years ago

Is this working for everyone now? I have a UITextView , which when called brings up my custom input accessory view but its position is not on top of the keyboard. When i drag the auto-translate bar on the keyboard it gets set correctly.So every time on the initial call the input accessory view is placed on top of the keyboard, on interaction with the keyboard it gets set correctly.

I currently used the following code snippets only

self.view.keyboardTriggerOffset = keyboardView.bounds.size.height;

[self.view addKeyboardPanningWithFrameBasedActionHandler:^(CGRect keyboardFrameInView, BOOL opening, BOOL closing) {
    CGRect toolBarFrame = keyboardView.frame;
    toolBarFrame.origin.y = keyboardFrameInView.origin.y - toolBarFrame.size.height;
    keyboardView.frame = toolBarFrame;

} constraintBasedActionHandler:nil];

I also call the [textView setInputAccessoryView:keyboardView];

in the UITextView shouldbegin method