Your First iOS App - Part 41: Styling with | Ray Wenderlich Videos

Learn how to style buttons to use custom images, and how to style sliders to use custom thumb images.


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/5993-your-first-ios-app/lessons/41

Web developer here learning Swift and really enjoying your course and videos so far! Quick question about removing the “start over” text from the button and replacing it with an image. Doesn’t this hurt accessibility (a11y is a particular interest and focus of mine)? Apple’s docs for buttons in Swift state:

"Buttons are accessible by default. The default accessibility traits for a button are Button and User Interaction Enabled.

The accessibility label, traits, and hint are spoken back to the user when VoiceOver is enabled on a device. The button’s title overwrites its accessibility label; even if you set a custom value for the label, VoiceOver speaks the value of the title."

Now that we’ve removed the title, how would we go about adding an accessibility label for the button? Can’t seem to find it in the Xcode UI.

Thanks!
-Alex

Thank you very much Ray for this useful tutorial.

I just want to point out that when I run my app on XCode 10.2.1 I faced this error:
Could not instantiate class named WKWebView because no class named WKWebView was found; the class needs to be defined in source code or linked in from a library (ensure the class is part of the correct target)’

I fixed the error by following this link (including the WebKit framework in the buid phase):

Thanks again, and good continuation to all.
Jack

@jack888 Thank you for sharing your solution - much appreciated! :]