What I have Done !!
1) I can swipe between view controllers(View1,and View2 ) as showing in the image below
2) I Created Tow button in ContainerViewController That will allow The user to Click each button to navigate between these two pages [Similar to the swipe but this one with button click]
Here's The Big Picture how my Program Looks like in the image below
What help do I need ?
1) I want someone to help me to Implement these Two button to navigate between these two pages [Similar to the swipe ]. In addition, The user can either swipe or click the buttons to Navigate between pages.
It will be my pleasure to find someone here who's willing to help me and others
1-ContainerViewController I just only created two buttons.
2- View1 and View2 I have not done any coding here.
3- ViewSwipe Here's The code
#import "ScrollViewController.h"
#import "View1.h"
#import "View2.h"
@interface ViewController ()
@property (weak, nonatomic) IBOutlet UIScrollView *scrollView;
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
View1 * V1 = [[View1 alloc]initWithNibName:@"View1" bundle:nil];
View2 * V2 = [[View2 alloc]initWithNibName:@"View2" bundle:nil];
[self addChildViewController:V1];
[self.scrollView addSubview:V1.view];
[V1 didMoveToParentViewController:self];
[self addChildViewController:V2];
[self.scrollView addSubview:V2.view];
[V2 didMoveToParentViewController:self];
CGRect V2Frame = V2.view.frame;
V2Frame.origin.x= self.view.frame.size.width;
V2.view.frame = V2Frame;
self.scrollView.contentSize=CGSizeMake(self.view.frame.size.width * 2, self.view.frame.size.height);
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@end