mirror of
https://github.com/ivanvorobei/SwiftUI.git
synced 2026-04-24 09:38:36 +02:00
Still more fixes.
This commit is contained in:
@@ -18,10 +18,10 @@ struct CategoryRow: View {
|
||||
.padding(.leading, 15)
|
||||
.padding(.top, 5)
|
||||
|
||||
ScrollView(showsHorizontalIndicator: false) {
|
||||
ScrollView {
|
||||
HStack(alignment: .top, spacing: 0) {
|
||||
ForEach(self.items.identified(by: \.name)) { landmark in
|
||||
NavigationButton(
|
||||
NavigationLink(
|
||||
destination: LandmarkDetail(
|
||||
landmark: landmark
|
||||
)
|
||||
|
||||
@@ -33,20 +33,18 @@ struct CategoryHome: View {
|
||||
}
|
||||
.listRowInsets(EdgeInsets())
|
||||
|
||||
NavigationButton(destination: LandmarkList()) {
|
||||
NavigationLink(destination: LandmarkList()) {
|
||||
Text("See All")
|
||||
}
|
||||
}
|
||||
.navigationBarTitle(Text("Featured"))
|
||||
.navigationBarItems(trailing:
|
||||
PresentationButton(
|
||||
PresentationLink(destination: ProfileHost()) {
|
||||
Image(systemName: "person.crop.circle")
|
||||
.imageScale(.large)
|
||||
.accessibility(label: Text("User Profile"))
|
||||
.padding(),
|
||||
destination: ProfileHost()
|
||||
)
|
||||
)
|
||||
.padding()
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,10 +18,12 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
|
||||
// This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead).
|
||||
|
||||
// Use a UIHostingController as window root view controller
|
||||
let window = UIWindow(frame: UIScreen.main.bounds)
|
||||
window.rootViewController = UIHostingController(rootView: CategoryHome().environmentObject(UserData()))
|
||||
self.window = window
|
||||
window.makeKeyAndVisible()
|
||||
if let windowScene = scene as? UIWindowScene {
|
||||
let window = UIWindow(windowScene: windowScene)
|
||||
window.rootViewController = UIHostingController(rootView: CategoryHome().environmentObject(UserData()))
|
||||
self.window = window
|
||||
window.makeKeyAndVisible()
|
||||
}
|
||||
}
|
||||
|
||||
func sceneDidDisconnect(_ scene: UIScene) {
|
||||
|
||||
Reference in New Issue
Block a user