luispadron / UIEmptyState

An empty state control to give visually appealing context when building iOS applications.
MIT License
178 stars 34 forks source link

incorrect button background color #14

Closed dexcell closed 6 years ago

dexcell commented 6 years ago

Setting button background color has no effect,

See the compiled example taken from latest github code (no red button color):

screen shot 2017-12-22 at 01 45 40
luispadron commented 6 years ago

I believe this is a bug in the example project and not actually the library. I’ll take a look at it and see why it’s not showing up.

Thanks for the report!

dexcell commented 6 years ago

Hi Luis, thanks for the response.

It would be nice to have emptyStateButton on data source, so we can customize button looks there. (or kind of willDisplayButton func)

luispadron commented 6 years ago

You can do this already, just conform to UIEmptyStateDelegate.emptyStateViewWillShow. Here you can downcast UIView to UIEmptyStateView, this allows access to all the subviews.

I just haven’t updated the example project to use this method, which is probably why it’s not working correctly.

luispadron commented 6 years ago

Fixed in latest commit!

dexcell commented 6 years ago

Awesome! thanks for the example, it's working as expected now.