-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathScrollViewController1.m
49 lines (37 loc) · 1.33 KB
/
ScrollViewController1.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//
// ScrollViewController1.m
// ScrollViewPopGesture
//
// Created by 蒋理智 on 2017/8/15.
// Copyright © 2017年 jingwan. All rights reserved.
//
#import "ScrollViewController1.h"
#import "UIViewController+LZPopGesture.h"
@interface ScrollViewController1 ()
@end
@implementation ScrollViewController1
- (void)viewDidLoad {
[super viewDidLoad];
self.view.backgroundColor = [UIColor whiteColor];
UIScrollView *scrollV = [[UIScrollView alloc]initWithFrame:CGRectMake(0, 100, self.view.bounds.size.width, 200)];
scrollV.backgroundColor = [UIColor redColor];
scrollV.contentSize = CGSizeMake(self.view.bounds.size.width*2, 0);
[self.view addSubview:scrollV];
//添加返回手势
[self lz_addPopGestureToView:scrollV];
//你也可以直接将手势加入self.view上
// [self lz_addPopGestureToView:self.view];
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/
@end