Skip to content

Commit

Permalink
fixup! Add EntryWidget UI
Browse files Browse the repository at this point in the history
This PR adds EntryWidget bottom sheet. In addition it adds the necessary
support files to be able to develop EntryWidget with SwiftUI.

MOB-3477
  • Loading branch information
rasmustautsglia committed Sep 24, 2024
1 parent d6cdd68 commit fa3049d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions GliaWidgets/Sources/EntryWidget/EntryWidget.swift
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ private extension EntryWidget {
let model = makeViewModel(
channels: channels,
selection: { channel in
// Logic for handling this callback will be handled later
// Logic for handling this callback will be handled later - MOB-3473
print(channel.headline)
}
)
Expand Down Expand Up @@ -86,7 +86,12 @@ private extension EntryWidget {
let hostingController = UIHostingController(rootView: view)

hostingController.view.backgroundColor = UIColor.white


Check warning on line 89 in GliaWidgets/Sources/EntryWidget/EntryWidget.swift

View workflow job for this annotation

GitHub Actions / SwiftLint

Trailing Whitespace Violation: Lines should not have trailing whitespace (trailing_whitespace)
// Due to the more modern sheet presenting approach being
// available starting from iOS 16, we need to handle cases
// where the visitor has either iOS 14 or 15 installed. For
// such visitors, we fall back on CustomPresentationController
//
if #available(iOS 16.0, *) {
guard let sheet = hostingController.sheetPresentationController else { return }
let smallDetent: UISheetPresentationController.Detent = .custom { _ in
Expand Down

0 comments on commit fa3049d

Please sign in to comment.