Skip to content

Commit

Permalink
Clear background
Browse files Browse the repository at this point in the history
  • Loading branch information
nachonavarro committed Nov 22, 2019
1 parent 8d600a1 commit 8e4755a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion Sources/Pages/ModelPages.swift
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,9 @@ public struct ModelPages<Data, Content>: View where Data: RandomAccessCollection
bounce: bounce,
wrap: wrap,
controllers: (0..<items.count).map { i in
UIHostingController(rootView: template(i, items[i]))
let h = UIHostingController(rootView: template(i, items[i]))
h.view.backgroundColor = .clear
return h
}
)
if self.hasControl {
Expand Down
2 changes: 1 addition & 1 deletion Sources/Pages/PageViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ struct PageViewController: UIViewControllerRepresentable {
)
pageViewController.dataSource = context.coordinator
pageViewController.delegate = context.coordinator
//pageViewController.view.backgroundColor = .clear
pageViewController.view.backgroundColor = .clear

for view in pageViewController.view.subviews {
if let scrollView = view as? UIScrollView {
Expand Down
4 changes: 3 additions & 1 deletion Sources/Pages/Pages.swift
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,9 @@ public struct Pages: View {
bounce: bounce,
wrap: wrap,
controllers: pages.map {
UIHostingController(rootView: $0)
let h = UIHostingController(rootView: $0)
h.view.backgroundColor = .clear
return h
}
)
if self.hasControl {
Expand Down

0 comments on commit 8e4755a

Please sign in to comment.