![enter image description here][1]I’ve seen this feature in a few apps. The Facebook app for example has a button that when pressed the main view slides to the right and a secondary view is displayed. The second view has a list of items which the user can click on. What is this called. I thought it was just a scrollview on top of a view but when I run my app the second view isn’t displayed.
.h
#import <UIKit/UIKit.h>
@interface PartsViewController : UIViewController {
IBOutlet UIScrollView *mainScroll;
}
.m
- (void)viewDidLoad
{
[mainScroll setScrollEnabled:YES];
[mainScroll setContentSize:CGSizeMake(400, 500)];
}
Like I stated this didn’t show the second view. Not sure if I need a swipe gesture. I believe I need an action an a button.
Ok so here is how I managed to create my sliding menu.


.h
@interface ViewController : UIViewController {
IBOutlet UIButton *main;
IBOutlet UIButton *parts;
IBOutlet UIButton *project;
IBOutlet UIButton *misc;
IBOutlet UIButton *close;
IBOutlet UIScrollView *ButtonScrollView;
}
- (IBAction)showButtonScroll:(id)sender;
- (IBAction)hideButtonScroll:(id)sender;
@end
.m
- (void)viewDidLoad {
[super viewDidLoad];
//Button Scroll View
ButtonScrollView.frame = CGRectMake(767, 75,391 , 940);
}
- (IBAction)showButtonScroll:(id)sender {
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.3];
ButtonScrollView.frame = CGRectMake(377, 75, 391, 940);
[UIView commitAnimations];
}
- (IBAction)hideButtonScroll:(id)sender {
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.3];
ButtonScrollView.frame = CGRectMake(767, 75, 391, 940);
[UIView commitAnimations];
}
With it being a scroll view I can add whatever items I want and place it where ever I want to. Hope this helps.
My work around. There are images at the top of this string to show what my menu looks like.
.m