Skip to content

LZS-bobo/SBHeaderTitleController

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

SBHeaderTitleController

快速创建类似某宝店铺详情页

最近项目需要一个类似淘宝店铺详情页的界面,实现完需求闲着没事就简单封装一下SBHeaderTitleController

用法 继承SBHeaderTitleController 用法和系统的UITabBarController 差不多

  • 拥有有headerView 的情况
- (void)viewDidLoad {
    [super viewDidLoad];
    //添加所有的控制器
    [self setupAllChildVc];
    UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 0, 100)];
    imageView.contentMode = UIViewContentModeScaleToFill;
    imageView.image = [UIImage imageNamed:@"taobao"];
    
    self.headerView = imageView;
    self.headerViewStyle = SBHeaderViewStyleBottom;
}

- (void)setupAllChildVc
{
    
    UIViewController *first = [[FirstTableViewController alloc] init];
    first.title = @"首页";
    [self addChildViewController:first];

    UIViewController *second = [[SecondTableViewController alloc] init];
    second.title = @"全部商品";
    [self addChildViewController:second];
    
    UIViewController *third = [[ThirdTableViewController alloc] init];
    third.title = @"上新";
    [self addChildViewController:third];
    
    UIViewController *fourth = [[ThirdTableViewController alloc] init];
    fourth.title = @"全部商品";
    [self addChildViewController:fourth];
    
}

某宝.gif

  • 模仿简书

简书.gif

  • 模仿熊猫TV 标题按钮栏可以滚动 能够快速添加和删除 熊猫TV.gif

About

快速创建类似某宝店铺详情页

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published