Post

Replies

Boosts

Views

Activity

Reply to List Sections
Here is the content: struct layout: View {     var data: RestaurantListViewModel     var body: some View {         HStack {             URLImage(data.imageUrl) { image in                 image                     .resizable()                     .aspectRatio(contentMode: .fill)                     .clipped()                     .frame(maxWidth: 30, maxHeight: 30)                     .padding()             }             Text(data.name)                 .padding()             HStack {                 (rating logic)             }             Button(action: {                 print("opening site pressed")                 if let url = URL(string: data.url) {                     UIApplication.shared.open(url)                 }             }) { //                Text("More Info")                 Image("yelp logo")                     .resizable()                     .aspectRatio(contentMode: .fit)                     .frame(maxWidth: 30)             }         }     } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Sep ’21
Reply to List Sections
I am so sorry for the confusion, here is everything: struct Final_Restaurant_View: View {     var data: [RestaurantListViewModel]     @State private var isHome = false     var body: some View {         NavigationView{             VStack {                 if data.count == 0 {                     Text("No Picks Found")                 }else {                     List(data) {                         data in                         Section(header: Text("GroupPicks")) {                             layout(data: data)                         } //                        layout(data: data)                     }                     .listStyle(GroupedListStyle())                 }                 Button(action: {                     isHome = true                 }, label: {                     Text("Go Home")                 })                 .padding()             }             .fullScreenCover(isPresented: $isHome, content: {                 ContentView(join: false)             })             .navigationBarTitle("Results")         }     } } struct layout: View {     var data: RestaurantListViewModel     var body: some View {         HStack {             URLImage(data.imageUrl) { image in                 image                     .resizable()                     .aspectRatio(contentMode: .fill)                     .clipped()                     .frame(maxWidth: 30, maxHeight: 30)                     .padding()             }             Text(data.name)                 .padding()             HStack {                 (Star Rating Logic             }             Button(action: {                 print("opening site pressed")                 if let url = URL(string: data.url) {                     UIApplication.shared.open(url)                 }             }) { //                Text("More Info")                 Image("yelp logo")                     .resizable()                     .aspectRatio(contentMode: .fit)                     .frame(maxWidth: 30)             }         }     } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Sep ’21
Reply to List Sections
Here is the content: struct layout: View {     var data: RestaurantListViewModel     var body: some View {         HStack {             URLImage(data.imageUrl) { image in                 image                     .resizable()                     .aspectRatio(contentMode: .fill)                     .clipped()                     .frame(maxWidth: 30, maxHeight: 30)                     .padding()             }             Text(data.name)                 .padding()             HStack {                 (rating logic)             }             Button(action: {                 print("opening site pressed")                 if let url = URL(string: data.url) {                     UIApplication.shared.open(url)                 }             }) { //                Text("More Info")                 Image("yelp logo")                     .resizable()                     .aspectRatio(contentMode: .fit)                     .frame(maxWidth: 30)             }         }     } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Sep ’21
Reply to List Sections
I am so sorry for the confusion, here is everything: struct Final_Restaurant_View: View {     var data: [RestaurantListViewModel]     @State private var isHome = false     var body: some View {         NavigationView{             VStack {                 if data.count == 0 {                     Text("No Picks Found")                 }else {                     List(data) {                         data in                         Section(header: Text("GroupPicks")) {                             layout(data: data)                         } //                        layout(data: data)                     }                     .listStyle(GroupedListStyle())                 }                 Button(action: {                     isHome = true                 }, label: {                     Text("Go Home")                 })                 .padding()             }             .fullScreenCover(isPresented: $isHome, content: {                 ContentView(join: false)             })             .navigationBarTitle("Results")         }     } } struct layout: View {     var data: RestaurantListViewModel     var body: some View {         HStack {             URLImage(data.imageUrl) { image in                 image                     .resizable()                     .aspectRatio(contentMode: .fill)                     .clipped()                     .frame(maxWidth: 30, maxHeight: 30)                     .padding()             }             Text(data.name)                 .padding()             HStack {                 (Star Rating Logic             }             Button(action: {                 print("opening site pressed")                 if let url = URL(string: data.url) {                     UIApplication.shared.open(url)                 }             }) { //                Text("More Info")                 Image("yelp logo")                     .resizable()                     .aspectRatio(contentMode: .fit)                     .frame(maxWidth: 30)             }         }     } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Sep ’21
Reply to iPhone 13 pro max Problems with google meet
ask on apple forums not dev apple forums
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Sep ’21
Reply to SwiftUI Previews - Disk space issue
That does'n work for me, terminal says Using Previews Device Set: '/Users/mcrich/Library/Developer/Xcode/UserData/Previews/Simulator Devices'
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’21
Reply to Lost Connection
Update: Until Monterey had come out, the non-beta would not work.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Nov ’21
Reply to SwiftUI NavLink Dismiss
.onDisappear did not work, but .onAppear did. Thx so much!
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Nov ’21
Reply to Xcode backward compatibility
Yes, but new frameworks are just not built into older versions and therefore will not compile the project.
Replies
Boosts
Views
Activity
Dec ’21
Reply to There has been no response to the account reinstatement request
Do you know why it was taken down? Try checking the resolution center in App Store Connect.
Replies
Boosts
Views
Activity
Dec ’21
Reply to Xcode 13 Fails To Run On iOS Devices
Clean build data and delete Derived Data?
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Dec ’21
Reply to Apple developer account is still pending
Contact apple dev support
Replies
Boosts
Views
Activity
Dec ’21
Reply to iDrive stuck uploading deleted Files. Where ist the iDrive upload queue?
Pls ask this on the apple forums and not the developer forums. We cannot really help you and this is an outlet for developers to get help on Xcode and it's tools as well as issues with code.
Replies
Boosts
Views
Activity
Dec ’21
Reply to Preview failed to build
Preview often breaks, wait until Xcode 13.3 I guess. You can also try deleting Xcode, then all the preview data and then reinstalling Xcode.
Replies
Boosts
Views
Activity
Dec ’21
Reply to Text background color
Try looking through this: https://www.hackingwithswift.com/books/ios-swiftui/colors-and-frames
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Dec ’21
Reply to Limit width of wheel style picker on iOS
Please make sure you are on Xcode 13.2.1 and try again.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Dec ’21
Reply to SwiftUI on mac, button keyboard shortcut not working on Menu's Button
Try updating to Xcode 13.2.1
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Dec ’21