View Code? Open in Web Editor
NEW
A library that allows to have a UIPageController with control buttons (One per VC / Left-Right Buttons) or an UISegmentController. This is not a difficult task, but the intention of this library is to make it extremely easy, clean and fast. We resemble the use of a UITableView in a UIViewController.
License: MIT License
Objective-C 98.07%
Ruby 1.93%
mbxpageviewcontroller's People
mbxpageviewcontroller's Issues
Hi Using Your MBX(*segment) Control everything is fine but when we scroll(swiping) thirdViewController methods gets called in secondViewController any help
Is it possible to implement a segue from an @IBOutlet in a childViewController to another VC embedded in the MBXPageControllers()?
好像直接点击segementItem...他的每个控制器的数据请求都会走一遍?
After selecting choose device in storyboard for Xcode 8. PageViewController doesn't show up.
Hi,Thank you Code!
I want Xib into code, but can not add, I hope to help me.
Thanks again!
@interface AcceptPKViewController () <MBXPageControllerDataSource, MBXPageControllerDataDelegate>
@Property (nonatomic, strong) UISegmentedControl segmentController;
@Property (nonatomic, strong) UIView *containerView;
@Property (nonatomic, strong) MBXPageViewController MBXPageController;
@EnD
@implementation AcceptPKViewController
(void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
self.MBXPageController = [[MBXPageViewController alloc] init];
self.MBXPageController.MBXDataSource = self;
self.MBXPageController.MBXDataDelegate = self;
self.MBXPageController.pageMode = MBX_SegmentController;
[self.MBXPageController reloadPages];
}
pragma mark - MBXPageViewController Data Source
(NSArray *)MBXPageButtons
{
self.segmentController = [[UISegmentedControl alloc] initWithItems:@[@"BOSS",@"TASK"]];
self.segmentController.selectedSegmentIndex = 0;
self.segmentController.highlighted = NO;
self.segmentController.frame = CGRectMake(10, 5, 300, 35);
return @[self.segmentController];
}
(UIView *)MBXPageContainer
{
self.containerView = [[UIView alloc] init];
self.containerView.frame = DF_FRAME(0, 80, kScreenWidth, 49);
self.containerView.backgroundColor = [UIColor yellowColor];
return self.containerView;
}
(NSArray *)MBXPageControllers
{
VisitBossViewController *visitBossViewController = [[VisitBossViewController alloc] init];
TasksViewController *taskViewController = [[TasksViewController alloc] init];
return @[visitBossViewController,taskViewController];
}
pragma mark - MBXPageViewController Delegate
(void)MBXPageChangedToIndex:(NSInteger)index
{
NSLog(@"%@ %ld", [self class], (long)index);
}