(原創(chuàng))
可能是新手最好用的滑動(dòng)視圖了..
用法:
- (instancetype)initWithFrame:(CGRect)frame WithViewControllers:(NSArray *)viewControllers;
將 控制器與按鈕Title以字典形式,并組成數(shù)組制轰,并賦值
如 NSArray *viewControllers = @[@{@"Red":[RedViewController new]},@{@"Yellow":[YellowViewController new]},@{@"Blue":[BlueViewController new]}];
然后 addsubview
感受吧
附 github地址:
https://github.com/DriverWang/YCSlideView