iOSMJRefresh封装设置文字和字体

更新时间:2023-05-26 20:59:38 阅读: 评论:0

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

本文发布于:2023-05-26 20:59:38,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/78/787493.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:加载   设置   点击
相关文章
留言与评论(共有 0 条评论)
   
验证码:
推荐文章
排行榜
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图