Just asking


Um I know its embarrassing to ask this question at this stage now (i think?)
But I ask anyway

O :question: n page 163 there’s this line of code:

return (x == UIInterfaceOrientationPotrait)
           || UIInterfaceOrientationIsLandscape(x);

just asking what is the || means?
I can’t find any explanation on the (awesome) book for it, need help please :blush: :question:



The || operator means “or”.

The return value of this statement evaluates to a BOOL: it will either be YES or NO.

You can read it like so, “return YES if x == UIInterfaceOrientationPortrait OR x == UIInterfaceOrientationLandscapeLeft or UIInterfaceOrientationLandscapeRight, otherwise, return NO”


Okie I finally understand it now, thanks for the help! really appreciate it :slight_smile: :blush: