• 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: Unable to set View Tag in IB?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unable to set View Tag in IB?


  • Subject: Re: Unable to set View Tag in IB?
  • From: Alex Zavatone <email@hidden>
  • Date: Tue, 07 Apr 2015 10:32:14 -0400

I often add a custom key attribute in the IB to override the "buttons that no longer look like buttons" on iOS.

In the Identity Inspector (Command Option 3), there is a section titled "User Defined Runtime Attributes" where you can specify a value for a key.

For Example, I'll use this to set a view to have rounded rect corners:

Key Path
layer.cornerRadius

Type
Number

Value
5

On Apr 7, 2015, at 5:46 AM, Dave wrote:

>
>> On 6 Apr 2015, at 15:56, Jonathan Mitchell <email@hidden> wrote:
>
>> Tag is a readonly property for views. NSControl implements setTag:
>> If you defined a setNumberTag: method on your custom view you could use the user defined attributes in the NIB identity inspector to initialise the tag.
>
> Is there any reason why? Seems a bit nuts to not allow it on NSViews, I do it all the time with UIView.
>
>> You could also use the identity property.
>> Also see http://stackoverflow.com/questions/8492918/unique-id-on-nsviews
>>
>> HTH
>
> Yes, I’m using “ identifier” which better suits what I want to do anyway.
>
> All the Best
> Dave
>
>
> _______________________________________________
> 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


 _______________________________________________
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: 
 >Unable to set View Tag in IB? (From: Dave <email@hidden>)
 >Re: Unable to set View Tag in IB? (From: Jonathan Mitchell <email@hidden>)
 >Re: Unable to set View Tag in IB? (From: Dave <email@hidden>)

  • Prev by Date: Re: Fixing a build path after renaming a project
  • Next by Date: Re: Unable to set View Tag in IB?
  • Previous by thread: Re: Unable to set View Tag in IB?
  • Next by thread: Re: Unable to set View Tag in IB?
  • Index(es):
    • Date
    • Thread