Hi,
after further research I was able to make the application work. I decided not
to create a UIWindow in FinishedLaunching, because my ViewController also has a
UIWindow defined. This UIWindow was declared as the view of the File's Owner.
Also the RootViewController is defined in my XIB an connected with the window.
All the stuff, that you usually do in FinishedLaunching. So the result is:
public override bool FinishedLaunching (UIApplication app, NSDictionary options)
{
viewController = new SettingsTestViewController ();
((UIWindow)viewController.view).MakeKeyAndVisible ();
return true;
}
I can't really explain why this two-windows-thing has this impact on iOS5 or
tell if it's a bug or just not the correct way to create the application. Maybe
someone else can. But it works for me with iOS4 and iOS5.
Thanks to all of you for your help and advice.
Best regards,
Andreas
Von: Rolf Bjarne Kvinge [mailto:[email protected]]
Gesendet: Donnerstag, 24. November 2011 13:57
An: Andreas Urban
Cc: [email protected]
Betreff: Re: [MonoTouch] iOS5 behaviors with UITextField, InputView and
SearchBar
Hi Andreas,
I've had a look at your project, and though I haven't figured out exactly
what's happening, I did find out that it seems to be related to the tab bar
controller. If I use the StreetSelectionController2 as the root controller, it
works fine.
IOW changing AppDelegate.FinishedLaunching to this:
public override bool FinishedLaunching (UIApplication app, NSDictionary options)
{
window = new UIWindow (UIScreen.MainScreen.Bounds);
viewController = new StreetSelectionController2 (); //
SettingsTestViewController ();
window.RootViewController = viewController;
window.MakeKeyAndVisible ();
return true;
}
makes the search bar work.
Maybe somebody else knows why the tab bar controller interferes with the
searchbar so that the keyboard doesn't pop up? (also once I've clicked the
search bar once and then cancelled, it's not possible to click on the search
bar again, it's completely unresponsive).
Best regards,
Rolf
On Fri, Nov 18, 2011 at 12:10 PM, Andreas Urban
<[email protected]<mailto:[email protected]>>
wrote:
Hi there,
Thank you so far for all of your information.
I prepared a very simple project, that illustrates one of my problems. You can
download this sample here: http://www.itechconsulting.de/SettingsTest.zip. In
this project (SettingsTest) I have a so called SettingsTestViewController. I
left the code as MonoTouch created it for me. I just changed the XIB and added
a TabBarController, because my app uses this as basic navigation. This
TabBarController has only one tab, which is defined with a custom class called
StreetSelectionController2. The NIB-Name is also set to
StreetSelectionController2. No further changes here. The
StreetSelectionController itself is also only defined in the XIB. It has a
TableView and a SearchBar with SearchDisplayController.
Well, now this app just behaves like I described before. When you go to options
on the project and choose SDK version 4.3 in iPhone Build, start the app and
touch the searchbar, the keyboard appears. However, when you set the SDK
version to 5.0 and try to touch the searchbar nothing happens.
This is very strange. I hope you can reproduce this issue using my example and
can give me a clue what I'm missing.
Again, thank you in advance.
Andreas
Von: Dean Cleaver
[mailto:dean.cleaver@xceptionso<mailto:dean.cleaver@xceptionso>
ftware.com<http://ftware.com>]
Gesendet: Mittwoch, 16. November 2011 20:28
An: Karl Heinz Brehme Arredondo; Andreas Urban;
[email protected]<mailto:[email protected]>
Betreff: RE: [MonoTouch] iOS5 behaviors with UITextField, InputView and
SearchBar
I'm wondering if it's a change in how the designer files are created or
something - but does sound very strange.
From: Karl Heinz Brehme Arredondo
[mailto:[email protected]<mailto:[email protected]>]
Sent: Wednesday, November 16, 2011 12:26 PM
To: Dean Cleaver; AUR;
[email protected]<mailto:[email protected]>
Subject: Re: [MonoTouch] iOS5 behaviors with UITextField, InputView and
SearchBar
Just to know, I use everything (possible) from XIBs and the actual project
begun on MonoDevelop 2.6 and recently converted to MD 2.8 and all is OK here
with UITextField and InputView on iOS 4 and iOS 5.
Karl
From: Dean Cleaver
<[email protected]<mailto:[email protected]>>
Date: Wed, 16 Nov 2011 18:20:54 +0000
To: AUR
<[email protected]<mailto:[email protected]>>,
"[email protected]<mailto:[email protected]>"
<[email protected]<mailto:[email protected]>>
Subject: Re: [MonoTouch] iOS5 behaviors with UITextField, InputView and
SearchBar
Just occurred to me that you might be using XIBs? I do everything nibless, but
that shouldn't make a difference really. Either way, see if you can post the
code that creates and adds the UITextView to the parent view, and we can look
to see if anything looks out of place.
Dino
From:
[email protected]<mailto:[email protected]>
[mailto:[email protected]] On Behalf Of AUR
Sent: Wednesday, November 16, 2011 12:17 PM
To: [email protected]<mailto:[email protected]>
Subject: Re: [MonoTouch] iOS5 behaviors with UITextField, InputView and
SearchBar
Well, it's an app that I wanted to deploy to the App Store today (before iOS5
testing!). So it's almost finished and a lot more than a sample. But I think
I'm going to set up a small test project regarding this issue. Maybe than I can
send you some code tomorrow. Can you recommend anything else?
Von: Dino [via MonoTouch] [mailto:[hidden
email]<http://user/SendEmail.jtp?type=node&node=4077325&i=0>]
Gesendet: Mittwoch, 16. November 2011 19:11
An: Andreas Urban
Betreff: Re: iOS5 behaviors with UITextField, InputView and SearchBar
Is it an app you can share or is it a bit more than a basic sample?
-----Original Message-----
From: Andreas Urban [mailto:[hidden
email]<http://user/SendEmail.jtp?type=node&node=4077304&i=0>]
Sent: Wednesday, November 16, 2011 12:08 PM
To: Dean Cleaver; [hidden
email]<http://user/SendEmail.jtp?type=node&node=4077304&i=1>
Subject: AW: [MonoTouch] iOS5 behaviors with UITextField, InputView and
SearchBar
This happens on both the simulator and the device. I've just tried another
application and - strange to say - there is no difference between iOS4 and
iOS5. So in general, it seems to work. But what might cause the issue in this
special app?
-----Ursprüngliche Nachricht-----
Von: Dean Cleaver [mailto:[hidden
email]<http://user/SendEmail.jtp?type=node&node=4077304&i=2>]
Gesendet: Mittwoch, 16. November 2011 18:56
An: Andreas Urban; [hidden
email]<http://user/SendEmail.jtp?type=node&node=4077304&i=3>
Betreff: RE: [MonoTouch] iOS5 behaviors with UITextField, InputView and
SearchBar
Andres,
Is this happening on your device or in the simulator? I have all of those UI
elements in my app, and all of them behave as expected with no changes to the
code for iOS5.
Dino
-----Original Message-----
From: [hidden email]<http://user/SendEmail.jtp?type=node&node=4077304&i=4>
[mailto:[hidden email]<http://user/SendEmail.jtp?type=node&node=4077304&i=5>]
On Behalf Of AUR
Sent: Wednesday, November 16, 2011 11:49 AM
To: [hidden email]<http://user/SendEmail.jtp?type=node&node=4077304&i=6>
Subject: [MonoTouch] iOS5 behaviors with UITextField, InputView and SearchBar
Hi there,
I have a problem with the iOS 5 behaviors of the UITextField, InputView and
SearchBar.
First of all the UITextField. When I add a UITextField to my view, run the code
in the simulator and touch the text field nothing happens. This is quite
contrary to the iOS4 behavior which shows me the keyboard by default.
What do I have to configure to achieve this?
Second problem: the InputView. It's almost the same as with the UITextField..
When I assign a UIView to the InputView of a UITextField, run the code and
touch the field nothing happens in iOS 5. This is again quite contrary to the
iOS4 behavior which easily shows my view as the responder. What do I have to do
here?
The third one is also regaring changed standard behavior. When touching the
UISearchBar, iOS 5 (again) does nothing, while iOS 4 (again) shows the keyboard.
It looks like all three topics belong to one simple mistake, but neither
research nor trial and error took me a step further. I'm looking forward to
some pokes into the right direction.
Thanks in advance for your help.
Best regards
Andreas
--
View this message in context: click here.
NAML<http://monotouch.2284126.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.InstantMailNamespace&breadcrumbs=instant+emails%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
________________________________
View this message in context: AW: iOS5 behaviors with UITextField, InputView
and
SearchBar<http://monotouch.2284126.n4.nabble.com/iOS5-behaviors-with-UITextField-InputView-and-SearchBar-tp4077230p4077325.html>
Sent from the MonoTouch mailing list
archive<http://monotouch.2284126.n4.nabble.com/> at Nabble.com.
_______________________________________________ MonoTouch mailing list
[email protected]<mailto:[email protected]>
http://lists.ximian.com/mailman/listinfo/monotouch
_______________________________________________
MonoTouch mailing list
[email protected]<mailto:[email protected]>
http://lists.ximian.com/mailman/listinfo/monotouch
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch