Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
GMBase
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gengmeiios
GMBase
Commits
b0ec8b1b
Commit
b0ec8b1b
authored
Nov 16, 2017
by
汪洋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
适配iPhonex
parent
0b1f46fd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
1 deletion
+17
-1
OCNavigationBar.h
GMBase/Classes/OCNavigationBar.h
+12
-0
OCNavigationBar.m
GMBase/Classes/OCNavigationBar.m
+5
-1
No files found.
GMBase/Classes/OCNavigationBar.h
View file @
b0ec8b1b
...
...
@@ -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
...
...
GMBase/Classes/OCNavigationBar.m
View file @
b0ec8b1b
...
...
@@ -190,7 +190,11 @@
}
+
(
CGFloat
)
statusBarHeight
{
return
[
UIApplication
sharedApplication
].
statusBarFrame
.
size
.
height
;
if
([
UIDevice
resolutionType
]
==
iPhone58Inches
)
{
return
44
;
}
else
{
return
20
;
}
}
+
(
CGFloat
)
navigationItemCenterY
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment