• 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: why don't custom views have a "tag" in IB?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: why don't custom views have a "tag" in IB?


  • Subject: Re: why don't custom views have a "tag" in IB?
  • From: j o a r <email@hidden>
  • Date: Tue, 21 Nov 2006 20:22:24 +0100


On 21 nov 2006, at 20.10, Matt Neuburg wrote:

Why doesn't the Attributes inspector for a custom view in IB have a "tag"
field? A custom view is a view, so it can have a tag - right? And why
wouldn't I want to set that tag in IB?

While NSView have a -tag method, it's actually only with NSControl (and descendants) that you find both -tag and -setTag:, so I'm not surprised that it's "missing" in IB.


If I can't set a tag, it's hard to tell one custom view from another.

The difficulty is compounded by the fact that a custom view cannot have outlets.

If you set it to be of a custom subclass (using the inspector) that have outlets, I'm pretty sure that it would work.


That said, in Cocoa you typically don't subclass and extend views like that. You would rather have a "view controller" with outlets loading the nib file.

j o a r


Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >why don't custom views have a "tag" in IB? (From: Matt Neuburg <email@hidden>)

  • Prev by Date: why don't custom views have a "tag" in IB?
  • Next by Date: Re: Parallel builds on Intel Mac failing..... start loosing trust in MacOS X....
  • Previous by thread: why don't custom views have a "tag" in IB?
  • Next by thread: Re: why don't custom views have a "tag" in IB?
  • Index(es):
    • Date
    • Thread