• 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: Custom initWithFrame?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Custom initWithFrame?


  • Subject: Re: Custom initWithFrame?
  • From: Chris Hanson <email@hidden>
  • Date: Sat, 05 Jan 2013 00:24:07 -0800

On Jan 3, 2013, at 5:28 PM, Eric Dolecki <email@hidden> wrote:

> I am creating a UIView-based control that I would also like to pass in parameters at the time of creation. Is this doable? I don't want to keep calling methods on my object if I can pass all with initwithframe somehow.

This is only the case if you instantiate it directly rather than in a xib or storyboard. If you do that, -initWithFrame: will be your designated initializer as with all custom views.

You can supply other values via the custom properties mechanism in IB; this will invoke the setters for those properties via KVC, but only supports setting properties of plist types.

  -- Chris
_______________________________________________

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

  • Follow-Ups:
    • Re: Custom initWithFrame?
      • From: Eric Dolecki <email@hidden>
References: 
 >Custom initWithFrame? (From: Eric Dolecki <email@hidden>)

  • Prev by Date: Re: Floating-point differences between ARM processors
  • Next by Date: Re: Floating-point differences between ARM processors
  • Previous by thread: Re: Custom initWithFrame?
  • Next by thread: Re: Custom initWithFrame?
  • Index(es):
    • Date
    • Thread