ChatRoomView: hide keyboard on list tap

This commit is contained in:
Yann Diorcet 2012-09-13 15:15:56 +02:00
parent 8b850f0eb1
commit 280fd1376f
6 changed files with 125 additions and 12 deletions

View file

@ -49,5 +49,6 @@
- (IBAction)onEditClick:(id)event;
- (IBAction)onMessageChange:(id)sender;
- (IBAction)onSendClick:(id)event;
- (IBAction)onListTap:(id)sender;
@end

View file

@ -292,6 +292,7 @@ static void message_status(LinphoneChatMessage* msg,LinphoneChatMessageState sta
- (IBAction)onEditClick:(id)event {
[tableController setEditing:![tableController isEditing] animated:TRUE];
[messageField resignFirstResponder];
}
- (IBAction)onSendClick:(id)event {
@ -300,6 +301,10 @@ static void message_status(LinphoneChatMessage* msg,LinphoneChatMessageState sta
}
}
- (IBAction)onListTap:(id)sender {
[messageField resignFirstResponder];
}
- (IBAction)onMessageChange:(id)sender {
if([[messageField text] length] > 0) {
[sendButton setEnabled:TRUE];

View file

@ -17,6 +17,7 @@
<string>IBUILabel</string>
<string>IBUITableView</string>
<string>IBUITableViewController</string>
<string>IBUITapGestureRecognizer</string>
<string>IBUITextView</string>
<string>IBUIView</string>
</array>
@ -144,6 +145,7 @@
<bytes key="NSWhite">MQA</bytes>
</object>
<bool key="IBUIClipsSubviews">YES</bool>
<array key="IBUIGestureRecognizers" id="0"/>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<bool key="IBUIAlwaysBounceVertical">YES</bool>
<int key="IBUISectionIndexMinimumDisplayRowCount">0</int>
@ -162,6 +164,7 @@
<string key="NSFrame">{{250, 0}, {70, 59}}</string>
<reference key="NSSuperview" ref="833509359"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="IBUIOpaque">NO</bool>
<object class="IBUIAccessibilityConfiguration" key="IBUIAccessibilityConfiguration">
@ -358,6 +361,7 @@
<reference key="NSNextKeyView" ref="333187864"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<reference key="IBUIBackgroundColor" ref="460939904"/>
<reference key="IBUIGestureRecognizers" ref="0"/>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
<object class="IBUITableViewController" id="926385140">
@ -370,6 +374,7 @@
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<bool key="IBUIHorizontal">NO</bool>
</object>
<object class="IBUITapGestureRecognizer" id="148818944"/>
</array>
<object class="IBObjectContainer" key="IBDocument.Objects">
<array class="NSMutableArray" key="connectionRecords">
@ -477,6 +482,16 @@
</object>
<int key="connectionID">31</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletCollectionConnection" key="connection">
<string key="label">gestureRecognizers</string>
<reference key="source" ref="879615756"/>
<reference key="destination" ref="148818944"/>
<string key="cachedDesigntimeCollectionClassName">NSArray</string>
<bool key="addsContentToExistingCollection">YES</bool>
</object>
<int key="connectionID">61</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchEventConnection" key="connection">
<string key="label">onBackClick:</string>
@ -512,12 +527,20 @@
</object>
<int key="connectionID">33</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchEventConnection" key="connection">
<string key="label">onListTap:</string>
<reference key="source" ref="148818944"/>
<reference key="destination" ref="372490531"/>
</object>
<int key="connectionID">62</int>
</object>
</array>
<object class="IBMutableOrderedSet" key="objectRecords">
<array key="orderedObjects">
<object class="IBObjectRecord">
<int key="objectID">0</int>
<array key="object" id="0"/>
<reference key="object" ref="0"/>
<reference key="children" ref="1000"/>
<nil key="parent"/>
</object>
@ -619,6 +642,7 @@
<object class="IBObjectRecord">
<int key="objectID">8</int>
<reference key="object" ref="879615756"/>
<array class="NSMutableArray" key="children"/>
<reference key="parent" ref="715329044"/>
<string key="objectName">tableView</string>
</object>
@ -651,6 +675,12 @@
<reference key="parent" ref="833509359"/>
<string key="objectName">messageField</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">58</int>
<reference key="object" ref="148818944"/>
<reference key="parent" ref="0"/>
<string key="objectName">listTapGestureRecognizer</string>
</object>
</array>
</object>
<dictionary class="NSMutableDictionary" key="flattenedProperties">
@ -674,6 +704,7 @@
<string key="47.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="49.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="55.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="58.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="6.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="7.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="8.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
@ -685,7 +716,7 @@
<nil key="activeLocalization"/>
<dictionary class="NSMutableDictionary" key="localizations"/>
<nil key="sourceID"/>
<int key="maxID">57</int>
<int key="maxID">62</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
@ -703,6 +734,7 @@
<dictionary class="NSMutableDictionary" key="actions">
<string key="onBackClick:">id</string>
<string key="onEditClick:">id</string>
<string key="onListTap:">id</string>
<string key="onMessageChange:">id</string>
<string key="onSendClick:">id</string>
</dictionary>
@ -715,6 +747,10 @@
<string key="name">onEditClick:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="onListTap:">
<string key="name">onListTap:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="onMessageChange:">
<string key="name">onMessageChange:</string>
<string key="candidateClassName">id</string>

View file

@ -15,6 +15,7 @@
<string>IBUIImageView</string>
<string>IBUILabel</string>
<string>IBProxyObject</string>
<string>IBUITapGestureRecognizer</string>
<string>IBUITableViewController</string>
<string>IBUITableView</string>
<string>IBUITextView</string>
@ -139,6 +140,7 @@
<bytes key="NSWhite">MQA</bytes>
</object>
<bool key="IBUIClipsSubviews">YES</bool>
<array key="IBUIGestureRecognizers" id="0"/>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<bool key="IBUIAlwaysBounceVertical">YES</bool>
<int key="IBUISectionIndexMinimumDisplayRowCount">0</int>
@ -342,6 +344,7 @@
<reference key="NSNextKeyView" ref="333187864"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<reference key="IBUIBackgroundColor" ref="460939904"/>
<reference key="IBUIGestureRecognizers" ref="0"/>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
<object class="IBUITableViewController" id="926385140">
@ -354,6 +357,7 @@
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<bool key="IBUIHorizontal">NO</bool>
</object>
<object class="IBUITapGestureRecognizer" id="148818944"/>
</array>
<object class="IBObjectContainer" key="IBDocument.Objects">
<array class="NSMutableArray" key="connectionRecords">
@ -461,6 +465,16 @@
</object>
<int key="connectionID">31</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletCollectionConnection" key="connection">
<string key="label">gestureRecognizers</string>
<reference key="source" ref="879615756"/>
<reference key="destination" ref="148818944"/>
<string key="cachedDesigntimeCollectionClassName">NSArray</string>
<bool key="addsContentToExistingCollection">YES</bool>
</object>
<int key="connectionID">61</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchEventConnection" key="connection">
<string key="label">onBackClick:</string>
@ -496,12 +510,20 @@
</object>
<int key="connectionID">33</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchEventConnection" key="connection">
<string key="label">onListTap:</string>
<reference key="source" ref="148818944"/>
<reference key="destination" ref="372490531"/>
</object>
<int key="connectionID">62</int>
</object>
</array>
<object class="IBMutableOrderedSet" key="objectRecords">
<array key="orderedObjects">
<object class="IBObjectRecord">
<int key="objectID">0</int>
<array key="object" id="0"/>
<reference key="object" ref="0"/>
<reference key="children" ref="1000"/>
<nil key="parent"/>
</object>
@ -603,6 +625,7 @@
<object class="IBObjectRecord">
<int key="objectID">8</int>
<reference key="object" ref="879615756"/>
<array class="NSMutableArray" key="children"/>
<reference key="parent" ref="715329044"/>
<string key="objectName">tableView</string>
</object>
@ -635,6 +658,12 @@
<reference key="parent" ref="833509359"/>
<string key="objectName">messageField</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">58</int>
<reference key="object" ref="148818944"/>
<reference key="parent" ref="0"/>
<string key="objectName">listTapGestureRecognizer</string>
</object>
</array>
</object>
<dictionary class="NSMutableDictionary" key="flattenedProperties">
@ -658,6 +687,7 @@
<string key="47.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="49.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="55.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="58.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="6.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="7.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="8.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
@ -669,7 +699,7 @@
<nil key="activeLocalization"/>
<dictionary class="NSMutableDictionary" key="localizations"/>
<nil key="sourceID"/>
<int key="maxID">57</int>
<int key="maxID">62</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
@ -687,6 +717,7 @@
<dictionary class="NSMutableDictionary" key="actions">
<string key="onBackClick:">id</string>
<string key="onEditClick:">id</string>
<string key="onListTap:">id</string>
<string key="onMessageChange:">id</string>
<string key="onSendClick:">id</string>
</dictionary>
@ -699,6 +730,10 @@
<string key="name">onEditClick:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="onListTap:">
<string key="name">onListTap:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="onMessageChange:">
<string key="name">onMessageChange:</string>
<string key="candidateClassName">id</string>

View file

@ -212,17 +212,17 @@
<dict>
<key>backup</key>
<dict>
<key>1</key>
<key>3</key>
<dict>
<key>class</key>
<string>BLWrapperHandle</string>
<key>name</key>
<string>Classes/ChatRoomViewController/1/ChatRoomViewController.xib</string>
<string>Classes/ChatRoomViewController/3/ChatRoomViewController.xib</string>
</dict>
</dict>
</dict>
<key>change date</key>
<date>2012-09-10T15:21:35Z</date>
<date>2012-09-13T13:08:20Z</date>
<key>changed values</key>
<array/>
<key>class</key>
@ -232,7 +232,7 @@
<key>flags</key>
<integer>0</integer>
<key>hash</key>
<string>73bafe5878db223f8ccca7a749e21d89
<string>c2184e590274d82e838a91d16b383b3d
</string>
<key>name</key>
<string>ChatRoomViewController.xib</string>
@ -442,9 +442,9 @@
<key>versions</key>
<dict>
<key>en</key>
<string>1</string>
<string>3</string>
<key>fr</key>
<string>1</string>
<string>3</string>
</dict>
</dict>
<dict>

View file

@ -17,6 +17,7 @@
<string>IBUILabel</string>
<string>IBUITableView</string>
<string>IBUITableViewController</string>
<string>IBUITapGestureRecognizer</string>
<string>IBUITextView</string>
<string>IBUIView</string>
</array>
@ -144,6 +145,7 @@
<bytes key="NSWhite">MQA</bytes>
</object>
<bool key="IBUIClipsSubviews">YES</bool>
<array key="IBUIGestureRecognizers" id="0"/>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<bool key="IBUIAlwaysBounceVertical">YES</bool>
<int key="IBUISectionIndexMinimumDisplayRowCount">0</int>
@ -162,6 +164,7 @@
<string key="NSFrame">{{250, 0}, {70, 59}}</string>
<reference key="NSSuperview" ref="833509359"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="IBUIOpaque">NO</bool>
<object class="IBUIAccessibilityConfiguration" key="IBUIAccessibilityConfiguration">
@ -358,6 +361,7 @@
<reference key="NSNextKeyView" ref="333187864"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<reference key="IBUIBackgroundColor" ref="460939904"/>
<reference key="IBUIGestureRecognizers" ref="0"/>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
<object class="IBUITableViewController" id="926385140">
@ -370,6 +374,7 @@
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<bool key="IBUIHorizontal">NO</bool>
</object>
<object class="IBUITapGestureRecognizer" id="148818944"/>
</array>
<object class="IBObjectContainer" key="IBDocument.Objects">
<array class="NSMutableArray" key="connectionRecords">
@ -477,6 +482,16 @@
</object>
<int key="connectionID">31</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletCollectionConnection" key="connection">
<string key="label">gestureRecognizers</string>
<reference key="source" ref="879615756"/>
<reference key="destination" ref="148818944"/>
<string key="cachedDesigntimeCollectionClassName">NSArray</string>
<bool key="addsContentToExistingCollection">YES</bool>
</object>
<int key="connectionID">61</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchEventConnection" key="connection">
<string key="label">onBackClick:</string>
@ -512,12 +527,20 @@
</object>
<int key="connectionID">33</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchEventConnection" key="connection">
<string key="label">onListTap:</string>
<reference key="source" ref="148818944"/>
<reference key="destination" ref="372490531"/>
</object>
<int key="connectionID">62</int>
</object>
</array>
<object class="IBMutableOrderedSet" key="objectRecords">
<array key="orderedObjects">
<object class="IBObjectRecord">
<int key="objectID">0</int>
<array key="object" id="0"/>
<reference key="object" ref="0"/>
<reference key="children" ref="1000"/>
<nil key="parent"/>
</object>
@ -619,6 +642,7 @@
<object class="IBObjectRecord">
<int key="objectID">8</int>
<reference key="object" ref="879615756"/>
<array class="NSMutableArray" key="children"/>
<reference key="parent" ref="715329044"/>
<string key="objectName">tableView</string>
</object>
@ -651,6 +675,12 @@
<reference key="parent" ref="833509359"/>
<string key="objectName">messageField</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">58</int>
<reference key="object" ref="148818944"/>
<reference key="parent" ref="0"/>
<string key="objectName">listTapGestureRecognizer</string>
</object>
</array>
</object>
<dictionary class="NSMutableDictionary" key="flattenedProperties">
@ -674,6 +704,7 @@
<string key="47.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="49.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="55.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="58.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="6.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="7.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="8.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
@ -685,7 +716,7 @@
<nil key="activeLocalization"/>
<dictionary class="NSMutableDictionary" key="localizations"/>
<nil key="sourceID"/>
<int key="maxID">57</int>
<int key="maxID">62</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
@ -703,6 +734,7 @@
<dictionary class="NSMutableDictionary" key="actions">
<string key="onBackClick:">id</string>
<string key="onEditClick:">id</string>
<string key="onListTap:">id</string>
<string key="onMessageChange:">id</string>
<string key="onSendClick:">id</string>
</dictionary>
@ -715,6 +747,10 @@
<string key="name">onEditClick:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="onListTap:">
<string key="name">onListTap:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="onMessageChange:">
<string key="name">onMessageChange:</string>
<string key="candidateClassName">id</string>