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

[S] Add cutout and gradient background #239

Merged

Conversation

Grimlock257
Copy link
Contributor

@Grimlock257 Grimlock257 commented Jul 11, 2022

Change description

This PR should provide some additional functionality to the library. This includes:

  • the ability to have a cutout in the mask to "highlight" the content the PopTip is pointing to with the option to call a separate closure when this area is tapped, as well as allowing the consumer to specify a closure that can control the path generated for the cutout. The example has been modified to demo this via the topRight button as an alternating appearing feature (implements Highlight/spotlight view on tooltip display #194)
  • the ability to provide CALayer via a closure that can allow the consumer to do whatever they want with the bubble background. The example has been modified to include a gradient background for the bottomLeft button (implements Feature:Support gradient background color #201)

The README.md has been edited to:

  • include some missing customisation options already present in the library
  • include new information around the functionality added

Testing

Testing the functionality should be entirely possible via the demo project already included within the project as I just edited the topRight and bottomLeft button actions to modify the PopTip conditionally. However, (hopefully enough) instructions are available in the updated README.md

Closing notes

If there are any issues, or questions around these changes, please let me know! If all is good with this @andreamazz, it'd be great to be able to have it merged and the version bumped as appropriate! 😄

As an aside, when using the SwiftUI func show, if the SwiftUI view contents is too wide, it expands the bubble to be off the screen, thus losing/"clipping" content. For a more basic SwiftUI view that is a simple VStack containing two child Text elements with long text, the text will not wrap as desired either.

@andreamazz
Copy link
Owner

Hey @Grimlock257
Top notch PR, love the new features. Thank you for your contribution, I'll merge and release a new version.

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.

2 participants