I am using this in in swift code that then calls into objective-c. I could not get it to work at first but that was because the drawing code was in a objective-c framework where the framework was being loaded with a run path search path that was relative to the application. I had to modify the framework path to @rpath and switch to loading it using @loader_path.
It works now, but does seem fragile. Kevin Sent from my iPad > On 12 May 2015, at 07:43, Graham Cox <graham....@bigpond.com> wrote: > > I’m exploring the use of the new IB_DESIGNABLE macro to preview a custom view > live in IB. > > It keeps complaining that my view is taking too long to draw, over 200mS, > which seems to be a limit built into IB. However, when I measure the time > myself for drawing, it’s nowhere near this long - 10mS max, typically 2mS. > Because of this constant and apparently erroneous complaint, IB doesn’t show > my custom view. I’ve even tried to do some minimal drawing (just filling the > dirty rect) for just the Interface Builder target, but I get the same > problem, so it’s pretty clear that the timeout is nothing to do with my > drawing. > > At other times IB complains that the rendering agent “crashed”, though it’s > actually an exception from the bowels of Core Graphics. My usual drawing code > never triggers the same exception, only when it’s drawn by the IB rendering > agent. > > Has anyone been able to make this work? > > —Graham > > > > _______________________________________________ > > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) > > 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: > https://lists.apple.com/mailman/options/cocoa-dev/ktam%40yvs.eu.com > > This email sent to k...@yvs.eu.com _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com