generated from Awesomeplayer165/Template
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Vertically center PillView subviews according to font line height and…
… pillView heights Ensure font size does not exceed PillView height Rename files to start with Pill*
- Loading branch information
1 parent
a358b8d
commit bba448a
Showing
4 changed files
with
137 additions
and
130 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// | ||
// PillPosition.swift | ||
// --- | ||
|
||
/// Defines the position of the ``PillboxView/PillView`` respective to it's view container as an offset | ||
/// Also provide the ability to show the ``PillboxView/PillView`` appearing from the top ``fromTop`` or from the bottom | ||
/// ``fromBottom`` of the container's edge | ||
/// Default position is `.fromTop` with and offset of 25 | ||
import CoreGraphics | ||
|
||
public struct PillPosition { | ||
enum AnimationDirection { | ||
case fromTop | ||
case fromBottom | ||
} | ||
var direction: AnimationDirection | ||
var offsetFromEdge: CGFloat | ||
|
||
init() { | ||
self.direction = .fromTop | ||
self.offsetFromEdge = CGFloat(25.0) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.