初始化
#pragma mark - 設(shè)置導(dǎo)航欄
- (void)setNavgtionConfig {
EasyNavigationOptions *options = [EasyNavigationOptions shareInstance];
options.titleColor = [UIColor whiteColor];
options.buttonTitleFont = [UIFont systemFontOfSize:18];
options.navBackgroundImage = [ISGTools createImageWithColor:[UIColor whiteColor]];
options.buttonTitleColor = [UIColor whiteColor];
// 設(shè)置系統(tǒng)返回按鈕為樣式
options.navigationBackButtonImage = [UIImage imageNamed:@"nav_back"];
}
自定義導(dǎo)航欄
// 設(shè)置返回按鈕
[self.navigationView.navigationBackButton setImage:[UIImage imageNamed:@"nav_back"] forState:UIControlStateNormal] ;
// 設(shè)置標(biāo)題
[self.navigationView setTitle:@""];
// 設(shè)置標(biāo)題顏色
self.navigationView.titleLabel.textColor = [UIColor colorWithHexString:kGreen_HC];
// 隱藏分割線
self.navigationView.lineView.hidden = YES;
// 添加右側(cè)按鈕
[self.navigationView addRightButtonWithImage:[UIImage imageNamed:@"tip_Nav"] clickCallBack:^(UIView *view) {
}];
// 自定義返回按鈕點擊事件
self.navigationView.navigationBackButtonCallback = ^(UIView *view) {
};
滑動視圖改變導(dǎo)航欄
tableView.contentInset = UIEdgeInsetsMake(0, 0, 0, 0);
[self.navigationView setNavigationBackgroundAlpha:0.0];
[self.navigationView navigationAlphaSlowChangeWithScrollow:tableView start:0 end:184];
#pragma mark - —————————————————————UIScrollView Delegate—————————————————————
- (void)scrollViewDidScroll:(UIScrollView *)scrollView{
CGFloat offsetY = scrollView.contentOffset.y;
if (offsetY >= 184) {
}else {
}
}
限制字?jǐn)?shù)
// 設(shè)置代理
[_textView ba_textViewWithDelegate:_textView];
[self.textView ba_textView_wordLimitWithMaxWordLimitNumber:80 block:^(NSString *current_text) {
dispatch_async(dispatch_get_main_queue(), ^{
weakSelf."字?jǐn)?shù)限制Label".text = [NSString stringWithFormat:@"%ld/%ld", (long)current_text.length, (long)weakSelf.textView.ba_maxWordLimitNumber];
[weakSelf.view setNeedsLayout];
});
}];
限制最大以及最小寬度
[self.remakeTextView ba_textView_autoLayoutWithMaxHeight:CGFLOAT_MAX minHeight:104 block:^(CGFloat current_textViewHeight) {
}];
最后編輯于 :
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者