Кстати, почему такая боль писать адаптив в iOS? Я буквально сравниваю ширину экрана в поинтах и подгоняю под это всё лейаут
Знаю, что существуют horizontalSizeClass, прочие вспомогательные штуки и они помогабт отличить iPhone от iPad, но не помогут писать разный адаптив под iPad 8.3 дюймов и 11 дюймов. Мне нравится подход CSS в этом плане.
А как вы пишите адаптив?
#iOSdev
#swiftui
Refactoring my Peakist app (peak bagging tracker) to use a UIKit mapView due to SwiftUI maps just being too slow and remaining incomplete.
Introduced a #SwiftUI runtime error (updating state while drawing) and spent all day on a dozen different solutions but in the end it's working now with a combination of changes I could swear failed earlier.
Absolutely no confidence the errors are still gone tomorrow.
It was that kind of day.
FB19646564- It's impossible to have concentric corners for content within a concentric View. The containerShape modifier needs to support ConcentricRectangle().

Or this. You can see how all the rectangles take their corner radius from the device frame. How can I get them to take their next parent's radius? #SwiftUI

Why is the Rectangle not matching the corner radius? If I remove the Text element it works, because it assumes the device corner radius is meant to be used, but I want to take the concentric corners of the VStack. What am I doing wrong here? #SwiftUI

The following article shows how to create reusable SwiftUI toolbar components:
https://tanaschita.com/swiftui-reusable-toolbar
Some ideas for how to read and use volume clipping margins in visionOS 26.
#visionOS #SwiftUI #RealityKit #AppleVisionPro
https://stepinto.vision/example-code/how-to-read-and-use-volume-clipping-margins/
Difference between using .externalStorage vs not using .externalStorage attribute in SwiftData.
.externalStorage - Stores image reference in the db.
Not using .externalStorage - Stores actual image.
* If the small is very small then SwiftData can still decide to store the image in db even if you use externalStorage attribute.

TIL this SF Symbol is not necessarily the letter "A".
It changes based on what language is in use.

Pragmatic Testing in iOS
Pragmatic Testing in iOS teaches TDD, stubs, mocks, UI, and view logic testing so you can ship stable, high-quality apps with confidence.
Coupon: ILOVETESTING
Expires: 08/14/2025
(Limited coupons)
https://azamsharp.teachable.com/p/pragmatic-testing-in-ios
Is this really so complicated? How can I ignore the bottom safe area so that it's a uniform 3pt padding? ignoresSafeArea does nothing, neither do safeAreaInset and safeAreaBar.
As soon as I add padding, the safe area returns.
#SwiftUI

Is there anything I can do about the corner radius weirdly animating when using .glassEffectTransition(.materialize)?
This happens specifically when using .glassEffect(.regular, in: .rect(corners: .concentric(minimum: 15), isUniform: true))