Sobes.tech

hagyd, hogy a szülő Task legyen { hagyd, hogy a gyermek Task legyen { print("child started, isCancelled = ", Task.isCancelled) // NEM 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 másodperc parent.cancel() /////// hagyd, hogy a szülő legyen Task { 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 másodperc parent.cancel()

Senior
352

Volt-e problémád a versenyhelyzettel (Sendable, unchecked Sendable, átmenet az aktorok között) azokban a modulokban, amiken közvetlenül dolgozottál?

Senior
255

protokoll SomeProtocol {} func test1_1(érték: SomeProtocol) {} func test2_1(érték: some SomeProtocol) {} func test1_2(érték: bármely SomeProtocol) {}

Senior
213

Hogyan működik a tervezési rendszer a UIKit és a SwiftUI között — van-e komponens vagy burkolat duplikáció?

Senior
208

A navigáció UIKit-ben íródott, és az értesítések/lapok a UIKit-ben vannak, vagy a SwiftUI natív eszközeit használod?

Senior
201

Mesélj részletesebben az utolsó projektedről — az Avito fénykép galéria moduljáról, amelyért te voltál felelős (rövid távú bérlés, foglalási űrlap stb.)

Senior
194

protokoll SomeProtocol {} func test1_1(érték: SomeProtocol) {} func test1_2(érték: any SomeProtocol) {}

Senior
193

Hogyan valósult meg az érintésekkel és nagyítással való interakció a fotógalériában — UIKit vagy SwiftUI?

Senior
191

Volt-e érdekes szekció vagy keretrendszer a legutóbbi WWDC-n, amit kipróbálnál a munkádban?

Senior
190

protokoll SomeProtocol {} függvény test1_1(érték: SomeProtocol) {} függvény test1_2(érték: bármilyen SomeProtocol) {} függvény test2_1(érték: some SomeProtocol) {} függvény test2_2<Érték: SomeProtocol>(érték: Érték) {} osztály A { függvény test2_2<Érték: SomeProtocol>(érték: Érték) { } } osztály B: SomeProtocol { } A().test2_2(érték: B())

Senior
190

engedje meg, hogy a szülő Task legyen { let child = Task { print("gyermek elindult, isCancelled = ", Task.isCancelled) // for index in (1...[phone]) { print(index) } print("gyermek befejezte, isCancelled = ", Task.isCancelled) // } await child.value } try? await Task.sleep(nanoseconds: 1_000_000_000) // 1 másodperc parent.cancel()

Senior
189

Mesélj a hasznos Property Wrapper-ekről, amiket a projektben használtál

Senior
183

struct ExampleView: View { var body: some View { VStack { FormView() Button("Reset") { // TODO: } } } } // CSAK OLVASHATÓ 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
182

Vannak még makrók a projektben a hálózati rétegen kívül?

Senior
181

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
180

Hogyan kommunikál a View és a ViewModel a UIKit-ben — használják-e valami olyasmit, mint az RxSwift/Combine kötéseknél?

Senior
180

Mennyire segítenek az MI-eszközök (Cursor, Proxyman stb.) abban, hogy hatékonyabb legyél a munkában?

Senior
179

A projektben használt Swift nyelv verziója — 6 felett vagy alatt?

Senior
176

```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)) } } ``` ```

Senior
175

Array { value1 value2 if condition { value3 } }

Senior
175
/2