Swift enumeration Kodlama ile öğrenelim .

in #utopian-io7 years ago (edited)

Selamlar, Bugün sizlere "eenumeration" protokolünden bahsedeceğim , özet geçmek gerekirse enumeration birbiri ile ilişkili bağlantılar için ortak bir tip kurar , bu kurduğu tipi kullanmanızı sağlar . Enumaration aynı tipteki benzer yapıları gruplamada kullanılır . Videoda uzun uzun anlattım . Genellikle işimizi kolaylaştırmak amaçlı kullanılır . İyi seyirler , iyi dersler .

Greetings, Today I will talk to you about the "eenumeration" protocol, in summary, enumeration establishes a common type for interrelated connections, which allows you to use this type of construct. I have told the video for a long time. It is often used to facilitate our work. Good looking, good lessons.



Projemizin Kodları
(Project Code)





import UIKit

**// Enumaration aynı tipteki benzer yapıları gruplamada kullanılır**

**// enum sözcüğü kullanılır**

**// Oyun yazılımcısı Hareket alanı tanımlayalım**

enum HareketAlanı{

    case sag

    case sol

    case asagi

    case yukari

}

let solHareket = HareketAlanı.sol

let sagHareket = HareketAlanı.sag

var yerindeSay = HareketAlanı.sol

yerindeSay = .sag

enum Sayilar:Int{

    case Bir = 1, iki, Uc, Dort, Bes

}

let bes = Sayilar.Bes

print(bes.rawValue)

enum Hata:Error{

    case sunucuHatasi(sebep:String)

    case kullaniciHatasi(sebep:String)

}

let hata = Hata.kullaniciHatasi(sebep: "Kullanıcı hatalıdır")

print(hata)

enum Sehirler:String{

    

    case Ankara = "Başkenttir"

    case Adana = "Bici bici talısı ile meşhurdur"

}

let sehir  = Sehirler.Adana

print(sehir.rawValue)





  • Video ya ingilizce çeviri yapana " 1 SBD " Ödül verilecektir

  • The person who makes video or english translation will be awarded "1 SBD".


Videoma ingilizce çeviri yapabilirsiniz
English subtitles can be added to the video.

Kodlara github adresimden'de ulaşabilirsiniz
You can access the code file from my "Githup" account

Önceki derslerimiz / Previous lessons.**




Posted on Utopian.io - Rewarding Open Source Contributors



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Thank you for the contribution. It has been approved.

You can contact us on Discord.
[utopian-moderator]

Hey @kerimcaglar I am @utopian-io. I have just upvoted you!

Achievements

  • You have less than 500 followers. Just gave you a gift to help you succeed!
  • Seems like you contribute quite often. AMAZING!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x

Coin Marketplace

STEEM 0.15
TRX 0.12
JST 0.025
BTC 56691.97
ETH 2499.18
USDT 1.00
SBD 2.23