2015年1月26日 星期一 [iOS]UIwebview左右滑動回上一頁
来源:互联网 发布:变色龙引导u盘安装mac 编辑:程序博客网 时间:2024/05/01 23:55
介面旁加上
@interface infoViewController : UIViewController<UIGestureRecognizerDelegate>
viewDidLoad內加入
UISwipeGestureRecognizer *swipeRight = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(swipeRightAction:)];
swipeRight.direction = UISwipeGestureRecognizerDirectionRight;
swipeRight.delegate = self;
[webinfo addGestureRecognizer:swipeRight];
UISwipeGestureRecognizer *swipeLeft = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(swipeLeftAction:)];
swipeLeft.direction = UISwipeGestureRecognizerDirectionLeft;
swipeLeft.delegate = self;
[webinfo addGestureRecognizer:swipeLeft];
- (void)swipeRightAction:(id)ignored
{
NSLog(@"Swipe Right");
[webinfo goBack]; //回上一頁
}
- (void)swipeLeftAction:(id)ignored
{
NSLog(@"Swipe Left");
[webinfo goForward]; //下一頁
}
0 0
- 2015年1月26日 星期一 [iOS]UIwebview左右滑動回上一頁
- 2010年4月26日星期一
- 2009年6月1日星期一
- 2011年12月26日 星期一(oracle读书笔记)
- 2015年5月4日星期一 Xml学习小结
- 2006年1月16日 星期一 雨
- 2006年1月23日 星期一 晴
- 2006年1月31日 星期一 阴
- 2013年1月7日 星期一 GTD 稳
- 2005年4月25日 星期一
- 2006年9月18日星期一
- 2006年9月16日星期一
- 2007年4月16日 星期一
- 2007年4月23日 星期一
- 2007年4月29日 星期一
- 2007年5月14日 星期一
- 2007年5月21日 星期一
- 2007年5月28日 星期一
- java--反射
- 重构笔记——将类内联化
- 热门智力题 过桥问题和倒水问题
- 十天学Linux内核之第七天---电源开和关时都发生了什么
- 树的非递归深度优先遍历
- 2015年1月26日 星期一 [iOS]UIwebview左右滑動回上一頁
- poj1742 dp
- CoreText 使用教程:以创建一个简单的杂志应用为例
- 二叉树的建立与遍历-数组模拟和链表模拟
- HttpClient get和HttpClient Post请求的方式获取服务器的返回数据
- CFNetwork概念(CFNetwork Concepts )
- 开始学习C语言了
- javascript 运动函数
- ARM + OpenCV 抓取摄像头图像 && 一点感想