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
0de1d2f3
Commit
0de1d2f3
authored
Feb 08, 2018
by
汪洋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
itemView使用约束来控制
parent
2e4c2b63
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
OCNavigationBar.m
GMBase/Classes/OCNavigationBar.m
+5
-2
No files found.
GMBase/Classes/OCNavigationBar.m
View file @
0de1d2f3
...
...
@@ -44,8 +44,7 @@
make
.
right
.
mas_equalTo
(
0
);
make
.
height
.
offset
(
1
/
[
UIScreen
mainScreen
].
scale
);
}];
_itemView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
[
UIApplication
sharedApplication
].
statusBarFrame
.
size
.
height
,
[
UIScreen
mainScreen
].
bounds
.
size
.
width
,
44
)];
_itemView
.
autoresizingMask
=
UIViewAutoresizingFlexibleWidth
;
_itemView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
[
UIScreen
mainScreen
].
bounds
.
size
.
width
,
44
)];
CGFloat
titleW
=
[
UIScreen
mainScreen
].
bounds
.
size
.
width
-
80
;
_titleLabel
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
40
,
0
,
titleW
,
44
)];
_titleLabel
.
lineBreakMode
=
NSLineBreakByTruncatingTail
;
...
...
@@ -74,6 +73,10 @@
[
_itemView
addSubview
:
_leftButton
];
[
_itemView
addSubview
:
_rightButton
];
[
_itemView
addSubview
:
_nearRightButton
];
[
_itemView
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
left
.
right
.
bottom
.
mas_equalTo
(
0
);
make
.
height
.
mas_equalTo
(
44
);
}];
[
_leftButton
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
left
.
mas_equalTo
(
20
);
make
.
centerY
.
mas_equalTo
(
0
);
...
...
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