Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Dwarven/DYSlideView

Repository files navigation

DYSlideView

CocoaPods Compatible Platform Twitter License

An iOS tabbed slide view.

Preview

DYSlideView Demo Gif

Podfile

To integrate DYSlideView into your Xcode project using CocoaPods, specify it in your Podfile:

pod 'DYSlideView'

How to use

#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;

About

An iOS tabbed slide view.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

AltStyle によって変換されたページ (->オリジナル) /