Target readers: beginner-level iOS developers.

My focus on this article is not ‘guard let’ statement in general but it is specifically on the use of return keyword inside guard let statement’s else part.

guard let myName = nameReceived else {

This is a usual kind of guard let statement syntax that iOS developers see everyday where it is being checked if a value in some optional variable/constant is nil or not, and if it is nil we return the control in the else part.

Apple is always making Xcode more developer-friendly and easily manageable with each (stable) update.


In order to make our code easily readable, approachable and manageable in Xcode, a best practice to follow is that we divide its different aspects into groups and put a “//MARK:” (or “#pragma mark” in Objective-C) above each group with a descriptive comment, like this:

Accessibility’s VoiceOver feature is disabled by default for UIImageView in UIKit. We’ll learn how to enable it with Swift Language.

Here’s how we enable it

To enable accessibility, select the ImageView inside of the storyboard, navigate to Show the identity inspector on the right menu of Xcode, and under the heading Accessibility check the Enabled option (as shown in the screenshot below).

Mumtaz Hussain

iOS Developer, let’s get in touch:

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store