Skip to main content
0 votes
1 answer
103 views

I am trying to create a SwiftUI Marquee component that: Can take 2 string items If any of the two string items are longer then the width of its parent then animate them right to left If they are ...
kaylanx's user avatar
  • 908
1 vote
1 answer
60 views

I am trying to implement a subscriber which specifies its own demand for how many elements it wants to receive from a publisher. My code is below: import Combine var array = [1, 2, 3, 4, 5, 6, 7] ...
Asaad Jaber's user avatar
-1 votes
1 answer
160 views

I have a feeling that Swift Concurrency is fighting agains me all the time. It is really frustrating. My problem. I need to create Combine publisher to emit battery state on iOS device. So far I have ...
Marcin Kapusta's user avatar
4 votes
2 answers
1k views

I am looking to migrate my below file into swift 6. There is one way to forcefully use @MainActor everywhere(ViewModels, protocols etc) another is use uncheck-sendable or use @preconcurrency. But I am ...
Amit's user avatar
  • 685
1 vote
1 answer
113 views

I have been using RxSwift for my apps before Combine, Swift Concurrency and SwiftUI. In RxSwift we can have a Signal that will just emit without replaying the previous value which is very useful to ...
Bawenang Rukmoko Pardian Putra's user avatar
0 votes
0 answers
36 views

@globalActor public struct TestGlobalActor { public actor ActorType { } public static let shared: ActorType = ActorType() } final class TestCrash: XCTestCase { let subject = ...
Todanie's user avatar
  • 528
1 vote
2 answers
203 views

How can I get rid of @unchecked Sendable in this case: final class TestSendable: @unchecked Sendable { private var subscriptions = Set<AnyCancellable>() } apart from: @MainActor ...
Todanie's user avatar
  • 528
-1 votes
2 answers
71 views

Here is my CustomSubscriber. All I want to achieve is to replace build-in .sink with my own one. Just to better understand how it works under the hood. class CustomSubscriber<Input, Failure>: ...
Bartłomiej Semańczyk's user avatar
-2 votes
1 answer
85 views

I am trying to understand Record Publisher. Here is an example to better understand the case: var subscriptions = [AnyCancellable]() let pub = Record<Int, Never>(output: [1, 101, 102, 1001, 1002]...
Bartłomiej Semańczyk's user avatar
0 votes
1 answer
59 views

As title says I have created a timer to publish every second and on the 5th second it disables a picker in my view. The timer itself is started by tapping on the picker and it works on the first try ...
user17852191's user avatar
0 votes
1 answer
37 views

I’ve encountered unexpected behavior in Swift when a class conforms to Publisher. It appears that just conforming to the protocol causes property getters and setters to stop being called. Reproducible ...
Данил Войдилов's user avatar
0 votes
0 answers
61 views

I want to listen to the changes (of a boolean for example) value in one of my actors. So I have this protocol that my actor conforms to: protocol MyServiceProtocol: Actor { var myValuePublisher: ...
Xys's user avatar
  • 11.3k
0 votes
1 answer
50 views

For an animation, I am trying to use Combine to smooth out the animation. There are three image URLs that need to be loaded. I am hoping to make it so that they are loaded in parallel, but that no ...
CalebK's user avatar
  • 737
0 votes
0 answers
31 views

code: 50 publishers, I want to that: any send error, all will stop. Just like RxSwift let singles: [Deferred<Future<Int, Error>>] = (0..<50).compactMap { value in return ...
DaiElliot's user avatar
-2 votes
1 answer
86 views

TL:DR Is it possible to create a Publisher that will emit whenever the date ticks over from one month to the next (i.e. at 00:00 on 1st of each month) regardless of whether the app is in the ...
Oliver Pearmain's user avatar

15 30 50 per page
1
2 3 4 5
140