• 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: IB_DESIGNABLE - anyone got it to work?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: IB_DESIGNABLE - anyone got it to work?


  • Subject: Re: IB_DESIGNABLE - anyone got it to work?
  • From: Graham Cox <email@hidden>
  • Date: Wed, 13 May 2015 09:58:27 +1000

> On 13 May 2015, at 9:37 am, Roland King <email@hidden> wrote:
>
> How are you loading the resource? [ NSBundle mainBundle ] .. ] probably won’t work, you need to use bundleForClass. Since that’s now true for resources in frameworks too I’m trying to use that pattern myself.

Yes, I’m using -bundleForClass - you never know when you might move a handy object into a framework:)


> Definitely live-updating works

Yep, now I’ve got past the basic problems this is working as expected.


> The other two things, lack of enumerated types and IB not removing the property are definitely issues, especially the enumerated types which would be very useful.


I think I’ve got to the root cause of this. IB is using -initWithCoder: to initialise the view, even though “prefer coder” is unchecked. That means all the initialisation I’m doing in -initWithFrame: is being bypassed, leading to some non-useful default values. Also, the -prepareForInterfaceBuilder method is being called every time a property is changed, as part of the updating of the preview. No problem, except it means it’s not a good place to set up default property values. Some refactoring of my init methods will sort this out, though so would IB honouring the ‘prefer coder’ setting.

—Graham



_______________________________________________

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


References: 
 >IB_DESIGNABLE - anyone got it to work? (From: Graham Cox <email@hidden>)
 >Re: IB_DESIGNABLE - anyone got it to work? (From: Sean McBride <email@hidden>)
 >Re: IB_DESIGNABLE - anyone got it to work? (From: Graham Cox <email@hidden>)
 >Re: IB_DESIGNABLE - anyone got it to work? (From: Roland King <email@hidden>)

  • Prev by Date: Re: IB_DESIGNABLE - anyone got it to work?
  • Next by Date: Re: IB_DESIGNABLE - anyone got it to work?
  • Previous by thread: Re: IB_DESIGNABLE - anyone got it to work?
  • Next by thread: App is not running with the release build
  • Index(es):
    • Date
    • Thread