Sobes.tech

laske, et vanem oleks Töö { lase, et laps oleks Töö { print("child started, isCancelled = ", Task.isCancelled) // EI false for index in (1...[phone]) { print(index) } print("child finished, isCancelled = ", Task.isCancelled) // } await child.value } try? await Task.sleep(nanoseconds: 1_000_000_000) // 1 sekund parent.cancel() /////// laske, et vanem oleks Töö { async let child: Void = { print("child started, isCancelled =", Task.isCancelled) for index in (1...[phone]) { print(index) } print("child finished, isCancelled =", Task.isCancelled) }() await child } try? await Task.sleep(nanoseconds: 1_000_000_000) // 1 sekund parent.cancel()

Senior
346

Kas oli probleeme konkurentsivõimega (Sendable, unchecked Sendable, üleminek aktorite vahel) modulites, millega otseselt töötasite?

Senior
253

protokoll SomeProtocol {} funktsioon test1_1 väärtus: SomeProtocol {} funktsioon test2_1 väärtus: some SomeProtocol {} funktsioon test1_2 väärtus: any SomeProtocol {}

Senior
211

Kuidas töötab disainisüsteem UIKit ja SwiftUI vahel — kas on komponente või katteid dubleeritud?

Senior
206

Räägi mulle oma viimase projekti kohta rohkem — Avito fotogalerii moodul, mille eest vastutasid (lühiajaline rent, broneerimisvorm jne.)

Senior
192

protokoll SomeProtocol {} func test1_1(väärtus: SomeProtocol) {} func test1_2(väärtus: any SomeProtocol) {}

Senior
190

protokoll SomeProtocol {} func test1_1(ülesanne: SomeProtocol) {} func test1_2(ükski: SomeProtocol) {} func test2_1(ülesanne: some SomeProtocol) {} func test2_2<Ülesanne: SomeProtocol>(ülesanne: Ülesanne) {} klass A { func test2_2<Ülesanne: SomeProtocol>(ülesanne: Ülesanne) { } } klass B: SomeProtocol { } A().test2_2(ülesanne: B())

Senior
189

Kuidas oli fotogalerii liikumise ja suumimisega seotud interaktsioon — UIKit või SwiftUI?

Senior
189

Navigatsioon on kirjutatud UIKitis, ja teavitused/lehed on välja toodud UIKitis või kasutate SwiftUI loomulikke vahendeid?

Senior
187

luba, et vanem oleks Task { let child = Task { print("laps alustas, isCancelled = ", Task.isCancelled) // for index in (1...[phone]) { print(index) } print("laps lõpetas, isCancelled = ", Task.isCancelled) // } await child.value } try? await Task.sleep(nanoseconds: 1_000_000_000) // 1 sekund parent.cancel()

Senior
186

Räägi kasulikest Property Wrapper'itest, mida sa projektis kasutasid

Senior
183

Kas projektis sisaldab veel makro-sid, välja arvatud võrgu kiht?

Senior
179

Kui kasulikud on tehisintellekti tööriistad (Cursor, Proxyman jms), et aidata sul olla tööülesannetes produktiivsem?

Senior
177

struct CustomButtonStyleView: View { var body: some View { VStack { Button("Button") { print("Tapped") } } .buttonStyle(CustomButtonStyle()) } } private struct CustomButtonStyle: ButtonStyle { func makeBody(configuration: Configuration) -> some View { configuration.label .padding() .foregroundColor(.white) .frame(maxWidth: .infinity) .background(Color.red) .clipShape(RoundedRectangle(cornerRadius: 8)) } }

Senior
176

struct ExampleView: View { var body: some View { VStack { FormView() Button("Reset") { // TODO: } } } } // AINULT LOE struct FormView: View { @State private var firstname = "" @State private var lastname = "" @State private var email = "" @State private var website = "" var body: some View { Form { TextField("Enter firstname", text: self.$firstname) TextField("Enter lastname", text: self.$lastname) TextField("Enter email address", text: self.$email) TextField("Enter website address", text: self.$website) } } }

Senior
176

Kas viimase WWDC ajal oli huvitavaid sessioone/rakendusi, mida soovite oma töös proovida?

Senior
173

Milline Swift keele versioon on projektis kasutusel — üle 6 või alla?

Senior
173

```swift struct CustomButtonStyleView: View { var body: some View { VStack { Button("Button") { print("Tapped") } .buttonStyle(CustomButtonStyle()) } } } private struct CustomButtonStyle: ButtonStyle { func makeBody(configuration: Configuration) -> some View { configuration.label .padding() .foregroundColor(.white) .background(Color.red) .clipShape(RoundedRectangle(cornerRadius: 8)) } } ``` ```swift struct CustomButtonStyleView: View { var body: some View { VStack { Button("Button") { print("Tapped") } .buttonStyle(CustomButtonStyle()) } } } private struct CustomButtonStyle: ButtonStyle { func makeBody(configuration: Configuration) -> some View { configuration.label .padding() .foregroundColor(.white) .frame(maxWidth?) .background(Color.red) .clipShape(RoundedRectangle(cornerRadius: 8)) } } ``` ```swift struct CustomButtonStyleView: View { var body: some View { VStack { Button("Button") { print("Tapped") } .buttonStyle(CustomButtonStyle()) } } } private struct CustomButtonStyle: ButtonStyle { func makeBody(configuration: Configuration) -> some View { configuration.label //.padding() //.foregroundColor(.white) .frame(maxWidth: .infinity) .background(Color.red) //.clipShape(RoundedRectangle(cornerRadius: 8)) } } ``` ```swift struct CustomButtonStyleView: View { var body: some View { VStack { Button("Button") { print("Tapped") } .buttonStyle(CustomButtonStyle()) .frame(width: 200) } } } private struct CustomButtonStyle: ButtonStyle { func makeBody(configuration: Configuration) -> some View { configuration.label //.padding() //.foregroundColor(.white) .frame(maxWidth: .infinity) .background(Color.red) //.clipShape(RoundedRectangle(cornerRadius: 8)) } } ```

Senior
173

Raksta par interesantiem resursiem attīstībai — YouTube kanāli, Telegram kanāli, kopienas, rīki

Senior
171

Milline on praegu projekti minimaalne iOS siht?

Senior
171
/2