ios-TitleMenuView.zip
TitleMenuView 仿新闻app的菜单滚动条,简单易懂,全程小白级代码,初学者看了很快就能学会。 使用方法 把压缩文件中的TitleMenuView.h和TitleMenuView.m两个文件放入项目文件夹使用 初始化方法 -(instancetype)initWithFrame:(CGRect)frame WithViewControllers:(NSArray *)array WithStyle:(TitleMenuScrollViewStyle) titleMenuStyle WithTitleFont:(CGFloat)font AndTitleInterval:(CGFloat)space; 可设置的属性 //按钮字体的默认颜色 @property (nonatomic, strong) UIColor *btnNormalColor; //按钮选中时字体的颜色 @property (nonatomic, strong) UIColor *btnSelectedColor; //标题栏的背景颜色 @property (nonatomic, strong) UIColor *titleMenuBackGroundColor; //滚动条的颜色 @property (nonatomic, strong) UIColor *sliderColor; 使用案例 //数组如果不是这样的格式,可能会造成标题不显示或报错 NSArray *array = @[@{@"新闻":[[FirstViewController alloc]init]}]; TitleMenuView *titleMenu = [[TitleMenuView alloc]initWithFrame:CGRectMake(0, 64, mainWidth, mainHeight-20) WithViewControllers:array WithStyle:TitleMenuStyleDefault WithTitleFont:15 AndTitleInterval:20]; ``` 提示:如果有navigationcontroller,要加上self.automaticallyAdjustsScrollViewInsets = NO(去掉头部留白); 如果有任何问题或者好的建议,欢迎联系:Email:<1224631767@qq.com>
- 1
- 2
- 3
- 粉丝: 443
- 资源: 1万+
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助