-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added QuickReplyView which displays left-aligned button's grid Added handling QR button actions Added displaying QR messages MOB-2395
- Loading branch information
Egor Egorov
authored and
github-review-helper
committed
Jul 21, 2023
1 parent
26547eb
commit 53f16d1
Showing
15 changed files
with
472 additions
and
58 deletions.
There are no files selected for viewing
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
24 changes: 24 additions & 0 deletions
24
GliaWidgets/Sources/Component/Button/AdjustedTouchAreaButton.swift
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,24 @@ | ||
import UIKit | ||
|
||
class AdjustedTouchAreaButton: UIButton { | ||
private var touchAreaInsets: TouchAreaInsets? | ||
|
||
init(touchAreaInsets: TouchAreaInsets? = nil) { | ||
super.init(frame: .zero) | ||
self.touchAreaInsets = touchAreaInsets | ||
} | ||
|
||
required init?(coder: NSCoder) { | ||
fatalError("init(coder:) has not been implemented") | ||
} | ||
|
||
override func point(inside point: CGPoint, with event: UIEvent?) -> Bool { | ||
guard let insets = touchAreaInsets else { | ||
return super.point(inside: point, with: event) | ||
} | ||
|
||
let area = bounds.insetBy(dx: insets.dx, dy: insets.dy) | ||
|
||
return area.contains(point) | ||
} | ||
} |
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
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
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
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.