通过手指向左、向右或者向上滑动屏幕,显示左边、右边或者下方的子视图。子视图并不是全屏占据屏幕,而是占据屏幕一半位置。可以定义下方子视图的高度。 [Code4App.com]
#import "ViewController.h" @interface ViewController () @property(strong, nonatomic) UILabel *label; @end @implementation ViewController - (void)viewDidLoad { [super viewDidLoad]; //初始化界面
添加HMSegmentedControl 和 SwipeView 第三方控件加入项目 //subviews @property (nonatomic,strong)HMSegmentedControl *segmentedControl; @property (nonatomic,strong)SwipeView *swipeView; viewDidLoad中添加 // add subview
滑动手势 #import "ViewController.h" @interface ViewController () @property (nonatomic, retain)UISwipeGestureRecognizer *swipeGestureRecognizer; @end @implementation ViewController - (void) handleSwipes:(U