Creating a UIImageView outside a view hierarchy now crashes on iOS 18. We can
avoid this offscreen rendering technique by removing UIImage.asTintedImage(),
configuring the tint colour and template rendering on the UIImage directly, and
rendering with UIGraphicsImageRenderer instead of lower-level Core Graphics
APIs.
Scaling the system keyboard height eagerly meant that if the window was not
set, the keyboard height would be set to 0. Defer scaling the system keyboard
height until layout time when the view has been added to a view hierarchy.
The old UIButton API is still functional as long as we don't use
UIButton.Configuration, so we can safely ignore these warnings until we're
ready to adopt the configuration API across the codebase.
When switching to the "system" theme mode, if the effective appearance matched
the previous overridden theme mode, the theme change would be ignored. By
comparing the mode instead of just the effective appearance, we properly react
to system appearance changes.
Additionally, rework the transition animation for changing themes to match the
animation of system appearance changes (i.e., a 0.5-second cross-dissolve).
Fixes: https://signalmessenger.atlassian.net/browse/IOS-4431
This appears to have been a hack for something that may have been
necessary in older versions of iOS. Current iOS seems to just return
true with no side-effects from this super call so there's no reason to
retain this hack apparent.
OWSMath.swift overlaps somewhat with Math+OWS.swift but no worse than
OWSMath.h did previously. There are future refactoring efforts that
should occur there to use more of the extensions of Math+OWS.swift and
less of the extensions from OWSMath.swift
This included:
- Removing unavailable inits wholesale if no longer `required`
- Marking a few classes `final` so they could continue using
`Self(...)` rather than `OWSWhatever(...)`
Also:
- Remove AtomicUInt's @objc, it's no longer used from ObjC
- Remove Codable conformances, they would implicitly use shared locks
and weren't used in practice
as the last remaining objective-c file, this removed direct dependency
from the SignalMessaging framework headers on SignalServiceKit and
thus required adding lots of import statements