THSegmentedPager 1.1.3

THSegmentedPager 1.1.3

测试已测试
语言语言 Obj-CObjective C
许可 MIT
发布上次发布2015年9月

Tribus Hannes维护。



  • 作者
  • Hannes Tribus

Build Status

这个控件结合了优秀的HMSegmentedControl和负责在点击HMSegmentedControl时显示正确页面以及在UIPageviewController滚动时更新选择的UIPageviewController。

屏幕截图

iPhone Portrait iPhone Landscape

安装

手动安装

或者将此仓库中的THSegmentedPager/目录复制到你的项目中。

依赖项

如果你偏好手动方法,请注意你需要导入依赖项,在这个例子中是

这将导致一些找不到导入的错误,你也需要手动解决这些问题。

功能

V1.1.X

V1.0.X

  • 如果在 UINavigationController 中使用,它会显示相同的 Viewcontroller 当它返回时
  • 拉取请求感谢 noelrocha
  • 控件现在能够通过只知道标识符列表来自动从实际的Storyboard中分配 viewcontrollers

用法

以下是从ExampleProject中获取的示例初始化代码。

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    THSegmentedPager *pager = (THSegmentedPager *)self.window.rootViewController;
    NSMutableArray *pages = [NSMutableArray new];
    for (int i = 1; i < 4; i++) {
        // Create a new view controller and pass suitable data.
        SamplePagedViewController *pagedViewController = [pager.storyboard instantiateViewControllerWithIdentifier:@"SamplePagedViewController"];
        [pagedViewController setViewTitle:[NSString stringWithFormat:@"Page %d",i]];
        [pagedViewController.view setBackgroundColor:[UIColor colorWithHue:((i/8)%20)/20.0+0.02 saturation:(i%8+3)/10.0 brightness:91/100.0 alpha:1]];
        [pages addObject:pagedViewController];
    }
    [pager setPages:pages];
    return YES;
}

贡献

……是非常受欢迎的。如果你有一个想法,只需分叉库进行改动,如果它对他人有用并且不影响其他用户的图书馆功能,我会将其插入

贡献者

Victor Ilyukevich

  • 增加了自动化测试
  • 增加了Travis CI和Coverall.io支持

JaxGit

许可证

本项目的源代码按照MIT许可证标准提供。请参阅许可证文件