• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Weird behavior when adding subview
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
References: 
 >Weird behavior when adding subview (From: Eamon Ford <email@hidden>)

  • Prev by Date: Re: NSArrayController sorting
  • Next by Date: Re: Time creation and storage [Solved]
  • Previous by thread: Re: Weird behavior when adding subview
  • Next by thread: Re: Weird behavior when adding subview
  • Index(es):
    • Date
    • Thread