Skip to main content
0 votes
1 answer
671 views

Using UIDesignRequiresCompatibility to have backward compatibility with 6 tabs based TabbarController using traitCollection. but the issue is initially loads 5 tabs & when app goes to background &...
Suraj SS's user avatar
  • 187
1 vote
1 answer
369 views

I'm trying to build custom-styled components that can handle a custom trait propagated from above and adjust their styling accordingly. E.g.: class CustomButton: UIButton { override init(frame: ...
Amja's user avatar
  • 1,488
3 votes
1 answer
797 views

The WWDC 2023 video Unleash the UIKit trait system discusses new UIKit APIs added in iOS 17 related to custom traits in trait collections. The video and its associated code is all in Swift but I wish ...
HangarRash's user avatar
  • 17.1k
12 votes
1 answer
14k views

I am trying to work with this function but it does not work with iOS 17. I want to make a change every time I switch between dark and light mode. This is my function: override func ...
Adham Raouf's user avatar
1 vote
0 answers
331 views

I have a navigation app. During a navigation session, I prevent the screen from sleeping. When users are driving/navigating around sunrise or sunset, appearance should change between light and dark ...
guido's user avatar
  • 2,936
0 votes
1 answer
970 views

I know there are plenty of answers pointing to traitCollectionDidChange, but that is going to be called when the userInterfaceStyle of a view controller changes, and I would like to let the user ...
CristianMoisei's user avatar
0 votes
2 answers
739 views

I'm trying to update the constraints and change the layout of my subviews when the user rotates their device. From what I understand, both viewDidLayoutSubviews() and traitCollectionDidChange() are ...
michael.yql's user avatar
1 vote
0 answers
650 views

For various optimization purposes, I want to get the device's max display size without the safe areas for both portrait and lanscape. I can use the UIWindow's safeAreaInsets, but that only gives me ...
Khal's user avatar
  • 830
0 votes
0 answers
346 views

I have CollectionView embedded in TableView cells to show images posted by a user. Im targeting this app on every device from iPhone 8 to Mac and I do have screen rotation on for iPhones and iPads. ...
Mel's user avatar
  • 469
0 votes
1 answer
854 views

The documentation for UITraitCollection's userInterfaceLevel states: When you want parts of your UI to stand out from the underlying background, assign the UIUserInterfaceLevel.elevated level to them....
Jordan H's user avatar
  • 56.6k
5 votes
2 answers
3k views

I have a view controller that contains a table view and displays custom cells. I'm trying to react to a content size category change using the traitCollectionDidChange method (within the cell subclass)...
Brian Spilner's user avatar
0 votes
1 answer
471 views

I am working on remastering Swift and UIKit after a long time. WorkFlow: I have created a ViewController with a UICollectionView aligning its centers in both X and Y axis and Proportional Width and ...
Nishanth Vemula's user avatar
4 votes
3 answers
6k views

App was working fine until Xcode 13 beta 5 builds. Suddenly get this error in this init line of code in our view controller: init(dataProvider: DataProvider) { self.dataProvider = dataProvider ...
Aggressor's user avatar
  • 13.6k
0 votes
1 answer
257 views

I'm running one of my Objective-C project on XCode 12.0. I have UIControl subclass "SeatingPanelControl" from which another subclass is created named "IpadSeatingPlanControl", ...
iAkshay's user avatar
  • 1,303
0 votes
2 answers
237 views

If I present a view controller as a popover on iPad (by setting its modalPresentationStyle to .popover), it will report its horizontal size class as .compact. But if I run the same code in a Catalyst ...
Tom Hamming's user avatar
  • 11.1k

15 30 50 per page
1
2 3 4 5 6