Post

Replies

Boosts

Views

Activity

Reply to Charts: customising chartYAxis values
This is absolutely the wrong way to do it - It relies on debug descriptions - but until we find another solution, this will work: .chartYAxis {       AxisMarks() { value in                     AxisGridLine()                     AxisTick()                     AxisValueLabel {                         Text("\(abbreviateAxisValue(string: self.parseAxisValue(value: value) ?? ""))")            }      } } func parseAxisValue(value: AxisValue) -> String? {         let input = String(describing: value)         let regex = /\((\d*.0)|\((0)|\((-\d*.0)/         if let match = input.firstMatch(of: regex) {             return "\(match.1 ?? match.2 ?? match.3 ?? "")"         }         return nil     } func abbreviateAxisValue(string: String) -> String {         let decimal = Decimal(string: string)         if decimal == nil {             return string         } else {             if abs(decimal!) > 1000000000000.0 {                 return "\(decimal! / 1000000000000.0)t"             } else if abs(decimal!) > 1000000000.0 {                 return "\(decimal! / 1000000000.0)b"             } else if abs(decimal!) > 1000000.0 {                 return "\(decimal! / 1000000.0)m"             } else if abs(decimal!) > 1000.0 {                 return "\(decimal! / 1000.0)k"             } else {                 return "\(decimal!)"             }         } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jun ’22
Reply to Is it possible to disable Core Animation in SwiftUI?
use this modifier on the view. .transaction { transaction in transaction.animation = nil } note that its stopped working in ios16b1. not sure if that's a bug or it was intentional.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’22
Reply to Axis with fixed domain range without rounding
also get this, submitted a report: FB10145913
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’22
Reply to Charts: customising chartYAxis values
This is absolutely the wrong way to do it - It relies on debug descriptions - but until we find another solution, this will work: .chartYAxis {       AxisMarks() { value in                     AxisGridLine()                     AxisTick()                     AxisValueLabel {                         Text("\(abbreviateAxisValue(string: self.parseAxisValue(value: value) ?? ""))")            }      } } func parseAxisValue(value: AxisValue) -> String? {         let input = String(describing: value)         let regex = /\((\d*.0)|\((0)|\((-\d*.0)/         if let match = input.firstMatch(of: regex) {             return "\(match.1 ?? match.2 ?? match.3 ?? "")"         }         return nil     } func abbreviateAxisValue(string: String) -> String {         let decimal = Decimal(string: string)         if decimal == nil {             return string         } else {             if abs(decimal!) > 1000000000000.0 {                 return "\(decimal! / 1000000000000.0)t"             } else if abs(decimal!) > 1000000000.0 {                 return "\(decimal! / 1000000000.0)b"             } else if abs(decimal!) > 1000000.0 {                 return "\(decimal! / 1000000.0)m"             } else if abs(decimal!) > 1000.0 {                 return "\(decimal! / 1000.0)k"             } else {                 return "\(decimal!)"             }         } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’22
Reply to NSPersistentCloudKitContainer - Import failed because applying the accumulated changes hit an unhandled exception
iOS 15.5 still broken
Replies
Boosts
Views
Activity
May ’22
Reply to NSPersistentCloudKitContainer - Import failed because applying the accumulated changes hit an unhandled exception
its not just images. I have a database that has no images and this happens. it does have a decent amount of records though - 100MB or so says the manage storage section of iCloud in the Settings app. iOS15.4.1
Replies
Boosts
Views
Activity
Apr ’22
Reply to CloudKit iOS 10 Error: Account doesn't have access to CloudKit account
happens in iOS15.2. still an issue. have to re-login to iCloud and then restart device to get CoreData-CloudKit syncing to resume. Seems iCloud kicks you out with large sync volumes and then locks up.
Replies
Boosts
Views
Activity
Jan ’22
Reply to Xcode error: Abort Trap 6
got the same in Xcode 13.2.1 with swiftui I have 3 nested ForEach's. Had to break them up into separate functions for each nested ForEach level
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jan ’22
Reply to iPhone is busy: Making Apple Watch ready for development
have to keep my Apple Watch turned off. its basically off all the time now. I think ill sell it.
Replies
Boosts
Views
Activity
Dec ’21