Post

Replies

Boosts

Views

Activity

Reply to Weird DateFormatter behavior
There are two issues: The use of .weekOfMonth. This is not a "number of weeks". If the result had 21 days, this doesn't give 3, for example. Drop your use of .weekOfMonth since it is not a useful component for what you are trying to do. The "strange" output is the result of your use of the DateComponentsFormatter. The formatter assumes a 28-day month. Just print the raw components. If you change the line: let result = formatter.string(from: components)! to: let result = "\(components)" then you will get correct output (once you remove the use of .weekOfMonth. 57: year: 0 month: 1 day: 26 58: year: 0 month: 1 day: 27 59: year: 0 month: 1 day: 28 60: year: 0 month: 1 day: 29 61: year: 0 month: 2 day: 0 62: year: 0 month: 2 day: 1 63: year: 0 month: 2 day: 2
Topic: App & System Services SubTopic: General Tags:
Jul ’25
Reply to How to customize UIActivityViewController
Have a look at the excludedActivityTypes property of UIActivityViewController. That lets you specify which activities you do not want to appear. The hard part is determining the activity type for the different activities. Some are listed in the documentation for UIActivity.ActivityType. Many others are not. One trick I've used is to make use of the completionWithItemsHandler. Then look at the activityType value provided to the handler when an activity is selected.
Topic: UI Frameworks SubTopic: UIKit Tags:
Jul ’25
Reply to Incorrect safeAreaInsets.top on iPhone SE (2nd/3rd gen) – iOS 26 Beta
Show how you actually add the button and set its position. I just ran a test using constraints against the safeAreaLayoutGuide.topAnchor and the view is positioned as expected below the status bar. This is for an iPhone SE 3rd gen iOS 26 simulator. If you are relying on manually setting a view's frame based on safeAreaInsets then you must keep in mind that the insets can change. Override viewSafeAreaInsetsDidChange in your view controller and update frames as needed. But using constraints is so much simpler.
Topic: UI Frameworks SubTopic: UIKit Tags:
Jul ’25
Reply to Right bar button items in iOS 26 visual presentation
Buttons with text labels are not merged with buttons with images. This is documented somewhere or mentioned in one of the WWDC 2025 videos (I forget which one). Here's a big question for you - how did you get the Back button tinted? As of iOS 26.0 beta 4, there is no way to tint a standard back button. Did you add your own button to look and work like a back button?
Topic: UI Frameworks SubTopic: UIKit Tags:
Jul ’25
Reply to Icon Composer icons together with iOS 18 icons
Things keep changing during the beta. It's very frustrating since Apple doesn't document anywhere what the correct approach is (or will be by the end of the beta). And there's still no word on how to support alternate app icons with Icon Composer icons. I've noticed that what I posted here last became obsolete as of beta 3. iOS 18 has been showing a version of the glass icon since then. It makes much more sense for iOS 18 and lower to keep using the old Assets app icons and for iOS 26+ to use the new glass icons. I don't like the fact that Apple assumes everyone will want the new fancy iOS 26 icon to appear on devices with older versions of iOS. I'm fine with that being an option, but let developers choose how they want their apps to appear and which icons to use.
Jul ’25