iOSMJRefresh封装设置⽂字和字体
使⽤的时候调⽤下⾯的代码:
lf.tableView.mj_header = [MJRefreshManager defaultHeader:^{商业计划书样本
}];
MJRefreshManager⽂件
洗衣机故障代码
#import <Foundation/Foundation.h>
#import <MJRefresh/MJRefresh.h>
@interface MJRefreshManager : NSObject
企业安全标语
+ (MJRefreshNormalHeader *)defaultHeader:(MJRefreshComponentRefreshingBlock)refreshingBlock;
+ (MJRefreshAutoNormalFooter *)defaultFooter:(MJRefreshComponentRefreshingBlock)refreshingBlock;
+ (MJRefreshAutoNormalFooter *)loadingDataNoTextFooter:(MJRefreshComponentRefreshingBlock)refreshingBlock; @end
#import "MJRefreshManager.h"
@implementation MJRefreshManager
+ (MJRefreshNormalHeader *)defaultHeader:(MJRefreshComponentRefreshingBlock)refreshingBlock {
// __weak typeof(lf) weakSelf = lf;
MJRefreshNormalHeader *header = [MJRefreshNormalHeader headerWithRefreshingBlock:refreshingBlock];
米食[header tTitle:@"正在加载" forState:MJRefreshStateRefreshing];
// 往下拉的时候⽂字
[header tTitle:@"下拉刷新" forState:MJRefreshStateIdle];
/
/ 松⼿时候的⽂字
猎头局中局[header tTitle:@"松开刷新" forState:MJRefreshStatePulling];
// 隐藏时间迟到的英文
header.lastUpdatedTimeLabel.hidden = YES;
// 设置字体
header.stateLabel.font = [UIFont fontWithName:Font_PingFang_Regular size:14];
header.lastUpdatedTimeLabel.font = [UIFont fontWithName:Font_PingFang_Regular size:14];
return header;
}
+ (MJRefreshAutoNormalFooter *)defaultFooter:(MJRefreshComponentRefreshingBlock)refreshingBlock {
MJRefreshAutoNormalFooter *footer = [MJRefreshAutoNormalFooter footerWithRefreshingBlock:refreshingBlock]; [footer tTitle:@"上拉或点击加载更多" forState:MJRefreshStateIdle];
[footer tTitle:@"正在加载" forState:MJRefreshStateRefreshing];
[footer tTitle:@"已加载全部" forState:MJRefreshStateNoMoreData];
footer.stateLabel.font = [UIFont fontWithName:Font_PingFang_Regular size:14];
月子护理return footer;
}
+ (MJRefreshAutoNormalFooter *)loadingDataNoTextFooter:(MJRefreshComponentRefreshingBlock)refreshingBlock { MJRefreshAutoNormalFooter *footer = [MJRefreshAutoNormalFooter footerWithRefreshingBlock:refreshingBlock]; [footer tTitle:@"加载失败,点击重新加载" forState:MJRefreshStateIdle];
[footer tTitle:@"正在加载" forState:MJRefreshStateRefreshing];
[footer tTitle:@"" forState:MJRefreshStateNoMoreData];
凉茶草药有哪些footer.stateLabel.font = [UIFont fontWithName:Font_PingFang_Regular size:14];
return footer;
}
@end