Post

Replies

Boosts

Views

Activity

Reply to Navigation View Problems
PAGE 1 import SwiftUI struct LandingView: View {     @State private var isActive = false          var body: some View {         NavigationView{                          VStack{                                  Text("FiTED")                     .frame(width: 400, height: 120, alignment: .topLeading)                     .font(.system(size: 100, weight: .medium))                     .foregroundColor(.niceblueColor)                                  Text("Improve your health and fitness, while learning")                     .frame(width: 400, height: 60, alignment: .topLeading)                     .font(.system(size: 25))                     .foregroundColor(.black)                 Spacer().frame(height: 500)                                  NavigationLink(destination:                                 MainView(), isActive: $isActive){                     Button(action: {                         isActive = true                     }){                         HStack{                             Text("Let's Go!")                             Image(systemName: "arrow.right.circle.fill")                         }                         .font(.system(size: 24, weight: .semibold))                         .foregroundColor(.white)                     }                                          .buttonStyle(PrimaryButtonStyle())                 }             }         }     }      }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Mar ’21
Reply to Navigation View Problems
PAGE 2 import SwiftUI struct MainView: View {     @State private var isActive = false     var body: some View {         NavigationView{                                       VStack{                 //Your Plan Button                 NavigationLink(destination:                                 Text("YES"), isActive: $isActive){                     Button(action: {                         isActive = true                     }){                         VStack{                             Image(systemName: "book.fill")                             Text("Your Plan")                                                      }                         .font(.system(size: 30, weight: .semibold))                         .foregroundColor(.niceblueColor)                         .padding(.bottom, 40)                     }                                                                      }                 //TrainingSplit Button                 NavigationLink(destination:                                 TrainingSplitView(), isActive: $isActive){                     Button(action: {                         isActive = true                     }){                         VStack{                             Image(systemName: "flame.fill")                             Text("Training Splits")                                                      }                         .font(.system(size: 30, weight: .semibold))                         .foregroundColor(.niceblueColor)                         .padding(.bottom, 40)                     }                                                }                 //Education Button                 NavigationLink(destination:                                 Text("YES"), isActive: $isActive){                     Button(action: {                         isActive = true                     }){                         VStack{                             Image(systemName: "textformat.123")                             Text("Education")                                                      }                         .font(.system(size: 30, weight: .semibold))                         .foregroundColor(.niceblueColor)                         .padding(.bottom, 40)                     }                                                                      }                                  //Nutrition Button                 NavigationLink(destination:                                 Text("YES"), isActive: $isActive){                     Button(action: {                         isActive = true                     }){                         VStack{                             Image(systemName: "chart.pie.fill")                             Text("Nutrition")                                                      }                         .font(.system(size: 30, weight: .semibold))                         .foregroundColor(.niceblueColor)                         .padding(.bottom, 40)                     }                                 }                 //Your Coach Button                 NavigationLink(destination:                                 Text("YES"), isActive: $isActive){                     Button(action: {                         isActive = true                     }){                         VStack{                             Image(systemName: "person.fill")                             Text("Your Coach")                                                      }                         .font(.system(size: 30, weight: .semibold))                         .foregroundColor(.niceblueColor)                         .padding(.bottom, 40)                     }                 }                 Spacer().frame(height:100)             }         }         .navigationBarBackButtonHidden(true)              } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Mar ’21
Reply to Navigation View Problems
I am also getting this in the console? SwiftUI encountered an issue when pushing aNavigationLink. Please file a bug. 2021-03-04 16:04:02.992353+0000 FiTED1[9178:552144] [Assert] displayModeButtonItem is internally managed and not exposed for DoubleColumn style. Returning an empty, disconnected UIBarButtonItem to fulfill the non-null contract.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Mar ’21
Reply to Navigation View Problems
PAGE 3 import SwiftUI struct TrainingSplitView: View{     var  body: some View{         NavigationView{             VStack{                 Text("YES")             }         }     } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Mar ’21