SvenTiigi / WhatsNewKit

Showcase your awesome new app features 📱
https://sventiigi.github.io/WhatsNewKit/
MIT License
3.87k stars 190 forks source link

Using a custom button as completion button #19

Closed vince-carpino closed 5 years ago

vince-carpino commented 5 years ago

Throughout my app, I've utilized FlatUIKit's FUIButton.

Is it possible to use a custom button such as this as the completion button?

SvenTiigi commented 5 years ago

Hey @vince-carpino,

Currently WhatsNewKit doesn't support this feature.

In order to allow customizing the Buttons to a special style I would propose a customization closure which would be available on the DetailButton and CompletionButton configuration struct.

var configuration = WhatsNewViewController.Configuration()

configuration.detailButton.customization = { button in
    // TODO: Configure the DetailButton
}

configuration.completionButton.customization = { button in
    // TODO: Configure the CompletionButton
}

I've already implemented this API on the feature/button-customization Branch. Please let me know if this change fits your needs.

vince-carpino commented 5 years ago

Thanks for your quick reply.

I tried your suggestion but I don't think that what I'm looking for is possible, at least as far as my rather limited iOS development knowledge allows. I don't think Cocoapods have the ability to use each others libraries, which I believe is what I would need in order to make this work.

Please let me know if I'm wrong.

SvenTiigi commented 5 years ago

Hey @vince-carpino,

The intent of the customization closure is to post configure / customize the DetailButton or CompletionButton to your needs. For example you could apply the same effects to the Button as FlatUIKit does with its FUIButton.

Of course it would be easier for you if you could simply pass in a pre-initialized UIButton instance. Implementing this kind of API would lead to some breaking changes which would be better placed in an upcoming 2.0 version of WhatsNewKit.

SvenTiigi commented 5 years ago

Closing due inactivity. Feel free to re-open the issue at any time.