Last active
June 9, 2020 21:04
-
-
Save archieedwards/cc8ecc58f5942459397a5af89636fd6f to your computer and use it in GitHub Desktop.
View to show Music and Podcasts ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct CategoryText: View { | |
@Binding var currentCategoryIndex : Int | |
@Binding var nestedPages : [Int] | |
var body: some View { | |
HStack(spacing: 20){ | |
Text("Music") | |
.font(.largeTitle).bold() | |
.foregroundColor(self.currentCategoryIndex == 0 ? .primary : .secondary) | |
.onTapGesture { | |
self.nestedPages = [0,0] | |
withAnimation(.easeIn,{ | |
self.currentCategoryIndex = 0 | |
}) | |
} | |
Text("Podcasts") | |
.font(.largeTitle).bold() | |
.foregroundColor(self.currentCategoryIndex == 1 ? .primary : .secondary) | |
.onTapGesture { | |
self.nestedPages = [0,0] | |
withAnimation(.easeIn,{ | |
self.currentCategoryIndex = 1 | |
}) | |
} | |
Spacer() | |
}.padding([.leading, .top]) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment