Post

Replies

Boosts

Views

Activity

Reply to Type of expression is ambiguous without more context
What is this line ?                NavigationLink(<Text>(VStack { Is it really the code ? It is full of errors. I've tried to change, guessing for some parts that were missing. struct ContentView: View { @State var checknewHour: String = "0" @State var checknewMinute: String = "0" var body: some View { NavigationView { // <<-- error was here ???? Form { Group { List { VStack { NavigationLink(destination: SomeOtherView()) { // <<-- Need to specify this view VStack { // REMOVED -->> NavigationLink(<Text>(VStack { ScrollView(.vertical) { VStack(spacing: 13) { ForEach(0..<1) {_ in TextField("Enter hour", text: $checknewHour) .keyboardType(.decimalPad) .font(.system(size: 25)) Text("\(checknewHour) $ Hour") .foregroundColor(.purple) .font(.system(size: 25)) TextField("Enter minute",text:$checknewMinute) .keyboardType(.decimalPad) .font(.system(size: 25)) Text("\(checknewMinute) $ Minute") .foregroundColor(.purple) .font(.system(size: 25)) } } } } } } } } } } } } Why have you such a complex struct (Form, Group, List …) Here is what I get: Is it what you expect ?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Oct ’21
Reply to Type of expression is ambiguous without more context
I completed as this: ForEach(0..<1) {_ in TextField("Enter hour", text: $checknewHour) .keyboardType(.decimalPad) .font(.system(size: 25)) Text("\(checknewHour) $ Hour") .foregroundColor(.purple) .font(.system(size: 25)) TextField("Enter minute",text:$checknewMinute) .keyboardType(.decimalPad) .font(.system(size: 25)) Text("\(checknewMinute) $ Minute") .foregroundColor(.purple) .font(.system(size: 25)) Text("Calculate Pace") .bold() .frame(width: 280, height: 50) .background(Color.init(red: 0.818, green: 0.688, blue: 0.095)) .foregroundColor(.white) .cornerRadius(10) .navigationTitle ("Pace Calculator") // .navigationBarTitleDisplayMode(.inline) .padding(5) } And get: So this at least works. Yes, that's what I'm writing about, I want to link data from one page to another link data: which date ? In what link ? one page : which ? another : which ? Could you now explain precisely what you want to achieve, what is not working as expected ?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Oct ’21
Reply to Tinder app creation
That's not an appropriate question for the forum: too vague: please explain precisely what function you don't know how to implement asking how to copy another app (may even be illegal) which is the best view controller to use/create? How many view controllers That doesn't mean much. It depends what you want to do. Navigation, TabBar, Pages… It is up to your design.
Oct ’21
Reply to 15% Apple Cut
It is annual revenue. You can apply if revenues of past year is less than $1M. If during the year you pass over this threshold, you will be out. But if you fall below next year, you can reapply. So if you reach $1M in 2021, you will not be eligible in 2022. You will have to wait for 2023 where your 2022 revenues will be evaluated. APPLE TO CUT APP STORE COMMISSION FROM 30 TO 15 PERCENT FOR DEVELOPERS WITH UP TO $1 MILLION ANNUAL REVENUE h t t p s : / / w w w.firstpost.com/tech/news-analysis/apple-to-cut-app-store-commission-from-30-to-15-percent-for-developers-with-up-to-1-million-annual-revenue-9029921.html
Oct ’21
Reply to Type of expression is ambiguous without more context
OK. Replace with this: struct ContentView: View { @State var checknewHour: String = "0" @State var checknewMinute: String = "0" @State private var action: Int? = 0 var body: some View { NavigationView { // error is here Form { Group { List { VStack { NavigationLink("", destination: OtherView(), tag: 1, selection: $action) VStack { ScrollView(.vertical) { VStack(spacing: 13) { ForEach(0..<1) {_ in TextField("Enter hour", text: $checknewHour) .keyboardType(.decimalPad) .font(.system(size: 25)) Text("\(checknewHour) $ Hour") .foregroundColor(.purple) .font(.system(size: 25)) TextField("Enter minute",text:$checknewMinute) .keyboardType(.decimalPad) .font(.system(size: 25)) Text("\(checknewMinute) $ Minute") .foregroundColor(.purple) .font(.system(size: 25)) Text("Calculate Pace") .bold() .frame(width: 280, height: 50) .background(Color.init(red: 0.818, green: 0.688, blue: 0.095)) .foregroundColor(.white) .cornerRadius(10) .navigationTitle ("Pace Calculator") // .navigationBarTitleDisplayMode(.inline) .padding(5) .onTapGesture { self.action = 1 } } } } } } } } } } } } You can also replace the last Text by a button with a link. It is probably better. struct ContentView: View { @State var checknewHour: String = "0" @State var checknewMinute: String = "0" // @State private var action: Int? = 0 var body: some View { NavigationView { // error is here Form { Group { List { VStack { ScrollView(.vertical) { VStack(spacing: 13) { ForEach(0..<1) {_ in TextField("Enter hour", text: $checknewHour) .keyboardType(.decimalPad) .font(.system(size: 25)) Text("\(checknewHour) $ Hour") .foregroundColor(.purple) .font(.system(size: 25)) TextField("Enter minute",text:$checknewMinute) .keyboardType(.decimalPad) .font(.system(size: 25)) Text("\(checknewMinute) $ Minute") .foregroundColor(.purple) .font(.system(size: 25)) Button(action: { }, label: { NavigationLink(destination: OtherView()) { Text("Calculate Pace") .bold() .frame(width: 280, height: 50) .background(Color.init(red: 0.818, green: 0.688, blue: 0.095)) .foregroundColor(.white) .cornerRadius(10) } }) } } } } } } } } } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Oct ’21
Reply to Rectangle detection is not working correct on iOS 15
Just an idea (did not test): try to set CIDetectorMaxFeatureCount (and may be also CIDetectorAspectRatio: ) let rectangleDetector = CIDetector(ofType: CIDetectorTypeRectangle, context: CIContext(options: nil), options: [CIDetectorAccuracy: CIDetectorAccuracyHigh, CIDetectorMaxFeatureCount: 5]) Did you try also not to pass a context ? let rectangleDetector = CIDetector(ofType: CIDetectorTypeRectangle, context: nil, options: [CIDetectorAccuracy: CIDetectorAccuracyHigh, CIDetectorMaxFeatureCount: 5]) See also: https://stackoverflow.com/questions/54399074/cidetector-not-detecting-proper-rectangle-in-ios
Topic: App & System Services SubTopic: Core OS Tags:
Oct ’21
Reply to Type of expression is ambiguous without more context
Deleted - needed empty message to address forum misbehaviour.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’21
Reply to Type of expression is ambiguous without more context
What is this line ?                NavigationLink(<Text>(VStack { Is it really the code ? It is full of errors. I've tried to change, guessing for some parts that were missing. struct ContentView: View { @State var checknewHour: String = "0" @State var checknewMinute: String = "0" var body: some View { NavigationView { // <<-- error was here ???? Form { Group { List { VStack { NavigationLink(destination: SomeOtherView()) { // <<-- Need to specify this view VStack { // REMOVED -->> NavigationLink(<Text>(VStack { ScrollView(.vertical) { VStack(spacing: 13) { ForEach(0..<1) {_ in TextField("Enter hour", text: $checknewHour) .keyboardType(.decimalPad) .font(.system(size: 25)) Text("\(checknewHour) $ Hour") .foregroundColor(.purple) .font(.system(size: 25)) TextField("Enter minute",text:$checknewMinute) .keyboardType(.decimalPad) .font(.system(size: 25)) Text("\(checknewMinute) $ Minute") .foregroundColor(.purple) .font(.system(size: 25)) } } } } } } } } } } } } Why have you such a complex struct (Form, Group, List …) Here is what I get: Is it what you expect ?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’21
Reply to Type of expression is ambiguous without more context
PROBLEM was extra } before body statement.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’21
Reply to Type of expression is ambiguous without more context
I completed as this: ForEach(0..<1) {_ in TextField("Enter hour", text: $checknewHour) .keyboardType(.decimalPad) .font(.system(size: 25)) Text("\(checknewHour) $ Hour") .foregroundColor(.purple) .font(.system(size: 25)) TextField("Enter minute",text:$checknewMinute) .keyboardType(.decimalPad) .font(.system(size: 25)) Text("\(checknewMinute) $ Minute") .foregroundColor(.purple) .font(.system(size: 25)) Text("Calculate Pace") .bold() .frame(width: 280, height: 50) .background(Color.init(red: 0.818, green: 0.688, blue: 0.095)) .foregroundColor(.white) .cornerRadius(10) .navigationTitle ("Pace Calculator") // .navigationBarTitleDisplayMode(.inline) .padding(5) } And get: So this at least works. Yes, that's what I'm writing about, I want to link data from one page to another link data: which date ? In what link ? one page : which ? another : which ? Could you now explain precisely what you want to achieve, what is not working as expected ?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’21
Reply to mac storage (the others category)
Your link is local to your Mac. Fortunately we cannot get there. 77 GB is not that much. Is it the total capacity ? You have to deleted the biggest files (usually photos or videos) to make room. What do you need to install ?
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Oct ’21
Reply to mac storage (the others category)
What do you want to install ? Xcode ? 77 GB will not be enough. Do you know you can paste images directly in the forum ?
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Oct ’21
Reply to Sharing images with UIActivityViewController doesn't work
In your case, as Any is not needed as you have a single type. But that's not the cause of error. If you pass an UIImage like this, it crashes, because writing to the photo library is a restricted operation. Find how to implement here: h t t p s : / / w w w.hackingwithswift.com/articles/118/uiactivityviewcontroller-by-example
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Oct ’21
Reply to Tinder app creation
That's not an appropriate question for the forum: too vague: please explain precisely what function you don't know how to implement asking how to copy another app (may even be illegal) which is the best view controller to use/create? How many view controllers That doesn't mean much. It depends what you want to do. Navigation, TabBar, Pages… It is up to your design.
Replies
Boosts
Views
Activity
Oct ’21
Reply to 15% Apple Cut
It is annual revenue. You can apply if revenues of past year is less than $1M. If during the year you pass over this threshold, you will be out. But if you fall below next year, you can reapply. So if you reach $1M in 2021, you will not be eligible in 2022. You will have to wait for 2023 where your 2022 revenues will be evaluated. APPLE TO CUT APP STORE COMMISSION FROM 30 TO 15 PERCENT FOR DEVELOPERS WITH UP TO $1 MILLION ANNUAL REVENUE h t t p s : / / w w w.firstpost.com/tech/news-analysis/apple-to-cut-app-store-commission-from-30-to-15-percent-for-developers-with-up-to-1-million-annual-revenue-9029921.html
Replies
Boosts
Views
Activity
Oct ’21
Reply to Type of expression is ambiguous without more context
OK. Replace with this: struct ContentView: View { @State var checknewHour: String = "0" @State var checknewMinute: String = "0" @State private var action: Int? = 0 var body: some View { NavigationView { // error is here Form { Group { List { VStack { NavigationLink("", destination: OtherView(), tag: 1, selection: $action) VStack { ScrollView(.vertical) { VStack(spacing: 13) { ForEach(0..<1) {_ in TextField("Enter hour", text: $checknewHour) .keyboardType(.decimalPad) .font(.system(size: 25)) Text("\(checknewHour) $ Hour") .foregroundColor(.purple) .font(.system(size: 25)) TextField("Enter minute",text:$checknewMinute) .keyboardType(.decimalPad) .font(.system(size: 25)) Text("\(checknewMinute) $ Minute") .foregroundColor(.purple) .font(.system(size: 25)) Text("Calculate Pace") .bold() .frame(width: 280, height: 50) .background(Color.init(red: 0.818, green: 0.688, blue: 0.095)) .foregroundColor(.white) .cornerRadius(10) .navigationTitle ("Pace Calculator") // .navigationBarTitleDisplayMode(.inline) .padding(5) .onTapGesture { self.action = 1 } } } } } } } } } } } } You can also replace the last Text by a button with a link. It is probably better. struct ContentView: View { @State var checknewHour: String = "0" @State var checknewMinute: String = "0" // @State private var action: Int? = 0 var body: some View { NavigationView { // error is here Form { Group { List { VStack { ScrollView(.vertical) { VStack(spacing: 13) { ForEach(0..<1) {_ in TextField("Enter hour", text: $checknewHour) .keyboardType(.decimalPad) .font(.system(size: 25)) Text("\(checknewHour) $ Hour") .foregroundColor(.purple) .font(.system(size: 25)) TextField("Enter minute",text:$checknewMinute) .keyboardType(.decimalPad) .font(.system(size: 25)) Text("\(checknewMinute) $ Minute") .foregroundColor(.purple) .font(.system(size: 25)) Button(action: { }, label: { NavigationLink(destination: OtherView()) { Text("Calculate Pace") .bold() .frame(width: 280, height: 50) .background(Color.init(red: 0.818, green: 0.688, blue: 0.095)) .foregroundColor(.white) .cornerRadius(10) } }) } } } } } } } } } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’21
Reply to Type of expression is ambiguous without more context
This forum editor is really a mess. Recent messages disappear, then reappear when adding a phony new post, what I just do here !
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’21
Reply to XCode 13 issue - Thread 1: EXC_BAD_ACCESS (code=1, address=0x10)
Could you show the full code, by pasting it, not a partial screen shot. titleLbl == UILabel You mean titleLbl is a UILabel ? How is it created ? Where ? Could you check it is not nil ? func prepareForReuse() { store_data = nil imageView.image = nil print("titleLbl is", titleLbl) // <<-- ADD THIS titleLbl.attributedText = nil distanceView.prepareForReuse() }
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Oct ’21
Reply to Assets throws me a error in SwiftUI Xcode 13.0
Did you do the usual "Clean Build Folder" ?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’21
Reply to install ios 14?
It is not possible, they are not signed anymore. Note: because of that, I upgraded to 14.8 a few days before the official release of 15. This (old) thread provides a lot of important information. https://developer.apple.com/forums/thread/8061
Replies
Boosts
Views
Activity
Oct ’21
Reply to Rectangle detection is not working correct on iOS 15
Just an idea (did not test): try to set CIDetectorMaxFeatureCount (and may be also CIDetectorAspectRatio: ) let rectangleDetector = CIDetector(ofType: CIDetectorTypeRectangle, context: CIContext(options: nil), options: [CIDetectorAccuracy: CIDetectorAccuracyHigh, CIDetectorMaxFeatureCount: 5]) Did you try also not to pass a context ? let rectangleDetector = CIDetector(ofType: CIDetectorTypeRectangle, context: nil, options: [CIDetectorAccuracy: CIDetectorAccuracyHigh, CIDetectorMaxFeatureCount: 5]) See also: https://stackoverflow.com/questions/54399074/cidetector-not-detecting-proper-rectangle-in-ios
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Oct ’21