Post

Replies

Boosts

Views

Activity

Reply to List Closure not displaying retrieved data in Simulator UI
Here is what I propose to test for onAppear var body: some View { NavigationStack { ZStack { List(NotionCaller.extractedContent) { block in ForEach(block.ExtractedFields, id: \.self) { field in Text(field) } } .onAppear { // <<-- EITHER HERE NotionCaller.makeAPIRequest() } ZStack { Color(hex: "#f9f9f9") .ignoresSafeArea() VStack { TextField(" Search keywords", text: $searchKeywords) //change font later .frame(height: 48) .overlay(RoundedRectangle(cornerRadius: 30).strokeBorder(style: StrokeStyle())) .foregroundColor(.white) .background(.white) .cornerRadius(30) .padding() .scaledToFit() .frame(maxHeight: .infinity, alignment: .top) } VStack { Spacer() Divider() .padding() HStack { Button(action: { //add functionality later }) { Image("menuButton") .frame(alignment: .bottom) .padding(.horizontal, 42) Spacer() } HStack { Button(action: { //add functionality later }) { Image("notificationButton") .frame(alignment: .leading) .padding(.leading, 30) Spacer() } } HStack { Button(action: { }) { Image("notionImportButton") .frame( alignment: .trailing) .padding(.horizontal) .padding(.horizontal) } } } // .onAppear { // <<-- NOT HERE // NotionCaller.makeAPIRequest() // } } } } .onAppear { // <<-- OR HERE NotionCaller.makeAPIRequest() } } } }
Topic: Community SubTopic: Apple Developers Tags:
Jul ’24
Reply to App Store Connect / Trends issue
I face the same problem and filed a bug report: Jul 10, 2024 at 11:14 AM – FB14261684 Here is FB content: I cannot access AppStoreConnect (Trends and sales, overview…) on some iMac: iMac mini Pro, macOS 14.5, Safari Technology Preview Release 197 (Safari 18.0, WebKit 19619.1.18) Same Mac, with Safari Version 17.5 (19618.2.12.11.6) I get the error message When I click on contact us, I get nothing as shown I tested on another iMac (27", 2015) with MacOS 12.7 and Safari Technology Preview Release 171 (Safari 16.4, WebKit 17616.1.15) It works as expected I tested on iPhone Xs, iOS 17.4 It works as expected
Jul ’24
Reply to Can't figure out why Toolbar is not conforming to view
Welcome to the forum. I tested your code (after completing missing parts and removing reference to unknown structure) and it works OK, both with Xcode 16.0ß2 and Xcode 15.0.1. Are you sure you have declared var as State vars ? Have you declared dismiss ? Aren't you missing a closing curly bracket somewhere ? Where exactly do you get the error ? Please show the exact and complete code, as well as your configuration (Xcode version, system version…) Here is the complete code I tested: struct ContentView: View { @State var companyName: String = "" @State var role: String = "" @State var location: String = "" @State var yearlySalary: Double = 0 @Environment(\.dismiss) var dismiss var body: some View { NavigationStack { Form { TextField("Company Name", text: $companyName) TextField("Role", text: $role) TextField("Location", text: $location) TextField("Yearly Salary", value: $yearlySalary, format: .currency(code: "USD")) .keyboardType(.decimalPad) } .navigationTitle("Add Application") .navigationBarTitleDisplayMode(.large) .toolbar { ToolbarItem(placement: .navigationBarLeading) { Button("back") { dismiss() } } ToolbarItem(placement: .navigationBarTrailing) { Button("Save") { // let appdata = ApplicationData( // companyName: companyName, // role: role, // location: location, // yearlySalary: yearlySalary, // dateApplied: dateApplied, // notes: notes) // // Save the application data dismiss() } } } } } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jul ’24
Reply to Ios 18.0
Bem-vindo ao fórum Mais informações aqui: https://support.apple.com/en-au/108763 De futuro, é melhor evitar instalar versões beta, a menos que seja um utilizador experiente. Get details here: https://support.apple.com/en-au/108763 In the future, you should probably avoid installing betas unless you are an experienced user.
Jul ’24
Reply to List Closure not displaying retrieved data in Simulator UI
Here is what I propose to test for onAppear var body: some View { NavigationStack { ZStack { List(NotionCaller.extractedContent) { block in ForEach(block.ExtractedFields, id: \.self) { field in Text(field) } } .onAppear { // <<-- EITHER HERE NotionCaller.makeAPIRequest() } ZStack { Color(hex: "#f9f9f9") .ignoresSafeArea() VStack { TextField(" Search keywords", text: $searchKeywords) //change font later .frame(height: 48) .overlay(RoundedRectangle(cornerRadius: 30).strokeBorder(style: StrokeStyle())) .foregroundColor(.white) .background(.white) .cornerRadius(30) .padding() .scaledToFit() .frame(maxHeight: .infinity, alignment: .top) } VStack { Spacer() Divider() .padding() HStack { Button(action: { //add functionality later }) { Image("menuButton") .frame(alignment: .bottom) .padding(.horizontal, 42) Spacer() } HStack { Button(action: { //add functionality later }) { Image("notificationButton") .frame(alignment: .leading) .padding(.leading, 30) Spacer() } } HStack { Button(action: { }) { Image("notionImportButton") .frame( alignment: .trailing) .padding(.horizontal) .padding(.horizontal) } } } // .onAppear { // <<-- NOT HERE // NotionCaller.makeAPIRequest() // } } } } .onAppear { // <<-- OR HERE NotionCaller.makeAPIRequest() } } } }
Topic: Community SubTopic: Apple Developers Tags:
Replies
Boosts
Views
Activity
Jul ’24
Reply to App Store Connect / Trends issue
I face the same problem and filed a bug report: Jul 10, 2024 at 11:14 AM – FB14261684 Here is FB content: I cannot access AppStoreConnect (Trends and sales, overview…) on some iMac: iMac mini Pro, macOS 14.5, Safari Technology Preview Release 197 (Safari 18.0, WebKit 19619.1.18) Same Mac, with Safari Version 17.5 (19618.2.12.11.6) I get the error message When I click on contact us, I get nothing as shown I tested on another iMac (27", 2015) with MacOS 12.7 and Safari Technology Preview Release 171 (Safari 16.4, WebKit 17616.1.15) It works as expected I tested on iPhone Xs, iOS 17.4 It works as expected
Replies
Boosts
Views
Activity
Jul ’24
Reply to Can't figure out why Toolbar is not conforming to view
Welcome to the forum. I tested your code (after completing missing parts and removing reference to unknown structure) and it works OK, both with Xcode 16.0ß2 and Xcode 15.0.1. Are you sure you have declared var as State vars ? Have you declared dismiss ? Aren't you missing a closing curly bracket somewhere ? Where exactly do you get the error ? Please show the exact and complete code, as well as your configuration (Xcode version, system version…) Here is the complete code I tested: struct ContentView: View { @State var companyName: String = "" @State var role: String = "" @State var location: String = "" @State var yearlySalary: Double = 0 @Environment(\.dismiss) var dismiss var body: some View { NavigationStack { Form { TextField("Company Name", text: $companyName) TextField("Role", text: $role) TextField("Location", text: $location) TextField("Yearly Salary", value: $yearlySalary, format: .currency(code: "USD")) .keyboardType(.decimalPad) } .navigationTitle("Add Application") .navigationBarTitleDisplayMode(.large) .toolbar { ToolbarItem(placement: .navigationBarLeading) { Button("back") { dismiss() } } ToolbarItem(placement: .navigationBarTrailing) { Button("Save") { // let appdata = ApplicationData( // companyName: companyName, // role: role, // location: location, // yearlySalary: yearlySalary, // dateApplied: dateApplied, // notes: notes) // // Save the application data dismiss() } } } } } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jul ’24
Reply to Ios 18.0
Bem-vindo ao fórum Mais informações aqui: https://support.apple.com/en-au/108763 De futuro, é melhor evitar instalar versões beta, a menos que seja um utilizador experiente. Get details here: https://support.apple.com/en-au/108763 In the future, you should probably avoid installing betas unless you are an experienced user.
Replies
Boosts
Views
Activity
Jul ’24