Control Flow in iOS with Swift 5 – For & while loop

Control Flow in iOS with Swift 5 – For & while loop
July 14, 2020 No Comments Development,iOS Development Pushpendra Kumar

Hey, Guys welcome to this tutorial. In this complete video, I will make you understand the quick trick for how to Control Flow in iOS with Swift 5. And this is a simple way to achieve our goals. Through this simple video tutorial, you can learn more interesting things about the Control Flow in iOS with Swift 5. So watch the complete video. And if you watched the complete video then do not forget to give your suggestion into the comment box. Because your feedback & suggestions do matter for me πŸ˜ŠπŸ˜ŠπŸ˜ŠπŸ˜ŠπŸ‘‡πŸ»

And finally, I would like to say that, If you like this video and it’s helpful for your project then click on the like button and do not forget to subscribe to this YouTube channel for future updates.

Control Flow in iOS

Great, Below get the useful code related to this entire video.

//  ViewController.swift
//  Controll Flow
//  Created by Pushpendra on 14/07/20.
//  Copyright Β© 2020 Pushpendra. All rights reserved.

import UIKit

class ViewController: UIViewController {
    let array = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]
    override func viewDidLoad() {
        for i in 0...array.count - 1 {
            if array[i] == "C" || array[i] == "D" {
            print("ITEM - \(array[i])")
        for alphBet in array {
            print("ITEM INDICATION - \(alphBet)")
        var counter = 0
        while counter < 50 {
            print("COUNTER VALUE -\(counter + 1)")
            counter = counter + 1
        switch array[1] {
        case "A":
            print("Hey It is A")
        case "B":
            print("Hey It is B")
        case "C":
            print("Hey It is C")
            print("Nothing found from the case")

Great work, I hoe you have follow the complete video tutorial.

In Conclusion, You have done with this tutorial. And I hope now the concept of Control Flow in iOS is clear. Firstly, If you have any doubts regarding the Control Flow in iOS in iOS with Swift 5. Then you can comment into the comment box. And If you like this tutorial with a complete description of the simple and attractive tutorial in iOS then pleaseΒ like my videoΒ on YouTube and do not forget to subscribe to myΒ YouTube channel. Because you will get lots of videos related to swift development with very sort tricks.

In addition, If you are more curious about the development and knowing about tutorials then follow the below links πŸ‘‡πŸ»πŸ‘‡πŸ»πŸ‘‡πŸ»πŸ˜Ž

About The Author
Pushpendra Kumar I am passionate about mobile application development and professional developer at Colour Moon Technologies Pvt Ltd ( This website I have made so that I can meet with new challenges and can share here.

Leave a reply

Your email address will not be published. Required fields are marked *