Re: Weird behavior when adding subview
Re: Weird behavior when adding subview
- Subject: Re: Weird behavior when adding subview
- From: Mike Abdullah <email@hidden>
- Date: Fri, 21 Apr 2006 00:17:33 +0100
I ran into this problem the other day with a different sort of
scenario. Basically, yes as someone has suggested - avoid doing this
if possible!
If you can't though simply do something like:
if ([myTextField superview])
[customView addSubview: myTextField];
Mike
On 20 Apr 2006, at 23:25PM0, Eamon Ford wrote:
I have a custom view in which I programmatically create an
NSTextField and add it as a subview, in the drawRect: method. But
whenever the view is redrawn (i.e. I resize the window, etc.), it
seems to redraw the text field over itself. Sorry, I couldn't think
of a better explanation, but here's a screenshot of what's
happening: <http://homepage.mac.com/eamonford/screenshot.png>
I'm sure there's a simple solution, but I'm not very experienced.
What would be the best way to fix this?
Thanks.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40gmail.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden