Commit b0ec8b1b authored by 汪洋's avatar 汪洋

适配iPhonex

parent 0b1f46fd
......@@ -52,8 +52,20 @@ NS_ASSUME_NONNULL_BEGIN
@end
@interface OCNavigationBar (ViewConstant)
/**
OCNavigationBar的高度
*/
@property (nonatomic, readonly, class) CGFloat barHeight;
/**
电池栏的高度
*/
@property (nonatomic, readonly, class) CGFloat statusBarHeight;
/**
OCNavigationBar中,item的centerY
*/
@property (nonatomic, readonly, class) CGFloat navigationItemCenterY;
@end
......
......@@ -190,7 +190,11 @@
}
+ (CGFloat)statusBarHeight {
return [UIApplication sharedApplication].statusBarFrame.size.height;
if ([UIDevice resolutionType] == iPhone58Inches) {
return 44;
} else {
return 20;
}
}
+ (CGFloat)navigationItemCenterY {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment