Skip to content

Commit

Permalink
Merge pull request #13 from quassummanus/feature/automatically-sized-…
Browse files Browse the repository at this point in the history
…content

Fixed content overflow for small parent views
  • Loading branch information
bring-shrubbery authored Aug 2, 2021
2 parents 8f71c6a + 7050a22 commit 930d941
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ After you added the package, all you need to do is import it and you can add a t

## Usage

### Example 1
### Basic use case

As the first example, the `Text` view is provided as the tooltip content and it's attached to the other `Text` view.
Below you can see the example of code that is required to create the tooltip and the result you see on the screen.
Expand All @@ -41,7 +41,7 @@ Text("Say something nice...")

![example 1](images/example_1.jpg)

### Example 2
### Using custom configuration to add a jumping animation

Second example shows you how you can add jumping animation to the tooltip from the first example.

Expand Down
1 change: 1 addition & 0 deletions Sources/SwiftUITooltip/TooltipModifier.swift
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ struct TooltipModifier<TooltipContent: View>: ViewModifier {
ZStack {
content
.padding(self.config.contentPaddingEdgeInsets)
.fixedSize()
}
.background(self.sizeMeasurer)
.overlay(self.arrowView)
Expand Down

0 comments on commit 930d941

Please sign in to comment.