Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
初めての iPad アプリケーションを作成しています。私が最初に遭遇した問題の 1 つは、さまざまな向きでの画面サイズです。
これら2つを使用しようとすると:
view.frame
また
view.bounds
ポートレートモードの画面解像度を取得します。大画面とミニ画面の両方の iPad が必要であることに注意してください。mainScreen も使用してみましたが、上記のコードと同じ結果が得られます。
どうぞ
- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation { CGFloat width = CGRectGetWidth(self.view.bounds); }
これが役に立った場合は、回答/投票としてマークしてください。