Sobes.tech

Can you explain how the MRC mechanism functions?

Junior — Middle
VKVK
80

Why is it important to adhere to the single responsibility principle in programming?

Junior — Middle
О5.ru
80

Do you have experience using the Core Location framework in projects?

Junior — Middle
SimbirsoftSimbirsoft
80

What methods do you use to detect memory leaks in your projects?

Junior — Middle
79

What is the difference between an interface and an abstract class in object-oriented programming?

Junior — Middle
Суши ВокСуши Вок
МТС БанкМТС Банк
79

Can you explain what the term 'Responder' means and what role it plays?

Junior — Middle
79

Could you tell about cases when disagreements or conflicts arose in your team and how you resolved them?

Junior — Middle
79

What limitations exist when using a standard queue in queue systems?

Junior — Middle
79

Why do some requests return a price that was never there (for example, an intermediate value between the old and new price)?

Principal
Позитив Технолоджис
40

Are there issues, hacks, or limitations related to SwiftUI with iOS 16 target compared to iOS 15?

Senior
Salmon
31

let parent = Task { let child = Task { print("child started, isCancelled = ", Task.isCancelled) // 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 second parent.cancel()

Senior
Salmon
27

let parent = Task { let child = Task { print("child started, isCancelled = ", Task.isCancelled) // NO 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 second parent.cancel() /////// let parent = 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 second parent.cancel()

Senior
Salmon
27

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
Salmon
24

struct ExampleView: View { @State var isVariant1 = true var body: some View { VStack { Toggle("Use Variant 1", isOn: $isVariant1.animation(.linear)) Text(isVariant1 ? "Variant 1" : "Variant 2") } .padding() } } Variant1 -> scale -> 1 -> 0 Variant2 -> scale -> 0

Senior
Salmon
24

```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)) } } ``` The task appears to be about customizing a SwiftUI button style, experimenting with different modifiers such as padding, foreground color, frame width, background color, and clipping shape. The question likely involves fixing or improving the button style to achieve a desired appearance or behavior, such as making the button fill the available width or adjusting its visual style.

Senior
Salmon
24

protocol SomeProtocol { func test() } func test1_1(value: SomeProtocol) {} func test1_2(value: any SomeProtocol) {} func test2_1(value: some SomeProtocol) {} func test2_2<Value: SomeProtocol>(value: Value) {} class A { func test2_2<Value: SomeProtocol>(value: Value) { } } class B: SomeProtocol { func test() {} } class C: B {} A().test2_2(value: B())

Senior
Salmon
23

Do you use Viper architecture for UIKit? Does this apply to all applications?

Senior
Salmon
23

protocol SomeProtocol {} func test1_1(value: SomeProtocol) {} func test1_2(value: any SomeProtocol) {} func test2_1(value: some SomeProtocol) {} func test2_2<Value: SomeProtocol>(value: Value) {} class A { func test2_2<Value: SomeProtocol>(value: Value) { } } class B: SomeProtocol { } A().test2_2(value: B())

Senior
Salmon
22

protocol SomeProtocol {} func test1_1(value: SomeProtocol) {} func test1_2(value: any SomeProtocol) {}

Senior
Salmon
21

What does “fast” mean for a dictionary, and what is its lookup complexity? Is it always O(1)?

Middle+
RevolutRevolut
20
/85