In an objective C app I'm now using (in every view controller):
(void) traitCollectionDidChange: (UITraitCollection *) previousTraitCollection
{
.....
}
to handle dark mode changes. This is all very easy to implement.
traitCollectionDidChange is deprecated in iOS 17.
In the documentation there is no objective C example on how to work with the new iOS17 registerForTraitChanges function. Hard to figure out how to do this. Am not familiar with Swift, so the wwdc video could not help me.
Where can I find some objective C examples?
Best regards/Rolf
Netherlands
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
I’m seeing that in the windowed-apps multitasking mode, the new window controls (the three “traffic-light” icons) can overlap the top-left corner of my app’s main view.
Detection: How can I programmatically determine whether these window controls will be displayed?
Geometry: If they are displayed, how can I find out their exact position and size?
I’d like to adjust my layout at runtime to ensure no content is hidden beneath those controls. For reference, my main view does not include a status bar or navigation bar at the top.
In iPadOS 26, the Control Center includes a Multitasking button that lets users switch between full-screen and windowed apps. Is any UISceneDelegate method invoked when this happens, or is there another mechanism by which the app is notified?
Topic:
UI Frameworks
SubTopic:
UIKit