Skip to main content
-1 votes
0 answers
46 views

I am using this file from swift-snapshot-testing library. After updating my project to iOS 26, I need to fix all the warnings. But I am not sure how to fix this one: 'init(frame:)' was deprecated in ...
iosDev73's user avatar
-1 votes
0 answers
52 views

I am using this file from swift-snapshot-testing library. After updating my project to iOS 26, I need to fix all the warnings. But I am not sure how to fix this one: 'init(traitsFrom:)' was ...
iosDev73's user avatar
0 votes
1 answer
565 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
302 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,478
3 votes
1 answer
737 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
  • 16.7k
12 votes
1 answer
13k 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
320 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
905 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
722 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
642 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
345 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
827 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.5k
5 votes
2 answers
2k 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

15 30 50 per page
1
2 3 4 5 6