Thanks Jens, I've just implemented a different solution as I since found that CIFilter instance on iOS has a name read only property which I hadn't noticed.
So instead I've replaced the array of filters in my filter chain object with an array of dictionaries. Each dictionary has a name and a filter attribute. This way I get the behaviour I need and it works for both iOS and OS X. Nothing clever about it but it's nice having a common solution for both. Kevin On 7 Oct 2014, at 16:00, Jens Alfke <j...@mooseyard.com> wrote: > >> On Oct 7, 2014, at 1:09 AM, Kevin Meaney <k...@yvs.eu.com> wrote: >> >> This category is not in any of the iOS frameworks as far as I can tell. So >> it looks like the only way I can get the same behaviour on iOS is using >> associated objects/references. > > That sounds reasonable. > >> I'm not comfortable with this solution, it feels too much like a hack so I'm >> asking a couple of questions before going ahead. > > I don't think so; if anything, associated objects are the solution for the > real hacks people used to use to do this :) > >> Is there an alternative less hacky solution I've missed? > > You can create a global weak-key NSMapTable that maps CIFilter objects to > NSStrings. > > —Jens _______________________________________________ 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