TextEditor iOS


#1

using latest git modules branch;

When resigning the keyboard via the “hide keyboard” button I think the following should be added to juce_ios_UIViewComponentPeer.mm. It’s part of the UITextViewDelegate @protocol UITextViewDelegate. Don’t know which is better though textFieldShouldEndEditing or textViewDidEndEditing. Also the return key is not wired up.

[code]diff --git a/juce/modules/juce_gui_basics/native/juce_ios_UIViewComponentPeer.mm b/juce/modules/juce_gui_basics/native/juce_ios_UIViewComponentPeer.mm
index deacfb3…ae079c3 100644
— a/juce/modules/juce_gui_basics/native/juce_ios_UIViewComponentPeer.mm
+++ b/juce/modules/juce_gui_basics/native/juce_ios_UIViewComponentPeer.mm
@@ -347,6 +347,10 @@ juce::Point juce_lastMousePos;
nsStringToJuce (text));
}

± (void) textViewDidEndEditing: (UITextView*) textView
+{

  • owner->viewFocusLoss();
    +}
    @end

//==============================================================================
[/code]


#2

…well, that’s not really correct - the window can still technically be “focused”, even when the keyboard isn’t visible on the screen. (Not really sure what a better suggestion would be though…)