Post

Replies

Boosts

Views

Activity

Reply to [iOS 15]The tableView(_:numberOfRowsInSection:) is called before the numberOfSections(in tableView: UITableView)
You said: i just define the dataSource in the Class Are you also settings the tableView's datasource to this property? (It looks like you aren't) Otherwise... For both functions, zero is a valid return value... ...so that suggests there may be a problem with the property you are accessing? You said: my dataSource is empty It's not clear what you mean by this. If it's really empty, isn't a crash an appropriate response? • Are you sure that both methods are being called? • Have you checked the Int value that they return? • Are you checking to see that datasource[section] exists, before you reference it?!
Sep ’21
Reply to The new iPad Mini (6th generation) introduces a new, smaller(!), screen size?
There's a good iPad Mini review by Federico Viticci, writing on MacStories. He raises all the issues I've been wanting to talk about. Speaking of the narrower (in Portrait orientation) screen, he says: This has some interesting side effects on webpages and apps, and it makes using the new iPad mini a peculiar affair at first. ...and in Landscape mode: ...you get longer lines of text but fewer paragraphs of text displayed at the same time. ...and the kicker (emphasis mine)... ..I think some apps will have to be updated to properly take advantage of its new screen resolution. Speaking of games: ...all the games I tried from Apple Arcade over the past week featured black bars (letterboxing) on the left and right sides of the display. and (again, emphasis mine)... ...I hope game developers will update their games quickly to take advantage of the full 8.3” display on the iPad mini Overall, the review is very positive, of course. https://www.macstories.net/stories/ipad-mini-review-small-wonder/
Sep ’21
Reply to Fatal errorUnexpectedly found nil while unwrapping an Optional value
You are force-unwrapping 3 Optionals, and you say the error comes from the first line. • SCNScene(named: "art.scnassets/Pokeball.scn")! • scene.rootNode.childNode(withName: "pokeball", recursively: false)! • scene! "scene!" doesn't make sense, since "scene" is not an Optional... I would expect this to give you a compiler error. I suggest you try some simple diagnostics, like: if let scene = SCNScene(named: "art.scnassets/Pokeball.scn") {     print("got scene: art.scnassets/Pokeball.scn") } else {     print("couldn't find scene: art.scnassets/Pokeball.scn") }
Topic: Spatial Computing SubTopic: ARKit Tags:
Sep ’21
Reply to Core Data Predicate Filter By Today's Date
I've used predicates like: let predicate = NSPredicate(format: "creationDate >= %@", startDate as CVarArg) But beware when comparing dates for equality... remember what a Date is (a date and a time)... so you probably don't want that! e.g. try a comparison where the stored date is >= the start of today.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Sep ’21
Reply to Color literal not displaying as Color Swatch?
You asked: should color literals work inside Views? So I: • Copied your code (above... the text, not the screenshot) • Pasted it into an app • Ran the app • The color literal worked, inside a View I now think you are asking something else. I think you are asking: In Xcode, is the code... Color(#colorLiteral(red: 0.292, green: 0.081, blue: 0.6, alpha: 255) ...replaced with a block of color If I have understood that correctly, my answer to that is "no".
Sep ’21
Reply to Info.plist NSAdvertisingAttributionReportEndpoint bug
Your Info.plist seems to have an invalid format, as the string value for NSAdvertisingAttributionReportEndpoint is unterminated. Viewing Info.plist, I would expect something like this: And viewing Info.plist as Source Code (so the text can be directly edited), would give this: <key>NSAdvertisingAttributionReportEndpoint</key> <string>https://notyou.co.uk</string> So I suggest you open your Info.plist as Source Code, and add the missing text to the "string" line.
Sep ’21
Reply to Picker overlapping each other
Trying your code on an iPad, where there is plenty of room (and using WheelPickerStyle(), so it looks the same as the phone version), it works okay. Which suggests that you may be running out of space. I would look at the framing and clipping code, perhaps get rid of that, and start from clean, then gradually add it back?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Sep ’21
Reply to Returning different dates from CoreData objects using NSPredicate
On a side note, you shouldn't rely on separate calls to Date() returning the same value! Date returns millisecond precision, so consecutive calls to Date() might return the same value (they probably will?), but they might not. Better to say: let dateNow = Date() var objects = [ Object(value: 100, date: dateNow, imageTemplate: "30"), Object(value: 200, date: dateNow, imageTemplate: "20"), Object(value: 400, date: dateNow + 84000, imageTemplate: "10") ]
Topic: Programming Languages SubTopic: Swift Tags:
Sep ’21
Reply to [iOS 15]The tableView(_:numberOfRowsInSection:) is called before the numberOfSections(in tableView: UITableView)
You said: i just define the dataSource in the Class Are you also settings the tableView's datasource to this property? (It looks like you aren't) Otherwise... For both functions, zero is a valid return value... ...so that suggests there may be a problem with the property you are accessing? You said: my dataSource is empty It's not clear what you mean by this. If it's really empty, isn't a crash an appropriate response? • Are you sure that both methods are being called? • Have you checked the Int value that they return? • Are you checking to see that datasource[section] exists, before you reference it?!
Replies
Boosts
Views
Activity
Sep ’21
Reply to The new iPad Mini (6th generation) introduces a new, smaller(!), screen size?
There's a good iPad Mini review by Federico Viticci, writing on MacStories. He raises all the issues I've been wanting to talk about. Speaking of the narrower (in Portrait orientation) screen, he says: This has some interesting side effects on webpages and apps, and it makes using the new iPad mini a peculiar affair at first. ...and in Landscape mode: ...you get longer lines of text but fewer paragraphs of text displayed at the same time. ...and the kicker (emphasis mine)... ..I think some apps will have to be updated to properly take advantage of its new screen resolution. Speaking of games: ...all the games I tried from Apple Arcade over the past week featured black bars (letterboxing) on the left and right sides of the display. and (again, emphasis mine)... ...I hope game developers will update their games quickly to take advantage of the full 8.3” display on the iPad mini Overall, the review is very positive, of course. https://www.macstories.net/stories/ipad-mini-review-small-wonder/
Replies
Boosts
Views
Activity
Sep ’21
Reply to iOS 15 on iPhone X, live text not there!
I'm afraid Live Text will not work on your iPhone X. Apple say: You need an iPhone XS, iPhone XR, or later with iOS 15 to use Live Text. See https://support.apple.com/en-gb/HT212630
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Sep ’21
Reply to Fatal errorUnexpectedly found nil while unwrapping an Optional value
You are force-unwrapping 3 Optionals, and you say the error comes from the first line. • SCNScene(named: "art.scnassets/Pokeball.scn")! • scene.rootNode.childNode(withName: "pokeball", recursively: false)! • scene! "scene!" doesn't make sense, since "scene" is not an Optional... I would expect this to give you a compiler error. I suggest you try some simple diagnostics, like: if let scene = SCNScene(named: "art.scnassets/Pokeball.scn") {     print("got scene: art.scnassets/Pokeball.scn") } else {     print("couldn't find scene: art.scnassets/Pokeball.scn") }
Topic: Spatial Computing SubTopic: ARKit Tags:
Replies
Boosts
Views
Activity
Sep ’21
Reply to Core Data Predicate Filter By Today's Date
I've used predicates like: let predicate = NSPredicate(format: "creationDate >= %@", startDate as CVarArg) But beware when comparing dates for equality... remember what a Date is (a date and a time)... so you probably don't want that! e.g. try a comparison where the stored date is >= the start of today.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Sep ’21
Reply to Should/can I create a placeholder for our upcoming game in the App store?
Yes.
Replies
Boosts
Views
Activity
Sep ’21
Reply to Color literal not displaying as Color Swatch?
Your code (with the colorLiteral inside the View) works for me. Xcode 13.0 (13A233)
Replies
Boosts
Views
Activity
Sep ’21
Reply to App Crash in default Photo app in simulator Xcode 13
Simulator Photos app works okay, for me. Xcode 13.0 (13A233)
Replies
Boosts
Views
Activity
Sep ’21
Reply to Color literal not displaying as Color Swatch?
You asked: should color literals work inside Views? So I: • Copied your code (above... the text, not the screenshot) • Pasted it into an app • Ran the app • The color literal worked, inside a View I now think you are asking something else. I think you are asking: In Xcode, is the code... Color(#colorLiteral(red: 0.292, green: 0.081, blue: 0.6, alpha: 255) ...replaced with a block of color If I have understood that correctly, my answer to that is "no".
Replies
Boosts
Views
Activity
Sep ’21
Reply to Is Quinn “The Eskimo!” actually a franchise?
Ha ha... of course, that's exactly what Corporate Construct Quinn™ would say! I'll go along with it for now, but I will continue to gather evidence. I'll be particularly looking for signs of UK Quinn™ (who I imagine has a hipster waxed moustache, and quietly hums a certain Manfred Mann song).
Replies
Boosts
Views
Activity
Sep ’21
Reply to Unable to download Xcode, It says Unable to process the request
Have you tried installing Xcode from the App Store?
Replies
Boosts
Views
Activity
Sep ’21
Reply to Should/can I create a placeholder for our upcoming game in the App store?
https://developer.apple.com/app-store/submitting/
Replies
Boosts
Views
Activity
Sep ’21
Reply to Info.plist NSAdvertisingAttributionReportEndpoint bug
Your Info.plist seems to have an invalid format, as the string value for NSAdvertisingAttributionReportEndpoint is unterminated. Viewing Info.plist, I would expect something like this: And viewing Info.plist as Source Code (so the text can be directly edited), would give this: <key>NSAdvertisingAttributionReportEndpoint</key> <string>https://notyou.co.uk</string> So I suggest you open your Info.plist as Source Code, and add the missing text to the "string" line.
Replies
Boosts
Views
Activity
Sep ’21
Reply to Picker overlapping each other
Trying your code on an iPad, where there is plenty of room (and using WheelPickerStyle(), so it looks the same as the phone version), it works okay. Which suggests that you may be running out of space. I would look at the framing and clipping code, perhaps get rid of that, and start from clean, then gradually add it back?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Sep ’21
Reply to Returning different dates from CoreData objects using NSPredicate
On a side note, you shouldn't rely on separate calls to Date() returning the same value! Date returns millisecond precision, so consecutive calls to Date() might return the same value (they probably will?), but they might not. Better to say: let dateNow = Date() var objects = [ Object(value: 100, date: dateNow, imageTemplate: "30"), Object(value: 200, date: dateNow, imageTemplate: "20"), Object(value: 400, date: dateNow + 84000, imageTemplate: "10") ]
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Sep ’21