Hi. I develop first SwiftUI app.
Can't manage with this problem.
@SwiftyUserDefault(keyPath: \.gridEnabled) var gridEnabled
@State private var grid = false
@State private var selectedIndex: Int = 0
@State private var openAbout: Int? = nil
init() {
UITabBar.appearance().shadowImage = UIImage()
UITabBar.appearance().backgroundImage = UIImage()
UITabBar.appearance().isTranslucent = true
UITabBar.appearance().backgroundColor = UIColor(named: "ColorPrimaryDark")
UITabBar.appearance().unselectedItemTintColor = UIColor.white
}
var body: some View {
let menuView = MenuView(onMenuSelected: {
index in
print("Selected: \(index)")
if index == 3{
self.openAbout = 10
return
}
self.selectedIndex = index
})
return
NavigationView{
ZStack{
NavigationLink(destination: About().navigationBarTitle(Text("About the app"), displayMode: .inline), tag: 10, selection: self.$openAbout) {
EmptyView()
}.hidden()
TabView(selection: $selectedIndex) {
SoundList(grid: self.grid)
.tabItem {
Image("SoundIcon").renderingMode(.template)
Text("All sounds")
}
.tag(0)
SoundList(grid: self.grid, popular: true)
.tabItem {
Image("PopularIcon").renderingMode(.template)
Text("Popular")
}
.tag(1)
Favorite()
.tabItem {
Image("FavoriteIcon").renderingMode(.template)
Text("Favorite")
}
.tag(2)
} .listStyle(GroupedListStyle()).accentColor(Color("ColorAccent"))
.navigationBarTitle(Text("SleepGo"), displayMode: .inline).navigationBarColor(.clear).navigationBarItems(leading: Button(action: {
menuView.toggle()
}, label: {Image("MenuIcon")}), trailing: Button(action: {
self.gridEnabled = !self.gridEnabled
self.grid = self.gridEnabled
}, label: {Image(self.grid ? "GridIcon" : "ListIcon")})).background(Image("Background2").resizable().edgesIgnoringSafeArea(.all))
}
menuView
}.navigationViewStyle(StackNavigationViewStyle())
}
}
Test on iOS 13.1.2.
Blank screen inside NavigationView
Test on iOS 13.7
Everything is ok.
Please, help. How to fix it
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Hello. I want to make the macOS-app for recording the audio from system and other apps (music, video, etc).
Not microphone.
How can I make that? I see only options the recording from microphone.
Thanks in advance.