Post

Replies

Boosts

Views

Activity

How to change Tabbar image in SwiftUI
I have a Tabbar which is created by SwiftUI, but I use different images for different status of selected Tabbar(selected and unselected), how can I do that. I tried to change image name in TabView1().onAppear() { tabImageName1 = "image1_active" tabImageName2 = "image2" tabImageName3 = "image3" tabImageName4 = "image4" } seems this not worked, and I think it's not so elegant, how can I change the image rightly, do we have better ways to do thing like this?
1
0
6.2k
Oct ’21
How to change Tabbar image in SwiftUI
I have a Tabbar which is created by SwiftUI, but I use different images for different status of selected Tabbar(selected and unselected), how can I do that. I tried to change image name in TabView1().onAppear() { tabImageName1 = "image1_active" tabImageName2 = "image2" tabImageName3 = "image3" tabImageName4 = "image4" } seems this not worked, and I think it's not so elegant, how can I change the image rightly, do we have better ways to do thing like this?
Replies
1
Boosts
0
Views
6.2k
Activity
Oct ’21