iOS 自定义抽屉式效果--ViewDeck(SlidingDrawer)实现与使用详解
2016-10-27 16:58
549 查看
本实现抽屉式效果的框架相对gitHub里的IIViewDeck,更加简单易用,实现代码简单,效果好,可以无需修改原项目的任何框架而将本效果无缝式移植进现有的项目中,具体操作如下。
1.首先,上demo代码:下载
2.Xcode打开项目,可以看到RootViewController,LeftViewController,RightViewController,CenterViewController等,在移植过程中,只需把这四个控制器文件及UIImage+ImageEffects这个分类拖入项目中,然后重写程序代理的完成加载方法(或者其他必要的地方)即可,重写代码如下:
3.此时编译项目即可实现如下的效果:
4.修改RootViewController,LeftViewController,RightViewController,CenterViewController,实现对应的界面及功能。
1.首先,上demo代码:下载
2.Xcode打开项目,可以看到RootViewController,LeftViewController,RightViewController,CenterViewController等,在移植过程中,只需把这四个控制器文件及UIImage+ImageEffects这个分类拖入项目中,然后重写程序代理的完成加载方法(或者其他必要的地方)即可,重写代码如下:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{ self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; // Override point for customization after application launch. self.window.backgroundColor = [UIColor whiteColor]; CenterViewController *centerVC = [[CenterViewController alloc] init]; LeftViewController *leftVC = [LeftViewController new]; RightViewController *rightVC = [RightViewController new]; self.window.rootViewController = [[RootViewController alloc] initWithCenterVC:centerVC rightVC:rightVC leftVC:leftVC]; [self.window makeKeyAndVisible]; return YES; }
3.此时编译项目即可实现如下的效果:
4.修改RootViewController,LeftViewController,RightViewController,CenterViewController,实现对应的界面及功能。
相关文章推荐
- View滑动效果常用属性详解2-使用scrollX|scrollY和Scroller实现自定义ViewPager
- IOS 学习:UITableView使用详解2 自定义的单元格
- 使用自定义RadioButton和ViewPager实现TabHost效果和带滑动的页卡效果。
- Android使用wheelView实现简单类似ios PickerView选择器效果
- 详解ExplosionField的使用,实现View的粉碎效果
- 使用viewpager嵌套实现上下左右滑动切换图片(IOS双向滚动翻页效果相同)
- Android开发-使用自定义View实现loading效果
- iOS之UI--使用SWRevealViewController实现侧边菜单功能详解实例
- IOS开发UI篇--使用CAShapeLayer实现复杂的View的遮罩效果
- 自定义WheelView UI 实现Ios滚轮效果
- 【iOS开发-24】导航控制器下不同视图控制器之间切换:利用CATrasition和view的layer层来实现自定义的动画效果
- 使用自定义RadioButton和ViewPager实现TabHost效果和带滑动的页卡效果
- iOS之UI--使用SWRevealViewController实现侧边菜单功能详解实例
- iOS自定义UICollectionViewFlowLayout实现图片浏览效果
- 详解ExplosionField的使用,实现View的粉碎效果
- IOS 开发使用UITableView实现抽屉打开关闭效果
- [IOS视图切换]ViewDeck类似path效果的实现
- IOS开发UI篇--使用CAShapeLayer实现复杂的View的遮罩效果
- iOS之UI--使用SWRevealViewController实现侧边菜单功能详解实例
- 【iOS系列】- iOS吸附效果的实现 之 UICollectionView的使用全解