Objective-C: If else

For taking decisions and checking conditions, we either use,

if-else statements

conditional operator:     ? 

Bool data type, as per our requirement.

The example below contains all the three types of statements.



If else in Objective C is similar to that in If else in other languages like C or PHP. You can see the tutorial on how PHP If else works.