什么'||' 客观C的意思?

sta*_*rob 1 objective-c

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation {

    // Return YES if incoming orientation is Portrait
    // or either of the Landscapes, otherwise, return NO
    return (toInterfaceOrientation == UIInterfaceOrientationPortrait) || UIInterfaceOrientationIsLandscape(toInterfaceOrientation);

}
Run Code Online (Sandbox Code Playgroud)

'||'是什么 这意味着什么

Dan*_*son 9

与C ||运算符相同:逻辑.