vicpenap / PrettyKit

PrettyKit for iOS is a small set of new widgets and UIKit subclasses that gives you a deeper UIKit customization. You will be able to change their background color, add gradients, shadows, etc.
http://vicpenap.github.com/PrettyKit
Other
1.22k stars 155 forks source link

ARC Support #23

Open ryanolson opened 12 years ago

ryanolson commented 12 years ago

Adds ARC support

vicpenap commented 12 years ago

Cool! I'm not sure yet of when adding that, though. As I have already published a version without ARC, I'm not sure of how to bring ARC support.

Shall I switch to ARC and break compatibility with non-ARC projects that are currently using the lib? Or shall I detect if ARC is enabled or not, and manage memory manually in the latter case? Anyway, your patch just removes explicit memory management, so detecting ARC support would need an extra effort.

thomasconner commented 12 years ago

You could release two versions of the library. An ARC version and a non-ARC version. Similar to how SDWebImage does.

thomasconner commented 12 years ago

I would like to use this library but my project currently uses ARC also. Maybe using something like the following would allow you to support both version in one library.

 #if __has_feature(objc_arc)
     // has ARC
 #else
    // doesnt have ARC
 #endif
vicpenap commented 12 years ago

Yes, that's one alternative. The other one is supporting only ARC. I will probably choose the latter.

However, you can use PrettyKit in the meanwhile, if you import It through CocoaPods. CocoaPods will manage ARC and non-ARC code automagically :)

No dia 08/09/2012, às 21:16, Thomas Conner notifications@github.com escreveu:

I would like to use this library but my project currently uses ARC also. Maybe using something like the following would allow you to support both version in one library.

if __has_feature(objc_arc)

 // has ARC

else

// doesnt have ARC

endif

— Reply to this email directly or view it on GitHubhttps://github.com/vicpenap/PrettyKit/pull/23#issuecomment-8396853.