macOS/iOS API解説

iOS , Mac アプリケーション開発のために使われる主要フレームワークの日本語情報です。2010年代に書かれた内容です。今後更新はありません。

目次

statusBarFrame

ステータスバーの範囲を定義するフレーム矩形(読み出しのみ)
@property(nonatomic, readonly) CGRect statusBarFrame

解説

ステータスバーの範囲を定義するフレーム矩形(読み出しのみ)
もしステータスバーが隠されていたら、このプロパティの値はCGRectZero

クラス

UIApplication

Instance Methods

使用可能

iPhone2.0

参照

例文

- (void)applicationDidFinishLaunching:(UIApplication *)application {
	
	// Configure and show the window
	
	[window addSubview:[navigationController view]];
	[window makeKeyAndVisible];
	
	
	CGRect frameRect = application.statusBarFrame;
	NSLog(@"(%0.1f,%0.1f),(%0.1f,%0.1f)",frameRect.origin.x,frameRect.origin.y,frameRect.size.width,frameRect.size.height);
	//--> (0.0,0.0),(320.0,20.0)
}