Can you explain What is enumeration and how it is used in iPhone.
What is Enum?
hello,
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Gokhul VarmanPosted Aug 5, 2017, 12:49 PM
Surya Narayan BarikPosted Apr 14, 2017, 2:15 AM
Enumeration in swift also resembles the structure of C and Objective C. Let me add a use case .
case Hot
case Cold
case Moderate
case Rainy
}
var season = ClimateinState.Hot
switch season {
case .Hot:
print("You are in Rajasthan")
case .Cold:
print("You are in Kashmir")
case .Moderate:
print("Climate is Odisha")
case .Rainy:
print("Climate is Mumbai")
}
Output :-
Climate is Cold
Gurunatha DogiPosted Jul 15, 2014, 6:48 AM
Check this article to understand enum with an example
http://www.onlinebuff.com/article_understand-enums-in-c-with-an-example_50.html
Satyapriya NayakPosted Nov 9, 2012, 10:58 AM
http://www.c-sharpcorner.com/uploadfile/gowth/enumeration-in-C-Sharp/
VulpesPosted Nov 9, 2012, 9:51 AM
http://cupsofcocoa.com/2011/03/20/objective-c-lesson-7-enumerated-types-and-typedefs/