TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Dec 2014 |
Maintained by Unclaimed.
UIViewController subclass using SDSegmentedControl and View Controller Containment API's to switch between child view controllers
(click to download a video of the controller in action).
UITableView
's or UICollectionView
's automatically adjusts contentInset
and scrollIndicatorInsets
to accomodate for segmented controlImportant note if your project doesn't use ARC: you must add the -fobjc-arc
compiler flag to NGSegmentedViewController.m
in Target Settings > Build Phases > Compile Sources.
NGSegmentedViewController/NGSegmentedViewController
folder into your projectSDSegmentedControl.{h,m}
into your project#import <SDSegmentedControl/SDSegmentedControl.h>
in NGSegmentedViewController.h
to #import "SDSegmentedControl.h"
I have added two demos. NGSegmentedViewController example
uses code to set up a segmented view controller and NGSegmentedViewController IB example
uses Interface Builder to set one up.
As this is my first open source iOS control, it is possible that I made mistakes. Furthermore, I only implemented features that seemed useful to me. If you find any errors or want extra features, feel free to fork this project and sent in a Pull Request.
Instantiate a segmented view controller with initWithViewControllers:
or initWithViewControllers:titles:
.
When using Interface Builder, create a subclass and overwrite awakeFromNib
to call setupWithViewControllers:
or setupWithViewControllers:titles:
.
All source code is licensed under the MIT-License.
Copyright 2013 Nicky Gerritsen.