// LMJNewViewController.m
|
// PLMMPRJK
|
// Created by windshan on 2017/4/6.
|
// Copyright © 2017年 GoMePrjk. All rights reserved.
|
|
|
#import "LMJNewViewController.h"
|
|
@interface LMJNewViewController ()
|
|
@end
|
|
@implementation LMJNewViewController
|
|
- (void)viewDidLoad {
|
[super viewDidLoad];
|
|
self.tableView.backgroundColor = [UIColor whiteColor];
|
|
if (@available(iOS 10.0, *)) {
|
[self.navigationController.tabBarItem setBadgeColor:[UIColor redColor]];
|
} else {
|
// Fallback on earlier versions
|
}
|
|
[self.navigationController.tabBarItem setBadgeValue:@"3"];
|
|
UIEdgeInsets edgeInsets = self.tableView.contentInset;
|
edgeInsets.bottom += self.tabBarController.tabBar.lmj_height;
|
self.tableView.contentInset = edgeInsets;
|
// LMJWordArrowItem *item0 = [LMJWordArrowItem itemWithTitle:@"占位" subTitle: nil];
|
// item0.destVc = [LMJLoggerViewController class];
|
|
|
}
|
|
|
|
#pragma mark 重写BaseViewController设置内容
|
|
- (UIColor *)lmjNavigationBackgroundColor:(LMJNavigationBar *)navigationBar
|
{
|
return [UIColor whiteColor];
|
}
|
- (BOOL)lmjNavigationIsHideBottomLine:(LMJNavigationBar *)navigationBar
|
{
|
return NO;
|
}
|
|
- (void)leftButtonEvent:(UIButton *)sender navigationBar:(LMJNavigationBar *)navigationBar
|
{
|
NSLog(@"%s", __func__);
|
}
|
|
- (void)rightButtonEvent:(UIButton *)sender navigationBar:(LMJNavigationBar *)navigationBar
|
{
|
NSLog(@"%s", __func__);
|
}
|
|
- (void)titleClickEvent:(UILabel *)sender navigationBar:(LMJNavigationBar *)navigationBar
|
{
|
NSLog(@"%@", sender);
|
}
|
|
- (NSMutableAttributedString*)lmjNavigationBarTitle:(LMJNavigationBar *)navigationBar
|
{
|
return [self changeTitle:@"自定义导航栏 View"];
|
}
|
|
|
- (UIImage *)lmjNavigationBarLeftButtonImage:(UIButton *)leftButton navigationBar:(LMJNavigationBar *)navigationBar
|
{
|
[leftButton setTitle:@"左边" forState: UIControlStateNormal];
|
[leftButton setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
|
[leftButton setBackgroundColor:[UIColor lightGrayColor] forState:UIControlStateNormal];
|
|
return nil;
|
}
|
|
|
- (UIImage *)lmjNavigationBarRightButtonImage:(UIButton *)rightButton navigationBar:(LMJNavigationBar *)navigationBar
|
{
|
rightButton.backgroundColor = [UIColor redColor];
|
[rightButton setTitle:@"右边" forState:UIControlStateNormal];
|
[rightButton setTitleColor:[UIColor greenColor] forState:UIControlStateNormal];
|
[rightButton setBackgroundColor:[UIColor lightGrayColor] forState:UIControlStateNormal];
|
|
return nil;
|
}
|
|
|
|
#pragma mark 自定义代码
|
|
-(NSMutableAttributedString *)changeTitle:(NSString *)curTitle
|
{
|
NSMutableAttributedString *title = [[NSMutableAttributedString alloc] initWithString:curTitle ?: @""];
|
|
[title addAttribute:NSForegroundColorAttributeName value:[UIColor blackColor] range:NSMakeRange(0, title.length)];
|
|
[title addAttribute:NSFontAttributeName value:[UIFont boldSystemFontOfSize:16] range:NSMakeRange(0, title.length)];
|
|
return title;
|
}
|
|
|
@end
|