欢迎光临
我们一直在努力

M13InfiniteTabBar

建站超值云服务器,限时71元/月

M13InfiniteTabBar

项目介绍:

[分享] M13InfiniteTabBar is an elegant replacement for UITabBar.
一款可以替代UITabBar的优雅的TabBar框架

使用方法如下:
Set Up:

  • First create all the view controllers and their tabs.

[Objective-C] 查看源文件 复制代码

UIViewController *vc1 = [[UIViewController alloc] init];
UIViewController *vc2 = [[UIViewController alloc] init];
UIViewController *vc3 = [[UIViewController alloc] init];
UIViewController *vc4 = [[UIViewController alloc] init];
UIViewController *vc5 = [[UIViewController alloc] init];

M13InfiteTabBarItem *item1 = [[M13InfiniteTabBarItem alloc] initWithTitle:@"Title" selectedIconMask:[UIImage imageNamed:@"image.png"] unselectedIconMask:[UIImage imageNamed:@"image.png"]];
M13InfiteTabBarItem *item2 = [[M13InfiniteTabBarItem alloc] initWithTitle:@"Title" selectedIconMask:[UIImage imageNamed:@"image.png"] unselectedIconMask:[UIImage imageNamed:@"image.png"]];
M13InfiteTabBarItem *item3 = [[M13InfiniteTabBarItem alloc] initWithTitle:@"Title" selectedIconMask:[UIImage imageNamed:@"image.png"] unselectedIconMask:[UIImage imageNamed:@"image.png"]];
M13InfiteTabBarItem *item4 = [[M13InfiniteTabBarItem alloc] initWithTitle:@"Title" selectedIconMask:[UIImage imageNamed:@"image.png"] unselectedIconMask:[UIImage imageNamed:@"image.png"]];
M13InfiteTabBarItem *item5 = [[M13InfiniteTabBarItem alloc] initWithTitle:@"Title" selectedIconMask:[UIImage imageNamed:@"image.png"] unselectedIconMask:[UIImage imageNamed:@"image.png"]];

    Next create the M13InfiniteTabBarController and set its delegate
  • Next create the M13InfiniteTabBarController and set its delegate

[Objective-C] 查看源文件 复制代码

M13InfiniteTabBarController *viewController = [[M13InfiniteTabBarController alloc] initWithViewControllers:@[vc1, vc2, vc3, vc4, vc5] pairedWithInfiniteTabBarItems:@[item1, item2, item3, item4, item5]];
  • Customize any of the other attributes of M13InfiniteTabBar after it has been initalized.
  • To be able to direct the user’s attention, set the requires user attention background view. This feature is separated to allow easy subclassing and custom designs.

[Objective-C] 查看源文件 复制代码

viewController.requiresAttentionBackgroundView = [[PulsingRequiresAttentionView alloc] init];
  • Lastly display the controller by adding it to a UIWindow, or pushing it onto a UINavigationController stack.

DEMO 直接下载:


赞(0)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » M13InfiniteTabBar
分享到: 更多 (0)