代码库> 菜单> 简单的Tab页面
简单的Tab页面
关注
上传者:everettjf 分类:菜单(Menu)
查看次数:5789 下载次数:1401
上传时间:2015-09-25 大小:123 B
简单的Tab页面



UIView *view1 = [UIView new];
UIView *view2 = [UIView new];
UIView *view3 = [UIView new];
UIView *view4 = [UIView new];
UIView *view5 = [UIView new];

NSArray *pageItems = @[
                       [[EVTTabPageScrollViewPageItem alloc]initWithTabName:@"News" andTabView:view1],
                       [[EVTTabPageScrollViewPageItem alloc]initWithTabName:@"Tech" andTabView:view2],
                       [[EVTTabPageScrollViewPageItem alloc]initWithTabName:@"Life" andTabView:view3],
                       [[EVTTabPageScrollViewPageItem alloc]initWithTabName:@"Job" andTabView:view4],
                       [[EVTTabPageScrollViewPageItem alloc]initWithTabName:@"Fun" andTabView:view5],
                       ];
_pageScroll = [[EVTTabPageScrollView alloc]initWithPageItems:pageItems];

UIView *rootView = self.view;
[rootView addSubview:_pageScroll];
[_pageScroll mas_makeConstraints:^(MASConstraintMaker *make){
    make.top.equalTo(rootView.mas_top).offset(30);
    make.left.equalTo(rootView.mas_left);
    make.right.equalTo(rootView.mas_right);
    make.bottom.equalTo(rootView.mas_bottom);
}];


测试环境:Xcode 6.2
收藏
我来说两句
发表评论
您还没有登录!请登录注册
所有评论(0


本周热门下载
综合评论
提示
sina weixin mail 回到顶部