diff options
author | Vitaly Takmazov | 2016-08-28 21:16:56 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2016-08-28 21:16:56 +0300 |
commit | 49cd38a2ef9ad9c9aa08bdb3ff2baafb6abede89 (patch) | |
tree | cda41995d9505b04460cadf4345b7b8fd3b13f34 /Juick/ViewControllers/MessagesViewController.m | |
parent | 188d8e4ea870d1a6c8edd5a9b323742804badeba (diff) |
drop iOS6 support
Diffstat (limited to 'Juick/ViewControllers/MessagesViewController.m')
-rw-r--r-- | Juick/ViewControllers/MessagesViewController.m | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/Juick/ViewControllers/MessagesViewController.m b/Juick/ViewControllers/MessagesViewController.m index 28e7613..3a420e1 100644 --- a/Juick/ViewControllers/MessagesViewController.m +++ b/Juick/ViewControllers/MessagesViewController.m @@ -95,22 +95,18 @@ static NSString *CellIdentifier = @"MessageCell"; - (void)viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; - if (NSFoundationVersionNumber > NSFoundationVersionNumber_iOS_6_1) { - [[NSNotificationCenter defaultCenter] addObserver:self + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(contentSizeCategoryChanged:) name:UIContentSizeCategoryDidChangeNotification object:nil]; - } } - (void)viewDidDisappear:(BOOL)animated { [super viewDidDisappear:animated]; - if (NSFoundationVersionNumber > NSFoundationVersionNumber_iOS_6_1) { - [[NSNotificationCenter defaultCenter] removeObserver:self + [[NSNotificationCenter defaultCenter] removeObserver:self name:UIContentSizeCategoryDidChangeNotification - object:nil]; - } + object:nil]; } - (void)contentSizeCategoryChanged:(NSNotification *)notification @@ -131,7 +127,6 @@ static NSString *CellIdentifier = @"MessageCell"; Message *msg = [_messages objectAtIndex:indexPath.row]; [cell setMessage:msg]; if ([msg.attach length] > 0) { - __weak MessagesViewController * weakSelf = self; [cell.attach yy_setImageWithURL:[NSURL URLWithString:msg.attach] placeholder:[UIImage imageNamed:@"AttachPlaceholder"] options:YYWebImageOptionProgressiveBlur | YYWebImageOptionSetImageWithFadeAnimation completion:^(UIImage * _Nullable image, NSURL * _Nonnull url, YYWebImageFromType from, YYWebImageStage stage, NSError * _Nullable error) { dispatch_async(dispatch_get_main_queue(), ^{ [cell setNeedsUpdateConstraints]; @@ -157,14 +152,6 @@ static NSString *CellIdentifier = @"MessageCell"; [self.navigationController pushViewController:threadViewController animated:NO]; } --(void)splitViewController:(UISplitViewController *)svc willShowViewController:(UIViewController *)aViewController invalidatingBarButtonItem:(UIBarButtonItem *)barButtonItem { - self.navigationItem.leftBarButtonItem = nil; -} - --(void)splitViewController:(UISplitViewController *)svc willHideViewController:(UIViewController *)aViewController withBarButtonItem:(UIBarButtonItem *)barButtonItem forPopoverController:(UIPopoverController *)pc { - self.navigationItem.leftBarButtonItem = barButtonItem; -} - -(void)scrollViewDidScroll:(UIScrollView *)scrollView_ { CGFloat actualPosition = scrollView_.contentOffset.y; CGFloat contentHeight = scrollView_.contentSize.height - scrollView_.contentSize.height / 2; |