Commit 58c5deb1 authored by 朱璇's avatar 朱璇

修改navigationbar righticon有值得时候 titlelabel的展示宽度

parent 65432171
...@@ -25,10 +25,13 @@ ...@@ -25,10 +25,13 @@
- (void)viewDidLoad { - (void)viewDidLoad {
[super viewDidLoad]; [super viewDidLoad];
NSLog(@"%@", self.referer); NSLog(@"%@", self.referer);
self.navigationBar.title = @"你好我是汪洋,我在更美工作,很开心,哈哈哈哈哈哈"; dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
self.navigationBar.title = @"你好我是汪洋,我在更美工作,很开心,哈哈哈哈哈哈";
});
// self.navigationBar.rightTitle = @"举报有奖"; // self.navigationBar.rightTitle = @"举报有奖";
self.navigationBar.nearRightIcon = @"back"; self.navigationBar.nearRightIcon = @"back";
self.navigationBar.rightIcon = @"back"; self.navigationBar.rightIcon = @"back";
_table.separatorStyle = UITableViewCellSeparatorStyleSingleLine; _table.separatorStyle = UITableViewCellSeparatorStyleSingleLine;
[_table registerClass:[UITableViewCell class] forCellReuseIdentifier:@"cell"]; [_table registerClass:[UITableViewCell class] forCellReuseIdentifier:@"cell"];
} }
......
...@@ -14,7 +14,7 @@ PODS: ...@@ -14,7 +14,7 @@ PODS:
- AFNetworking/Serialization (3.1.0) - AFNetworking/Serialization (3.1.0)
- AFNetworking/UIKit (3.1.0): - AFNetworking/UIKit (3.1.0):
- AFNetworking/NSURLSession - AFNetworking/NSURLSession
- GMBase (0.4.2): - GMBase (0.4.3):
- GMHud - GMHud
- GMJSONModel - GMJSONModel
- GMKit - GMKit
...@@ -103,7 +103,7 @@ EXTERNAL SOURCES: ...@@ -103,7 +103,7 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS: SPEC CHECKSUMS:
AFNetworking: 5e0e199f73d8626b11e79750991f5d173d1f8b67 AFNetworking: 5e0e199f73d8626b11e79750991f5d173d1f8b67
GMBase: 888de394aa486c72a5eb50a12ff4fb0fa717403b GMBase: 11e3302fcb7fc304469fc7e123f6961c318b7793
GMCache: b7d48432ee2469eb0c6c86c720a1958bd373187e GMCache: b7d48432ee2469eb0c6c86c720a1958bd373187e
GMHud: 9cc3942fc9f215db55b134cbfd05a458b124a964 GMHud: 9cc3942fc9f215db55b134cbfd05a458b124a964
GMJSONModel: 5e81a98de668e9f93cf6ff77869f77b0d1a806be GMJSONModel: 5e81a98de668e9f93cf6ff77869f77b0d1a806be
......
...@@ -107,7 +107,7 @@ ...@@ -107,7 +107,7 @@
return; return;
} }
if (_rightTitle.length >= 3) { if (_rightTitle.length >= 3 || _rightIcon) {
_titleLabel.frame = CGRectMake(80, 0, self.width - 160, 44); _titleLabel.frame = CGRectMake(80, 0, self.width - 160, 44);
} }
} }
...@@ -153,6 +153,7 @@ ...@@ -153,6 +153,7 @@
_title = title; _title = title;
_titleLabel.hidden = NO; _titleLabel.hidden = NO;
_titleLabel.text = _title; _titleLabel.text = _title;
[self setNeedsLayout];
} }
- (void)setLeftIcon:(NSString *)leftIcon { - (void)setLeftIcon:(NSString *)leftIcon {
......
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