Post

Replies

Boosts

Views

Activity

Reply to format percentages
print(String(format: "%.0f%%", 33.3333)) prints 33% Explanation: String(format: "%.2f", value) %.2f formats and rounds to the number of decimal places given, in this case, 2. For zero decimal places you just use 0, i.e.: String(format: "%.0f", value) To display the percentage sign as a percentage sign, and not be interpreted by the formatting you need to add in two of them: String(format: "%.2f%%", value) So: String(format: "%.2f%%", 67.85762) is 67.86%. String(format:...) rounds accordingly, i.e.: let pi = 3.1415926535 String (format: "%.10f", pi) // "3.1415926535" String (format: "%.9f", pi) // "3.141592654" String (format: "%.8f", pi) // "3.14159265" String (format: "%.7f", pi) // "3.1415927" String (format: "%.6f", pi) // "3.141593" String (format: "%.5f", pi) // "3.14159" String (format: "%.4f", pi) // "3.1416" String (format: "%.3f", pi) // "3.142" String (format: "%.2f", pi) // "3.14" String (format: "%.1f", pi) // "3.1" String (format: "%.0f", pi) // "3"
Dec ’24
Reply to map.gmail.com POSIX 96
These are the Developer Forums, where developers of apps for Apple's platforms ask each other for hints and tips on coding. Your question is more of a product support one, so I'd suggest you ask it over at the Apple Support Forums. Thanks.
Dec ’24
Reply to UI Bug in Family Sharing
You should probably raise this as a bug in the usual way. It won't really get progressed if it's only posted in these Developer Forums. You need to raise each issue you find separately at https://feedbackassistant.apple.com/ You can post the FB numbers here if you want, so that others can link to them.
Topic: UI Frameworks SubTopic: General
Dec ’24
Reply to apple watch as FREE diving watch
Yeah, wrong place. These are the Developer Forums, where developers of third-party apps for Apple's platforms ask each other for hints and tips on coding. These forums are not where Apple's actual developers chat about new features. If you have constructive suggestions, you should raise them at: https://www.apple.com/feedback/
Dec ’24
Reply to Picker list based on a selection from another Picker list
I don't get your issue? Your second picker simply needs to be given the data that you want to display in it. If Course A has Red, Green and Blue tees, then your first picker is for Course A, and your second picker is for the tees within Course A. If your first picker is Course B, then just tell the second picker to use the tees from Course B. (As an aside, you'll never learn anything if you keep resorting to an AI bot. Though I see it recommended you use onChange(of:) like I did, i.e. the not deprecated version.)
Topic: Design SubTopic: General
Dec ’24
Reply to hate the new update
These are the Developer Forums, where developers of apps for Apple's platforms ask each other for hints and tips on coding. These forums are not where Apple's actual employee developers chat about what they're doing in the platform code. If you have a constructive suggestion you should raise it at: https://www.apple.com/feedback/. Thanks.
Topic: Design SubTopic: General
Dec ’24
Reply to Iphone 15 lags
These are the Developer Forums, where developers of apps for Apple's platforms ask each other for hints and tips on coding. Your question is more of a product support one, so I'd suggest you ask it over at the Apple Support Forums. Thanks.
Dec ’24
Reply to format percentages
print(String(format: "%.0f%%", 33.3333)) prints 33% Explanation: String(format: "%.2f", value) %.2f formats and rounds to the number of decimal places given, in this case, 2. For zero decimal places you just use 0, i.e.: String(format: "%.0f", value) To display the percentage sign as a percentage sign, and not be interpreted by the formatting you need to add in two of them: String(format: "%.2f%%", value) So: String(format: "%.2f%%", 67.85762) is 67.86%. String(format:...) rounds accordingly, i.e.: let pi = 3.1415926535 String (format: "%.10f", pi) // "3.1415926535" String (format: "%.9f", pi) // "3.141592654" String (format: "%.8f", pi) // "3.14159265" String (format: "%.7f", pi) // "3.1415927" String (format: "%.6f", pi) // "3.141593" String (format: "%.5f", pi) // "3.14159" String (format: "%.4f", pi) // "3.1416" String (format: "%.3f", pi) // "3.142" String (format: "%.2f", pi) // "3.14" String (format: "%.1f", pi) // "3.1" String (format: "%.0f", pi) // "3"
Replies
Boosts
Views
Activity
Dec ’24
Reply to Stickers Not Saving - IPhone 16
These are the Developer Forums, where developers of apps for Apple's platforms ask each other for hints and tips on coding. Your question is more of a product support one, so I'd suggest you ask it over at the Apple Support Forums. Thanks.
Topic: Community SubTopic: Apple Developers Tags:
Replies
Boosts
Views
Activity
Dec ’24
Reply to map.gmail.com POSIX 96
These are the Developer Forums, where developers of apps for Apple's platforms ask each other for hints and tips on coding. Your question is more of a product support one, so I'd suggest you ask it over at the Apple Support Forums. Thanks.
Replies
Boosts
Views
Activity
Dec ’24
Reply to UI Bug in Family Sharing
You should probably raise this as a bug in the usual way. It won't really get progressed if it's only posted in these Developer Forums. You need to raise each issue you find separately at https://feedbackassistant.apple.com/ You can post the FB numbers here if you want, so that others can link to them.
Topic: UI Frameworks SubTopic: General
Replies
Boosts
Views
Activity
Dec ’24
Reply to apple watch as FREE diving watch
Yeah, wrong place. These are the Developer Forums, where developers of third-party apps for Apple's platforms ask each other for hints and tips on coding. These forums are not where Apple's actual developers chat about new features. If you have constructive suggestions, you should raise them at: https://www.apple.com/feedback/
Replies
Boosts
Views
Activity
Dec ’24
Reply to Picker list based on a selection from another Picker list
I don't get your issue? Your second picker simply needs to be given the data that you want to display in it. If Course A has Red, Green and Blue tees, then your first picker is for Course A, and your second picker is for the tees within Course A. If your first picker is Course B, then just tell the second picker to use the tees from Course B. (As an aside, you'll never learn anything if you keep resorting to an AI bot. Though I see it recommended you use onChange(of:) like I did, i.e. the not deprecated version.)
Topic: Design SubTopic: General
Replies
Boosts
Views
Activity
Dec ’24
Reply to Please revert the video scrubbing back to how it was
These are the Developer Forums, where developers of apps for Apple's platforms ask each other for hints and tips on coding. These forums are not where Apple's actual employee developers chat about what they're doing in the platform code. If you have a constructive suggestion you should raise it at: https://www.apple.com/feedback/. Thanks.
Replies
Boosts
Views
Activity
Dec ’24
Reply to The control center reorganization is borderline unusable in iOS18.
These are the Developer Forums, where developers of apps for Apple's platforms ask each other for hints and tips on coding. These forums are not where Apple's actual employee developers chat about what they're doing in the platform code. If you have a constructive suggestion you should raise it at: https://www.apple.com/feedback/. Thanks.
Topic: Design SubTopic: General
Replies
Boosts
Views
Activity
Dec ’24
Reply to hate the new update
These are the Developer Forums, where developers of apps for Apple's platforms ask each other for hints and tips on coding. These forums are not where Apple's actual employee developers chat about what they're doing in the platform code. If you have a constructive suggestion you should raise it at: https://www.apple.com/feedback/. Thanks.
Topic: Design SubTopic: General
Replies
Boosts
Views
Activity
Dec ’24
Reply to Iphone 15 lags
These are the Developer Forums, where developers of apps for Apple's platforms ask each other for hints and tips on coding. Your question is more of a product support one, so I'd suggest you ask it over at the Apple Support Forums. Thanks.
Replies
Boosts
Views
Activity
Dec ’24