Bug report: Painful refactor of the xib to put the popup into a scrollview so that we can dismiss the keyboard by dragging it

This commit is contained in:
manuroe
2017-04-28 10:24:18 +02:00
parent 397d00dfbe
commit 117c53ed22
3 changed files with 283 additions and 189 deletions
@@ -101,16 +101,6 @@
[sendScreenshotTapGesture setNumberOfTouchesRequired:1];
[_sendScreenshotContainer addGestureRecognizer:sendScreenshotTapGesture];
_sendScreenshotContainer.userInteractionEnabled = YES;
// Show a Done button to hide the keyboard
UIToolbar *viewForDoneButtonOnKeyboard = [[UIToolbar alloc] init];
[viewForDoneButtonOnKeyboard sizeToFit];
UIBarButtonItem *btnDoneOnKeyboard = [[UIBarButtonItem alloc] initWithTitle:@"Done" style:UIBarButtonItemStyleDone target:self action:@selector(onKeyboardDoneButtonPressed:)];
viewForDoneButtonOnKeyboard.items = @[btnDoneOnKeyboard];
_bugReportDescriptionTextView.inputAccessoryView = viewForDoneButtonOnKeyboard;
}
- (void)setSendLogs:(BOOL)sendLogs
@@ -230,9 +220,4 @@
self.sendScreenshot = !self.sendScreenshot;
}
- (IBAction)onKeyboardDoneButtonPressed:(id)sender
{
[_bugReportDescriptionTextView resignFirstResponder];
}
@end