Post

Replies

Boosts

Views

Activity

Reply to Strange SwiftUI bug (just making sure if it's a bug or not)
OK I found out why Compiler found a bug in our code of the body of the Stack Instead of telling SwiftUI checking the body of the VStack it thinks it's a faulty initialization So when we use @absar's method it forced SwiftUI into initalizing as it should and therefore, find out the bug in our code in body. or rather: VStack(body: { .... }) but after you fix your bug it should be back to normal. Please continue to post if you have any other infos. Thanks!
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jul ’22
Reply to @AppStorage
OK found it out myself: https://www.jianshu.com/p/7591a7cd5eb1 I can do extension Array: RawRepresentable where Element: Codable { public init?(rawValue: String) { guard let data = rawValue.data(using: .utf8), let result = try? JSONDecoder().decode([Element].self, from: data) else { return nil } self = result } public var rawValue: String { guard let data = try? JSONEncoder().encode(self), let result = String(data: data, encoding: .utf8) else { return "[]" } return result } } Also Date: extension Date: RawRepresentable{ public typealias RawValue = String public init?(rawValue: RawValue) { guard let data = rawValue.data(using: .utf8), let date = try? JSONDecoder().decode(Date.self, from: data) else { return nil } self = date } public var rawValue: RawValue{ guard let data = try? JSONEncoder().encode(self), let result = String(data:data,encoding: .utf8) else { return "" } return result } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jul ’22
Reply to Playground problem & Splitting a tip
Please use a code block next time thanks
Replies
Boosts
Views
Activity
Aug ’22
Reply to Why am i not getting interface option when creating new proj in xcode13.4?
If it's a Multiplatform one it won't. Only SwiftUI is supported
Replies
Boosts
Views
Activity
Aug ’22
Reply to How to Unit/UI test a game?
Use self.measure { // code here }``` in the unit test or use Instruments
Topic: Graphics & Games SubTopic: General Tags:
Replies
Boosts
Views
Activity
Aug ’22
Reply to Could you please help TestFlight this app?
fantastic app! Only I used my MacBook :)
Topic: Graphics & Games SubTopic: General Tags:
Replies
Boosts
Views
Activity
Aug ’22
Reply to Expected expression
You should use if ... { } else { } not if ... {    else {    } }
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Aug ’22
Reply to Take screenshot of swiftUI View
One year later, another dev also gets into the waiting line...
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jul ’22
Reply to Xcode 14 Beta 3 is constantly getting an error with WeatherKit
I'm getting this:https://developer.apple.com/forums/thread/709578
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jul ’22
Reply to about the problem that domestic copyrighted music content cannot be displayed to users in non-China regions.
hi
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Jul ’22
Reply to Monterey update freezes my track pad
Me2 why don't try Ventura?
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Jul ’22
Reply to Older macs on BigSur won't be able to develop iOS 15.4+ apps anymore?
This will be impossible unless you update to Monterey/Ventura.
Replies
Boosts
Views
Activity
Jul ’22
Reply to No idea
OK I figured it out my self
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jul ’22
Reply to Swift UI rectangle height and width???
...There's such thing as .background
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jul ’22
Reply to VStack showing error. I'm unable to figure out why
Look at my post. I solved it with some others  https://developer.apple.com/forums/thread/708216
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jul ’22
Reply to Strange SwiftUI bug (just making sure if it's a bug or not)
OK I found out why Compiler found a bug in our code of the body of the Stack Instead of telling SwiftUI checking the body of the VStack it thinks it's a faulty initialization So when we use @absar's method it forced SwiftUI into initalizing as it should and therefore, find out the bug in our code in body. or rather: VStack(body: { .... }) but after you fix your bug it should be back to normal. Please continue to post if you have any other infos. Thanks!
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jul ’22
Reply to @AppStorage
OK found it out myself: https://www.jianshu.com/p/7591a7cd5eb1 I can do extension Array: RawRepresentable where Element: Codable { public init?(rawValue: String) { guard let data = rawValue.data(using: .utf8), let result = try? JSONDecoder().decode([Element].self, from: data) else { return nil } self = result } public var rawValue: String { guard let data = try? JSONEncoder().encode(self), let result = String(data: data, encoding: .utf8) else { return "[]" } return result } } Also Date: extension Date: RawRepresentable{ public typealias RawValue = String public init?(rawValue: RawValue) { guard let data = rawValue.data(using: .utf8), let date = try? JSONDecoder().decode(Date.self, from: data) else { return nil } self = date } public var rawValue: RawValue{ guard let data = try? JSONEncoder().encode(self), let result = String(data:data,encoding: .utf8) else { return "" } return result } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jul ’22