Commit 4bbb404c8a28c17dc2ac88c49cb407bf0e3572bc
1 parent
5541797d
0.4.7
Showing
4 changed files
with
14 additions
and
5 deletions
CNLiveVideoClassifyKit.podspec
CNLiveVideoClassifyKit/Classes/SearchView/ViewController/CNWitnessSearchDetailController.m
| ... | ... | @@ -80,7 +80,7 @@ static NSString *const CNWitnessSearchPersonCellID = @"CNWitnessSearchPersonCell |
| 80 | 80 | }else{ |
| 81 | 81 | [[CNLiveListManager shareListManager] removeObserver:self forKeyPath:@"personMessage"]; |
| 82 | 82 | } |
| 83 | - | |
| 83 | + NSLog(@"CNWitnessSearchDetailController++++++销毁了"); | |
| 84 | 84 | } |
| 85 | 85 | - (instancetype)initWithPageType:(CNWitnessSearchDetailType)type |
| 86 | 86 | { | ... | ... |
CNLiveVideoClassifyKit/Classes/SearchView/ViewController/CNWitnessSearchListController.m
CNLiveVideoClassifyKit/Classes/SearchView/ViewController/CNWitnessSearchViewController.m
| ... | ... | @@ -45,6 +45,9 @@ static NSString *const CNWitnessSearchHeaderViewID = @"CNWitnessSearchHeaderView |
| 45 | 45 | self.dataSource = [CNWitnessSearchPresent dealHots:self.hots isShowAll:self.isShowAll allHistories:self.histories.copy]; |
| 46 | 46 | [self.collectionView reloadData]; |
| 47 | 47 | } |
| 48 | +-(void)dealloc{ | |
| 49 | + NSLog(@"CNWitnessSearchViewController++++++销毁了"); | |
| 50 | +} | |
| 48 | 51 | - (void)viewDidLoad { |
| 49 | 52 | [super viewDidLoad]; |
| 50 | 53 | self.navigationController.interactivePopGestureRecognizer.delegate = self; |
| ... | ... | @@ -73,8 +76,11 @@ static NSString *const CNWitnessSearchHeaderViewID = @"CNWitnessSearchHeaderView |
| 73 | 76 | make.top.equalTo(self.collectionView); |
| 74 | 77 | make.width.mas_equalTo(kScreenWidth); |
| 75 | 78 | }]; |
| 76 | - UIPanGestureRecognizer *pan = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(panGestureEvent:)]; | |
| 77 | - [self.listVC.view addGestureRecognizer:pan]; | |
| 79 | +} | |
| 80 | +- (void)viewDidDisappear:(BOOL)animated{ | |
| 81 | + [super viewDidDisappear:animated]; | |
| 82 | + [self removeChild:self.listVC]; | |
| 83 | + self.listVC = nil; | |
| 78 | 84 | } |
| 79 | 85 | - (BOOL)preferredNavigationBarHidden{ |
| 80 | 86 | return YES; |
| ... | ... | @@ -93,7 +99,7 @@ static NSString *const CNWitnessSearchHeaderViewID = @"CNWitnessSearchHeaderView |
| 93 | 99 | make.left.equalTo(self.view).offset(translation.x); |
| 94 | 100 | }]; |
| 95 | 101 | } else if (gesture.state == UIGestureRecognizerStateEnded) { |
| 96 | - if (translation.x >= sensitivePosition) { | |
| 102 | + if (translation.x >= sensitivePosition || gesture.numberOfTouches < 0.5) { | |
| 97 | 103 | [self listViewShow:NO]; |
| 98 | 104 | }else{ |
| 99 | 105 | [self listViewShow:YES]; | ... | ... |