Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ActionSheet customization, improved dark mode #303

Merged
merged 1 commit into from
Apr 19, 2020

Conversation

futuretap
Copy link

@futuretap futuretap commented Apr 17, 2020

  • Added imageView, accessoryView for action sheet cells;
  • added cellLabelAlignment;
  • tuned (iOS 13 dark mode) action sheet appearance matching UIAlertController:
    • opaque cancel background color
    • vibrant title/message label
    • adjusted background color (dynamic for light/dark in iOS 13)
    • adjusted blur effect on iOS 13

This PR squashes all commits of #285 into one clean commit.

Added imageView, accessoryView for action sheet cells:
added cellLabelAlignment;
tuned (iOS 13 dark mode) action sheet appearance matching UIAlertController:
- opaque cancel background color
- vibrant title/message label
- adjusted background color (dynamic for light/dark in iOS 13)
- adjusted blur effect on iOS 13
@sberrevoets sberrevoets merged commit 0d0303f into sberrevoets:master Apr 19, 2020
@sberrevoets
Copy link
Owner

Thanks for this! I merged and then tweaked some stuff so I can keep track of what's going on in the future. I changed 2 things:

  1. I changed the API and developer expectations around the image/accessory views and brought them more in line with how UITableViewCell works. The image view is now provided by the framework and the developer can only set an image on it and provide constraints. I also made the layout for these two a bit more explicit, messing with existing constraints on a view that wasn't created by the framework felt a bit odd.

  2. Removed the cellLabelAlignment bit because the interaction felt a bit awkward because it had to be set for all actions at once and didn't apply to alert views. If this break some use case, let me know what it is and I can try to see if there's a nicer way to support this.

Let me know if the changes still support your use case and I will cut a new release.

@gereons
Copy link
Contributor

gereons commented Apr 21, 2020

I can't speak for @futuretap obviously, but I'd love to see this released :)

@futuretap
Copy link
Author

Thanks, @sberrevoets, this looks good, I appreciate your changes to make the API cleaner. I personally don't need cellLabelAlignment, so I'm fine with removing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants