https://github.com/rushisangani/rssegmentviewcontroller
A powerful control for Tab or Segment layout in iOS.
https://github.com/rushisangani/rssegmentviewcontroller
Last synced: about 17 hours ago
JSON representation
A powerful control for Tab or Segment layout in iOS.
- Host: GitHub
- URL: https://github.com/rushisangani/rssegmentviewcontroller
- Owner: rushisangani
- License: mit
- Created: 2016-06-12T07:36:11.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-07-20T13:24:38.000Z (about 9 years ago)
- Last Synced: 2025-03-13T13:33:16.676Z (7 months ago)
- Language: Objective-C
- Homepage:
- Size: 323 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# RSSegmentViewController
The comprehensive control that manages **TabView Layout** like android or **Segmented Layout** using different ViewControllers. Its easy to use with minimum setup required. RSSegmentViewController is built upon [MXSegmentedPager] (https://github.com/maxep/MXSegmentedPager).

## Features
- Show multiple Segment/Tab layout in iPhone, iPad.
- Design individual ViewControllers as per your need.
- Navigate through tabs using direct tap or swipe.
- Customizable Color, Fonts and views.
- Prevent user moving to next page by overriding default method## How To Use
### Storyboard Setup

### ViewController
```objective-c
#import "RSSegmentViewController.h"@interface ViewController : RSSegmentViewController
@end
@implementation HomeViewController
- (instancetype)initWithCoder:(NSCoder *)aDecoder {
self = [super initWithCoder:aDecoder];
if(self){
/* Add as many as pages by adding Titles */
self.sectionTitles = @[@"Page 1", @"Page 2", @"Page 3"];
/* Customize other properties */
self.useTitleAsSegueIndentifier = YES;
self.textAtttibutes = @{NSForegroundColorAttributeName : [UIColor darkGrayColor]};
self.selectedTextAtttibutes = @{NSForegroundColorAttributeName : [UIColor blackColor]};
self.selectionIndicatorColor = [UIColor orangeColor];
}
return self;
}#pragma mark- Navigation
/* return NO for specific Page or ViewController */
- (BOOL)shouldPerformSegueWithIdentifier:(NSString *)identifier sender:(id)sender {
return YES;
}-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
/* Get ViewController or page using identifier */
}```
## License
RSSegmentViewController is released under the MIT license. See LICENSE for details.