Re: figuring out which TableView I am?
Re: figuring out which TableView I am?
- Subject: Re: figuring out which TableView I am?
- From: Greg Guerin <email@hidden>
- Date: Mon, 27 Apr 2009 10:30:23 -0700
David Scheidt wrote:
switch ([self tag]){
case 0: //catches the default IB Tag
evenColor = uglyColor;
break;
case 1: // Foo Tables
evenColor = FooColor;
break;
....
default: // catches invalid tag in IB
evenColor = uglyColor2;
}
// drawing code follows ....
Assuming the tableviews have a different delegate type for Foo, Bar,
or Quox, you could put an evenColor method in the delegate. Then
check it with respondsToSelector: before messaging. The choice of
evenColor then always changes with the delegate-type, regardless of
tag value.
Just a thought.
-- GG
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden