Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
VideoLAN
VLC-iOS
Commits
679c264a
Commit
679c264a
authored
Mar 20, 2018
by
Pierre SAGASPE
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
VLCLocalNetworkListViewController : add activity indicator when tableview loading
parent
049c090e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
Sources/LocalNetworkConnectivity/VLCNetworkListViewController.m
...s/LocalNetworkConnectivity/VLCNetworkListViewController.m
+11
-0
No files found.
Sources/LocalNetworkConnectivity/VLCNetworkListViewController.m
View file @
679c264a
...
...
@@ -20,6 +20,7 @@ NSString *VLCNetworkListCellIdentifier = @"VLCNetworkListCellIdentifier";
{
NSMutableArray
*
_searchData
;
UITapGestureRecognizer
*
_tapTwiceGestureRecognizer
;
UIActivityIndicatorView
*
_activityIndicator
;
}
@end
...
...
@@ -46,6 +47,13 @@ NSString *VLCNetworkListCellIdentifier = @"VLCNetworkListCellIdentifier";
_tableView
.
separatorStyle
=
UITableViewCellSeparatorStyleNone
;
_tableView
.
indicatorStyle
=
UIScrollViewIndicatorStyleWhite
;
self
.
view
=
_tableView
;
_activityIndicator
=
[[
UIActivityIndicatorView
alloc
]
initWithActivityIndicatorStyle
:
UIActivityIndicatorViewStyleWhiteLarge
];
_activityIndicator
.
center
=
_tableView
.
center
;
_activityIndicator
.
autoresizingMask
=
UIViewAutoresizingFlexibleBottomMargin
|
UIViewAutoresizingFlexibleLeftMargin
|
UIViewAutoresizingFlexibleRightMargin
|
UIViewAutoresizingFlexibleTopMargin
;
_activityIndicator
.
hidesWhenStopped
=
YES
;
[
_activityIndicator
startAnimating
];
[
self
.
view
addSubview
:
_activityIndicator
];
}
-
(
void
)
viewDidLoad
...
...
@@ -156,6 +164,9 @@ NSString *VLCNetworkListCellIdentifier = @"VLCNetworkListCellIdentifier";
{
UIColor
*
color
=
(
indexPath
.
row
%
2
==
0
)?
[
UIColor
blackColor
]:
[
UIColor
VLCDarkBackgroundColor
];
cell
.
backgroundColor
=
cell
.
titleLabel
.
backgroundColor
=
cell
.
folderTitleLabel
.
backgroundColor
=
cell
.
subtitleLabel
.
backgroundColor
=
color
;
if
([
indexPath
row
]
==
((
NSIndexPath
*
)[[
tableView
indexPathsForVisibleRows
]
lastObject
]).
row
)
[
_activityIndicator
stopAnimating
];
}
#pragma mark - Search Controller Delegate
...
...
Pierre SAGASPE
@Pierre
mentioned in commit
fd3eccb7
·
Mar 22, 2018
mentioned in commit
fd3eccb7
mentioned in commit fd3eccb7008af9ce8fe1e1d8e60ce8d615db73ff
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment