Commit 24525e61 authored by Pierre SAGASPE's avatar Pierre SAGASPE
Browse files

NetworkListView: fix the tableview offset when navigate in ios 11

parent 52e0eeb8
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* VLCLocalNetworkListViewController * VLCLocalNetworkListViewController
* VLC for iOS * VLC for iOS
***************************************************************************** *****************************************************************************
* Copyright (c) 2013-2017 VideoLAN. All rights reserved. * Copyright (c) 2013-2018 VideoLAN. All rights reserved.
* $Id$ * $Id$
* *
* Authors: Felix Paul Kühne <fkuehne # videolan.org> * Authors: Felix Paul Kühne <fkuehne # videolan.org>
...@@ -81,8 +81,12 @@ NSString *VLCNetworkListCellIdentifier = @"VLCNetworkListCellIdentifier"; ...@@ -81,8 +81,12 @@ NSString *VLCNetworkListCellIdentifier = @"VLCNetworkListCellIdentifier";
- (void)viewWillAppear:(BOOL)animated - (void)viewWillAppear:(BOOL)animated
{ {
[super viewWillAppear:animated]; [super viewWillAppear:animated];
if (@available(iOS 11.0, *)) {
[self.tableView setContentOffset:CGPointZero animated:NO];
} else {
CGPoint contentOffset = CGPointMake(0, _tableView.tableHeaderView.bounds.size.height); CGPoint contentOffset = CGPointMake(0, _tableView.tableHeaderView.bounds.size.height);
[self.tableView setContentOffset:contentOffset animated:NO]; [self.tableView setContentOffset:contentOffset animated:NO];
}
} }
- (void)viewDidAppear:(BOOL)animated - (void)viewDidAppear:(BOOL)animated
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment