views:

37

answers:

2

Hello,

I've just downloaded SDK 4.0 and I wanted to tun my iPhone application developed against SDK 3.1.3. Unfortunately the app behaves in a strange way in the Simulator for iPhone 4.0.

The first thing is that I have a view with a table view with text fields in the cells. When I show the view the keyboard immediately shows up, but I cannot modify any of the text views. When I try to choose any of the text fields the focus does not change and it ends up without any possibility to modify the text fields.

There is a UITextFieldDelegateadded to each of the text views, but none of its methods is called when the view shows up (together with the keyboard). When I choose one of the text views the

- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField

is called and I return YES.

This is how the view looks like:

alt text

Any ideas?

+2  A: 

I haven't seen this behavior but to troubleshoot I suggest disabling the text fields and seeing if the behavior goes away. If it does, add the textfield back in a pattern until you locate the one triggering the keyboard.

You might also look through the nib/s and see if you have a hidden text field somewhere.

TechZen
Thanks for the suggestion!I add all the text field in the code.After disabling all the text fields the keybord still shows up.
Jakub
A: 

I got it working correctly. Context: I had two views: in the first I had text view, and in the second view I had a table view with some text fields. Problem: In the first view I had

- (BOOL)textViewShouldEndEditing:(UITextView *)textView 

method returning always NOfor the text view. This is why when I was showing the second view the keyboard for the text view was still shown. It worked wery well in SDK 3.1.3, so it must have been changed in SDK 4.0.

Jakub