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