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

NetworkListView: fix the tableview offset when navigate in ios 11

parent 52e0eeb8
......@@ -2,7 +2,7 @@
* VLCLocalNetworkListViewController
* VLC for iOS
*****************************************************************************
* Copyright (c) 2013-2017 VideoLAN. All rights reserved.
* Copyright (c) 2013-2018 VideoLAN. All rights reserved.
* $Id$
*
* Authors: Felix Paul Kühne <fkuehne # videolan.org>
......@@ -81,8 +81,12 @@ NSString *VLCNetworkListCellIdentifier = @"VLCNetworkListCellIdentifier";
- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
CGPoint contentOffset = CGPointMake(0, _tableView.tableHeaderView.bounds.size.height);
[self.tableView setContentOffset:contentOffset animated:NO];
if (@available(iOS 11.0, *)) {
[self.tableView setContentOffset:CGPointZero animated:NO];
} else {
CGPoint contentOffset = CGPointMake(0, _tableView.tableHeaderView.bounds.size.height);
[self.tableView setContentOffset:contentOffset animated:NO];
}
}
- (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