On Aug 20, 2008, at 1:28 PM, Justin Giboney wrote:
This is assuming, of course, that you have a good reason for adding the subviews in code rather than in the nib file in the first place -- perhaps because your view layout is dynamic in some way and can't be decided until launch time?

Yes I have a good reason. I don't have to have a dynamic layout, but I plan on having over 100 different views, which would be difficult to create, and difficult to update or add more.

Makes sense.

I would think that by adding the text view to the hierarchy that it would remain there every time the view gets redrawn, but apparently it doesn't. How do I keep it there?

I would think so too. Can you post the entire code of your class? Also, as a shot in the dark, can you change that NSLog statement to NSLog(@"0x%X %@", self, [self subviews]);? I wonder if you accidentally have two instances of your custom view. As another shot in the dark, could you also add the same NSLog statement to - addLabelWithText:?

--Andy

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to