获取图片的大小的方法
UIImage * image = [UIImage imageNamed:@"1.png"];
CGSize * size = (__bridge CGSize *)NSStringFromCGSize(image.size);
NSLog(@“%@",size);
解决 push 到写一个界面的时候导航控制器从隐藏过度到不隐藏的时候出现的闪现现象
[self.navigationController setNavigationBarHidden:NO animated:YES];
打印 deviceToken
NSLog(@"%@",[[[[deviceToken description] stringByReplacingOccurrencesOfString: @"<" withString: @""] stringByReplacingOccurrencesOfString: @">" withString: @""] stringByReplacingOccurrencesOfString: @" " withString: @""]);
设置CGRectZero从导航栏下开始计算
// 设置CGRectZero从导航栏下开始计算
if ([self respondsToSelector:@selector(setEdgesForExtendedLayout:)]) {
self.edgesForExtendedLayout = UIRectEdgeNone;
}
时间: 2024-11-06 10:29:53