Sobes.tech

Array { value1 value2 if condition { value3 } }

Senior
175

clase final ProfileViewModel1 { enum Estado { ... } var estado: Estado = .idle let servicio: UserService init(servicio: UserService) { ... } func onBackPress() { // vista deinit } func loadUser() { estado = .loading Task { [weak self] guard let self else { return } do { let usuario = try await self.servicio.fetchUser() self.estado = .loaded(usuario) } catch { self.estado = .failed(error.localizedDescription) } } } }

Senior
174

¿Cuál es el objetivo mínimo de iOS en el proyecto ahora?

Senior
174

¿Cuando llegaste al proyecto, ya existía Swift 6, o la transición ocurrió durante tu tiempo?

Senior
174

Cuéntame sobre recursos interesantes para el desarrollo: canales de YouTube, canales de Telegram, comunidades, herramientas

Senior
173

¿Utiliza la arquitectura Viper para UIKit? ¿Se aplica a todas las aplicaciones?

Senior
172

¿Hay problemas, soluciones temporales u restricciones relacionadas con SwiftUI en el objetivo de iOS 16 en comparación con iOS 15?

Senior
169

@MainActor final class ViewModel: ObservableObject { @Published var image: UIImage? func onDownloadPhoto(url: URL) { do { let data = try Data(contentsOf: url) image = UIImage.init(data: data) } catch { log.error("Error al descargar la imagen: \(error)") } } } Button("Descargar") { onDownloadPhoto(url) }

Senior
168

```swift struct ContentView: View { var body: some View { ScrollView { content .padding(20) } .background(Color(.systemGroupedBackground)) .overlay(alignment: .bottom) { continueButton } } } ``` ```swift struct ContentView: View { var body: some View { ScrollView { content .padding(20) } .background(Color(.systemGroupedBackground)) .safeAreaInset(edge: .bottom) { continueButton } } } ```

Senior
167

Cuéntame sobre el uso de SwiftUI en el proyecto: ¿cuál es la política, cuántas pantallas están escritas en SwiftUI?

Senior
167

¿Si implementas una nueva pantalla o una nueva función, escribes inmediatamente en SwiftUI, o hay discusiones sobre la elección entre UIKit y SwiftUI?

Senior
166

Auto -> Tarea -> (fuerte) Auto .... Atrás -> Ver desinit -> ¿Ver modelo deinit?

Senior
166

Si estuvieras diseñando un componente de botón reutilizable para un sistema de diseño en SwiftUI con diferentes estilos (primario/secundario), ¿cómo lo implementarías?

Senior
165

protocolo SomeProtocol { func test() } func test1_1(valor: SomeProtocol) {} func test1_2(valor: any SomeProtocol) {} func test2_1(valor: some SomeProtocol) {} func test2_2<Valor: SomeProtocol>(valor: Valor) {} class A { func test2_2<Valor: SomeProtocol>(valor: Valor) { } } class B: SomeProtocol { func test() {} } class C: B {} A().test2_2(valor: B())

Senior
160

¿Qué se utiliza para los módulos de presentación en UIKit y SwiftUI — qué arquitectura?

Senior
160

¿Actualmente utiliza GCD o Concurrencia Moderna (async/await) para nuevas tareas relacionadas con hilos?

Senior
160

¿Cómo entiendes el término concurrencia estructurada en Swift? ¿Task.detached se ajusta a este concepto?

Senior
155

¿Cuándo y cómo se realiza la cancelación al usar DispatchQueue con WorkItem y llamar a cancel()?

Senior
151
/2