• 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: iOS Category to match OS X category
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: iOS Category to match OS X category


  • Subject: Re: iOS Category to match OS X category
  • From: Kevin Meaney <email@hidden>
  • Date: Tue, 07 Oct 2014 16:30:41 +0100

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 <email@hidden> wrote:

>
>> On Oct 7, 2014, at 1:09 AM, Kevin Meaney <email@hidden> 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 (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: 
 >iOS Category to match OS X category (From: Kevin Meaney <email@hidden>)
 >Re: iOS Category to match OS X category (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: iOS Category to match OS X category
  • Next by Date: Questions on using a NSTextView as a source viewer.
  • Previous by thread: Re: iOS Category to match OS X category
  • Next by thread: Displaying Sheets
  • Index(es):
    • Date
    • Thread