🗯️Unleash your inner geek with the Binary Clock Widget, available on the App Store for iPhone and iPad.
🔗 apps.apple.com/us/app/widget…
Dev notes:
swiftuisnippets.wordpress.co…
63
Gracias al artículo de Arturo, he creado safeContainerMargins
Define márgenes con fallback automático: ideal para las particularidades del iPhone Duo y evita que iPhone, iPad y macOS se queden a 0.
xitter.twitterapi.xyz/Codelaby/status/211975…
Si el contenido de tu pantalla tiene que alinearse con el título de navegación, ¿de dónde salen esos 16 puntos de padding? En SwiftUI, el margen del sistema depende del contenedor y de la posición de la vista. En el iPhone Duo, los dos lados pueden necesitar distancias distintas.
Desde iOS 27.1, puedes aplicar los márgenes laterales del contenedor con `.contentMargins(for: .container, edges: .horizontal)`. Y si necesitas los valores para un carrusel, `GeometryProxy.contentMargins(for:edges:)` te da los `EdgeInsets`.
Ahí encajan las dos APIs llamadas `contentMargins`. La guía `.container` resuelve cuánto espacio corresponde. `.scrollContent`, disponible desde iOS 17, indica dónde aplicarlo. Combinarlas permite alinear la primera tarjeta con el resto de la pantalla y conservar el desplazamiento hasta el borde.
Mide cerca de la vista que va a usar el resultado. Si una vista antecesora ya aplicó el margen, la lectura puede dar cero. El área segura se gestiona aparte.
Dejo el enlace en el hilo, con ejemplos y un fallback para versiones anteriores de iOS.
#SwiftUI #Swift #iOSDevelopment
1
3
225
I prefer to set it to at least 27.1 and take advantage of the framework's features; iOS users keep their devices updated.
8 SwiftUI APIs and the iOS version each one needs.
iOS 14:
LazyVStack
@StateObject
iOS 16:
NavigationStack
Swift Charts
iOS 17:
@Observable
SwiftData
ContentUnavailableView
TipKit
Your minimum target is a feature list.
Set it to iOS 17 and all 8 are yours.
Set it to iOS 15 and you lose 6.
Xcode stops the build when you call an API newer than your target. #available lets you ship both paths, but you write the feature twice.
Open your project's minimum deployment target today. Reply with the one API you are waiting on.
1
513
Dev notes:
swiftuisnippets.wordpress.co…
3
181
Simple and fast; allows for selection by combining text and code.
MD QuickLook - macOS 原生高速 Markdown Quick Look 预览插件
支持 GFM、代码高亮、公式、深浅色、缩略图,Rust + Swift 实现。
👉 github.com/armamut/md-quickl…
94
More demo samples:
github.com/Codelaby/IphoneDu…
109
My brain is fried from trying to implement support for customizing toolbars: ipad, mac, iphone and iphoneDuo.
#BuildInPublic #iosdev
3
7
607
Dev notes:
swiftuisnippets.wordpress.co…
75
Absolute gem of a channel for iOS dev!
youtube.com/watch?v=AJdbVBO8…
3
649


















