2012-08-16から1日間の記事一覧

PortraitとLandscapeの正しい判定

iOS

デバイスのポートレイトとランドスケイプを判定する処理をなんとなく以下のように書いていた。 + (BOOL)isDevicePortrait { UIDevice* d = [UIDevice currentDevice]; return (d.orientation == UIDeviceOrientationPortrait || d.orientation == UIDeviceOr…