iOSMJRefresh封装设置⽂字和字体
使⽤的时候调⽤下⾯的代码:
java培训学校lf.tableView.mj_header = [MJRefreshManager defaultHeader:^{
}];
MJRefreshManager⽂件
#import <Foundation/Foundation.h>tongue的音标
#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];
dunkirk
/
/ 松⼿时候的⽂字
[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;
}
beware
bearingpoint+ (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