vtourraine / AcknowList

Acknowledgements screen displaying a list of licenses, for example from CocoaPods and Swift Package Manager dependencies.
MIT License
798 stars 60 forks source link

How to filter acknowledgements by its type #23

Closed naoty closed 8 years ago

naoty commented 8 years ago

I previously sent a pull request (https://github.com/vtourraine/AcknowList/pull/17). But, I wonder how I should filter acknowledgements by its type.

In my opinion, AcknowListViewController's acknowledgements property should be public or AcknowListViewController should provide methods to filter by them.

What do you think?

vtourraine commented 8 years ago

You’re correct, one piece of API is missing here. As you suggested, the obvious solution would be to mark the acknowledgements property as public (or rather open). It seems to me like a better solution would be to add a new initializer taking an array of Acknow as the parameter, but I think this would have limitations given the weird potential life cycle of view controllers (loaded from NIB, restored from auto-save, etc).

So, if you want to send a pull-request to mark the property as open, I’ll be happy to merge it in. And if somebody has a better solution, I’m all ears.

naoty commented 8 years ago

OK. I will send pull requests to mark acknowledgements property as open in Swift 3 and to mark it as public in Swift 2.3.

vtourraine commented 8 years ago

Implemented with #24 and #25