 iOS Code Review | Curated code improvement tips - Issue #24

#24・
1.27K

subscribers

26

issues

Subscribe to our newsletter

By subscribing, you agree with Revue’s Terms of Service and Privacy Policy and understand that  iOS Code Review | Curated code improvement tips will receive your email address.

 iOS Code Review
 iOS Code Review
Hi there,
As promised, today’s issue is a special one, and I’m really excited to bring it to you. I wanted to spice things up a bit and invite a guest curator to create this issue. Because why not?
Say hi to Bas Broek - he will be curating the collection today. Bas had been authoring Swift Weekly Brief (sadly discontinued) for 2 years before joining the accessibility team at Apple. Now he’s back to the community and shares his favourite bits of wisdom with us below 👇 😌
——————–
This is Bas; I’m a friend of Marina’s. As she reached out to me asking if I’d be up for writing an issue, I immediately said yes!
Having curated a newsletter before, I know it can be quite a bit of work; having the community help out was always a highlight of writing the newsletter, so I’m always happy to return that favor.
Enjoy!

Accessibility hints
This thread is not about the literal API, but rather a bunch of things that are good to know and be aware of when building accessible products. I would love to know — how do you review code for accessibility?
Rob Whitaker
Here’s my AccessibilityHints (© @basthomas) for @swiftuiseries accessibility challenge. I’ll add to this thread over the week.
Take the challenge at https://t.co/TmDrGUygZM
#A11y
Speaking of accessibility hints, here’s Dani sharing an insight every day for the WHOLE YEAR. So great to see this topic being put in the spotlight. Check out his twitter and/or follow him for the daily accessibility tips.
Daniel Devesa Derksen-Staats
Day 1. UIAccessibility is the cornerstone of any accessible UIKit app. Among others, understanding what an accessibility label, value, trait or hint are, is key. This is an example of how they could be configured for a custom rating component. #365DaysIOSAccessibility #GAAD2022 https://t.co/zlOYtuDgdE
Attributed Strings
As Marina mentioned in the last newsletter, it seems she’s not the only one excited to see Natalia being back to blogging. Before she joined the SwiftUI team at Apple, her blog posts were a fresh breeze with amazing insights. Now, after leaving Apple, she’s back to it, taking all the experience from her time at Apple with her — and it shows.
The new AttributedString API is type-safe and powerful, and can be used not only in SwiftUI, but also with UIKit and AppKit. The type-inference going on is quite complex though. Check out the full article offering a deeper understanding on configuring the new attributed strings: AttributedString Attribute Scopes
Natalia Panferova
If you were ever confused why some attributes from AttributedString are ignored by SwiftUI Text such as paragraph style, then my new article on attribute scopes might be helpful for you.

I also touch on how to create our own attributes and scopes.

https://t.co/6lzAFDSq12
Equal sizing in SwiftUI
In this short article Matthias shares a clean approach to making all elements in a VStack as wide as the widest element (but not take up the entire proposed width):
Beyond code
Paris shares an insight on something we may overlook; sometimes it’s not only about code.
Paris Xavier Pinkney
Awww, it was a pleasure! I’ve learned the best way to figure out tough problems, unravel bugs in a project, or learn new functionality is to be patient—breathe, relax, laugh a lot and ask too many questions.

You both were great to work with! And I hope to see you again! #WWDC22 https://t.co/MPn4v4KWVr
WWDC Preparation
Here’s a couple of helpful tips on preparing for WWDC, when it comes to audits and labs:
Richard Stelling
WWDC Design Lab registration opens on June 6th. You have one week to think of your questions, come prepared, come with stupid questions, come with sketches, videos and enthusiasm. It won’t guarantee your app will be a success but it will make it better.
Paul Hudson
#WWDC22 is in 1 week, so here are three tips to make the most of the labs:

1. Prepare a project with your problem using the least code you can.

2. If you think it's a bug, have FB numbers ready.

3. You deserve a lab slot as much as anyone – you know more than you think you do!
Thanks for reading! Enjoy WWDC next week, and see you around!
- Bas
——————–
☮️
Alright, that’s it for today. 
Did you enjoy this issue? Let me know by pressing the buttons below.
Do you want to see other guest curators on the newsletter? Tell me who you’d like to hear from by replying to this email 🙌
Did you enjoy this issue? Yes No
 iOS Code Review
 iOS Code Review @ios_code_review

Bi-weekly newsletter amplifying code improvement tips from the Apple developer community in a bite-sized format. Swift, Objective-C, iOS, macOS, SwiftUI, UIKit and more. Curated by Marina Gornostaeva and published every other Thursday.

In order to unsubscribe, click here.
If you were forwarded this newsletter and you like it, you can subscribe here.
Created with Revue by Twitter.