IOS之左右滑动效果的实现——利用JASidePanels
2014-01-03 15:25
423 查看
IOS之滑动效果的实现——JASidePanels
之前我已经介绍过了两个可以比较好的实现Sliding功能的第三方类:IOS之左右滑动效果的实现——利用SWRevealViewController和
IOS之左右滑动效果的实现——利用PPRevealViewController
然后这两个类库有一个缺点当页面侧滑出菜单栏时用户仍然可以点击或者滑动主页面上的按钮或者ScrollView,这就会影响用户的体验。今天介绍的这个第三方类库很好的解决了这个问题,今天我们就来学习一下如何使用这个类库来实现我们的左右滑动效果。
首先,我们要从Github上取得代码:https://github.com/gotosleep/JASidePanels
然后,我们将取得的代码加入工程中,并开始使用
#import "JAAppDelegate.h"
#import "JASidePanelController.h"
#import "JACenterViewController.h"
#import "JALeftViewController.h"
#import "JARightViewController.h"
@implementation JAAppDelegate
@synthesize window = _window;
@synthesize viewController = _viewController;
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.viewController = [[JASidePanelController alloc] init];
self.viewController.leftPanel = [[JALeftViewController alloc] init];
self.viewController.centerPanel = [[UINavigationController alloc] initWithRootViewController:[[JACenterViewController alloc] init]];
self.viewController.rightPanel = [[JARightViewController alloc] init];
self.window.rootViewController = self.viewController;
[self.window makeKeyAndVisible];
return YES;
}
@end
这样,我们就完成了左右滑动的效果,而且比较好的是这个类库不需要我们再添加Menu按钮。
之前我已经介绍过了两个可以比较好的实现Sliding功能的第三方类:IOS之左右滑动效果的实现——利用SWRevealViewController和
IOS之左右滑动效果的实现——利用PPRevealViewController
然后这两个类库有一个缺点当页面侧滑出菜单栏时用户仍然可以点击或者滑动主页面上的按钮或者ScrollView,这就会影响用户的体验。今天介绍的这个第三方类库很好的解决了这个问题,今天我们就来学习一下如何使用这个类库来实现我们的左右滑动效果。
首先,我们要从Github上取得代码:https://github.com/gotosleep/JASidePanels
然后,我们将取得的代码加入工程中,并开始使用
#import "JAAppDelegate.h"
#import "JASidePanelController.h"
#import "JACenterViewController.h"
#import "JALeftViewController.h"
#import "JARightViewController.h"
@implementation JAAppDelegate
@synthesize window = _window;
@synthesize viewController = _viewController;
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.viewController = [[JASidePanelController alloc] init];
self.viewController.leftPanel = [[JALeftViewController alloc] init];
self.viewController.centerPanel = [[UINavigationController alloc] initWithRootViewController:[[JACenterViewController alloc] init]];
self.viewController.rightPanel = [[JARightViewController alloc] init];
self.window.rootViewController = self.viewController;
[self.window makeKeyAndVisible];
return YES;
}
@end
这样,我们就完成了左右滑动的效果,而且比较好的是这个类库不需要我们再添加Menu按钮。
相关文章推荐
- IOS之左右滑动效果的实现——利用SWRevealViewController
- IOS之左右滑动效果的实现——利用PPRevealViewController
- Android 利用ViewPager实现图片可以左右循环滑动效果附代码下载
- Android 利用ViewPager实现底部圆点导航左右滑动效果以及Fragment页面切换
- IOS——实现左右滑动一半页面的效果
- 使用viewpager嵌套实现上下左右滑动切换图片(IOS双向滚动翻页效果相同)
- 利用viewpager实现图片左右循环滑动效果
- 使用viewpager嵌套实现上下左右滑动切换图片(IOS双向滚动翻页效果相同)
- android实现导航菜单左右滑动效果
- recyclerView实现左右滑动的效果
- 利用JQuery动画制作滑动菜单项效果实现步骤及代码
- android利用ViewPager实现左右滑动功能
- 利用ViewPager+Fragment+actionbar实现可左右滑动的Action Tab
- Android实现左右滑动效果
- Android实现左右滑动指引效果
- Android实现导航菜单左右滑动效果
- Android实现渐显按钮的左右滑动效果
- Android实现导航菜单左右滑动效果
- iOS动效-利用CATransform3D实现翻页动画效果
- PSD转HTML实例教程——利用JQuery插件实现图片滑动效果