This site is no longer active and is available for archival purposes only. Registration and login is disabled.

iPhone - help removing a UITextField?


iPhone - help removing a UITextField?

Postby EarthWind » Jul 30, 2009 @ 11:00pm

I've got a UITextField up and running overtop of my EdgeLib powered game. Everything works fine, I've created delegate class to handle the enter key and auto close the keyboard, the text is passed back to my app no problem.

The thing I am having troubles with though is actually removing the UITextField from the screen once I'm done with it! How silly is that.

I've tried many things and I can't get it to not display itself anymore.

[inp removeFromSuperview] does nothing even though I've added it as a using [window addSubview:inp].

I've also fooled around with the retainCount/release stuff to make sure it is no longer being retained, plus various other things.

Any ideas?
EarthWind
pm Member
 
Posts: 17
Joined: Jul 5, 2009 @ 2:10pm


Postby edge » Aug 3, 2009 @ 10:25am

Hi EarthWind,

The problem should be fixed in release 3.97. Could you try it and let us know if it works?
EDGELIB: Cross-platform mobile development at your fingertips
http://www.edgelib.com
User avatar
edge
pm Member
 
Posts: 1180
Joined: Aug 22, 2005 @ 3:42pm
Location: The Netherlands


Postby EarthWind » Aug 4, 2009 @ 5:08pm

Actually I got it to work without downloading the new version.

I was able to remove the input text field by calling removeFromSuperview from the textFieldShouldReturn method.

I believe when I was calling it from other locations I wasn't calling it from the same thread that created the textfield. I had read somewhere on this forum that possibly that was an issue and addition/removal should be done on the same thread.
EarthWind
pm Member
 
Posts: 17
Joined: Jul 5, 2009 @ 2:10pm


Return to EDGELIB


Sort


Forum Description

Powerful and affordable C++ middleware solution covering true multi-platform 2D, 3D and network features for Apple iPhone, Windows Mobile, Symbian S60, UIQ, Linux and Windows desktop.

Moderator:

edge

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron