有时候需要修改导航栏的高度,可以这样修改:
UINavigationBar *bar = [self.navigationController navigationBar];
CGFloat navBarHeight =
30.0f;
CGRect rect = CGRectMake(0,
20, self.window.frame.size.width, navBarHeight);
[bar
setFrame:rect];
时间: 2024-12-28 21:38:48
有时候需要修改导航栏的高度,可以这样修改:
UINavigationBar *bar = [self.navigationController navigationBar];
CGFloat navBarHeight =
30.0f;
CGRect rect = CGRectMake(0,
20, self.window.frame.size.width, navBarHeight);
[bar
setFrame:rect];