Post

Replies

Boosts

Views

Activity

Reply to "Discover Observation in SwiftUI" session has a bug
Yes, I'm seeing this too. var timer: AnyCancellable? is throwing the same error: @Observable requires property 'timer' to have an initial value (from macro 'Observable') EDIT: In my case making the timer: AnyCancellable? = nil removes the error Here's my code: @Observable class SubscriberViewModel { public var count: Int = 0 var timer: AnyCancellable? func setupTimer() { timer = Timer .publish(every: 1, on: .main, in: .common) .autoconnect() .sink { [weak self] _ in self?.count += 1 } } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jun ’23
Reply to iOS 16 - Scanning barcode
@rabi Are you under the impression that all combinations of metadataObjectTypes will work again in iOS 16 beta 3? For example, the following is likely to work again?  output.metadataObjectTypes = [AVMetadataObject.ObjectType.qr,                                                   AVMetadataObject.ObjectType.dataMatrix,                                                   AVMetadataObject.ObjectType.ean13,                                                   AVMetadataObject.ObjectType.ean8,                                                   AVMetadataObject.ObjectType.upce,                                                   AVMetadataObject.ObjectType.code39,                                                   AVMetadataObject.ObjectType.code39Mod43,                                                   AVMetadataObject.ObjectType.code93,                                                   AVMetadataObject.ObjectType.code128,                                                   AVMetadataObject.ObjectType.pdf417]
Topic: UI Frameworks SubTopic: UIKit Tags:
Oct ’22
Reply to Sheet presentationDetents breaks after rapid open/dismiss cycles
I am seeing this as well in iOS version 18.3.2, iPhone 16 Pro
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Mar ’25
Reply to "Discover Observation in SwiftUI" session has a bug
Yes, I'm seeing this too. var timer: AnyCancellable? is throwing the same error: @Observable requires property 'timer' to have an initial value (from macro 'Observable') EDIT: In my case making the timer: AnyCancellable? = nil removes the error Here's my code: @Observable class SubscriberViewModel { public var count: Int = 0 var timer: AnyCancellable? func setupTimer() { timer = Timer .publish(every: 1, on: .main, in: .common) .autoconnect() .sink { [weak self] _ in self?.count += 1 } } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’23
Reply to iOS 16 - Scanning barcode
@rabi Are you under the impression that all combinations of metadataObjectTypes will work again in iOS 16 beta 3? For example, the following is likely to work again?  output.metadataObjectTypes = [AVMetadataObject.ObjectType.qr,                                                   AVMetadataObject.ObjectType.dataMatrix,                                                   AVMetadataObject.ObjectType.ean13,                                                   AVMetadataObject.ObjectType.ean8,                                                   AVMetadataObject.ObjectType.upce,                                                   AVMetadataObject.ObjectType.code39,                                                   AVMetadataObject.ObjectType.code39Mod43,                                                   AVMetadataObject.ObjectType.code93,                                                   AVMetadataObject.ObjectType.code128,                                                   AVMetadataObject.ObjectType.pdf417]
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Oct ’22
Reply to SwiftUI NavigationLink with action in List
Any updates on this one? Were you able to find a solution, I'm running into a similar issue.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Aug ’22
Reply to EKEventStoreChanged
How might this work with SwiftUI?
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Feb ’22
Reply to SF Symbol using string interpolation
I'm running into this as well -- did you have any luck solving it?
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Nov ’21