DYSlideView 0.0.9

DYSlideView 0.0.9

测试已测试
语言语言 Obj-CObjective C
许可证 MIT
发布日期最后发布日期2016年9月

Dwarven 维护。



iOS 标签页滑动视图。

预览

DYSlideView Demo Gif

Podfile

要使用 CocoaPods 在 Xcode 项目中集成 DYSlideView,请在您的 Podfile 中指定

pod 'DYSlideView'

如何使用

#import "DYSlideView.h"

//init and setup DYSlideView
DYSlideView *slideView = [[DYSlideView alloc] init];
[slideView setFrame:self.view.bounds];

slideView.slideBarColor = [UIColor lightGrayColor];
slideView.slideBarHeight = 50;

slideView.sliderColor = [UIColor redColor];
slideView.sliderHeight = 2;
slideView.sliderScale = 0.6;

slideView.buttonNormalColor = [UIColor yellowColor];
slideView.buttonSelectedColor = [UIColor blackColor];
slideView.buttonTitleFont = [UIFont boldSystemFontOfSize:16.f];

slideView.scrollViewBounces = YES;
slideView.scrollEnabled = YES;

slideView.delegate = self;
[self.view addSubview:slideView];

//add delegate
@interface YourViewController () <DYSlideViewDelegate>
@end

//implement delegate
@required
- (NSInteger)DY_numberOfViewControllersInSlideView;
- (nonnull NSString *)DY_titleForViewControllerAtIndex:(NSInteger)index;
//You need to add the ViewController to YourViewController's childViewControllers.
- (nonnull UIViewController *)DY_viewControllerAtIndex:(NSInteger)index;

@optional
- (void)DY_didSelectButtonAtIndex:(NSInteger)index;