Swiftui 如何调整选项卡视图图像的大小?(第14章)

Swiftui 如何调整选项卡视图图像的大小?(第14章),swiftui,ios14,Swiftui,Ios14,在我安装了iOS 14标签后,视图图标的大小发生了变化,现在看起来很难看。如何减小图像的大小?我尝试了.font(.system(大小:15)),但没有受到影响 这回答了你的问题吗?@Asperi谢谢,但只为图像大小编写自定义选项卡视图不是一个好主意。我试过了,字体大小更改技巧在iOS 14上不起作用。 TabView(selection: self.$authVM.selectedTab) { HomeTab()

在我安装了iOS 14标签后,视图图标的大小发生了变化,现在看起来很难看。如何减小图像的大小?我尝试了.font(.system(大小:15)),但没有受到影响


这回答了你的问题吗?@Asperi谢谢,但只为图像大小编写自定义选项卡视图不是一个好主意。我试过了,字体大小更改技巧在iOS 14上不起作用。
TabView(selection: self.$authVM.selectedTab) {
                                HomeTab()
                                    .tabItem {
                                        Image(systemName: "house.fill")
                                            .renderingMode(.template)
                                            .font(.system(size: 15))
                                        Text("Home")
                                }.tag(SelectedTab.home)
                                SwapsTab()
                                    .tabItem {
                                        Image(systemName: "hand.draw.fill")
                                            .renderingMode(.template)
                                            .font(.system(size: 15))
                                        Text("Swaps")
                                }.tag(SelectedTab.swaps)
                                DiscoverTab()
                                    .tabItem {
                                        Image(systemName: "gamecontroller.fill")
                                            .renderingMode(.template)
                                            .font(.system(size: 15))
                                        Text("Discover")
                                }.tag(SelectedTab.discover)
                                NotificationsTab()
                                    .tabItem {
                                        Image(systemName: "bell.fill")
                                            .renderingMode(.template)
                                            .font(.system(size: 15))
                                        Text("Notifications")
                                }.tag(SelectedTab.notifications)
                                MessagesTab()
                                    .tabItem {
                                        Image(systemName: "envelope.fill")
                                            .renderingMode(.template)
                                            .font(.system(size: 15))
                                        Text("Messages")
                                }.tag(SelectedTab.messages)
}