Post

Replies

Boosts

Views

Activity

Reply to Hiding the tabBar
@DTS Engineer I am using the new Tab API struct RoutingUIView: View { var body: some View { TabView { Tab("Posts", systemImage: "square.fill.text.grid.1x2") { MailView() } Tab("Settings", systemImage: "gearshape") { SettingsView() } } } } struct MailView: View { var body: some View { NavigationStack { List { NavigationLink("An important post...") { Text("Lorem ipsum.") .toolbar(.hidden, for: .tabBar) } } .navigationTitle("Posts") } } }
Sep ’24
Reply to Image aspect ratio
So this more effectively achieved what I wanted, but again as a newbie to SwiftUI coming from CSS, it feels far from intuitive and bizarre that I have to specify the aspectRatio modifier twice: Image(.personsmiling) .resizable() .aspectRatio(contentMode: .fill) .frame(minWidth: 0, maxWidth: .infinity, minHeight: 0, maxHeight: .infinity) .aspectRatio(1/1, contentMode: .fill) .clipped()
Aug ’24
Reply to Image aspect ratio
I managed to work out a solution. It is crazy to me that the solution is this indirect and complex and unintuitive. Color.red .aspectRatio(1, contentMode: .fill) .overlay { Image(.liberaltears) .resizable() .scaledToFill() } .clipped() .padding()
Aug ’24