Commit f0499e7b authored by 汪洋's avatar 汪洋

Merge branch 'jinzhu/master' into 'master'

修改OCNavgationBar标题过长处理



See merge request !1
parents 950b459f 1c2beacd
...@@ -44,7 +44,9 @@ ...@@ -44,7 +44,9 @@
make.height.offset(1/[UIScreen mainScreen].scale); make.height.offset(1/[UIScreen mainScreen].scale);
}]; }];
_itemView = [[UIView alloc] initWithFrame:CGRectMake(0, 20, [UIScreen mainScreen].bounds.size.width, 44)]; _itemView = [[UIView alloc] initWithFrame:CGRectMake(0, 20, [UIScreen mainScreen].bounds.size.width, 44)];
_titleLabel = [[UILabel alloc] initWithFrame:_itemView.bounds]; CGFloat titleW = [UIScreen mainScreen].bounds.size.width - 80;
_titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(40, 0, titleW, 44)];
_titleLabel.lineBreakMode = NSLineBreakByTruncatingMiddle;
_titleLabel.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; _titleLabel.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
_titleLabel.textAlignment = NSTextAlignmentCenter; _titleLabel.textAlignment = NSTextAlignmentCenter;
_titleLabel.backgroundColor = [UIColor clearColor]; _titleLabel.backgroundColor = [UIColor clearColor];
......
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