Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
VideoLAN
VLC-iOS
Commits
661813b7
Commit
661813b7
authored
Aug 11, 2013
by
Felix Paul Kühne
Browse files
UPNP server list: show icon provided by server
parent
92e6ef08
Changes
3
Hide whitespace changes
Inline
Side-by-side
AspenProject/VLCLocalNetworkListCell.h
View file @
661813b7
...
...
@@ -20,6 +20,7 @@
@property
(
nonatomic
,
readwrite
)
BOOL
isDirectory
;
@property
(
nonatomic
,
retain
)
NSString
*
title
;
@property
(
nonatomic
,
retain
)
NSString
*
subtitle
;
@property
(
nonatomic
,
retain
)
UIImage
*
icon
;
+
(
VLCLocalNetworkListCell
*
)
cellWithReuseIdentifier
:(
NSString
*
)
ident
;
+
(
CGFloat
)
heightOfCell
;
...
...
AspenProject/VLCLocalNetworkListCell.m
View file @
661813b7
...
...
@@ -26,6 +26,7 @@
{
self
.
titleLabel
.
text
=
@""
;
self
.
subtitleLabel
.
text
=
@""
;
self
.
thumbnailView
.
contentMode
=
UIViewContentModeScaleAspectFit
;
}
-
(
void
)
setTitle
:(
NSString
*
)
title
...
...
@@ -45,6 +46,11 @@
self
.
subtitleLabel
.
text
=
subtitle
;
}
-
(
void
)
setIcon
:(
UIImage
*
)
icon
{
self
.
thumbnailView
.
image
=
icon
;
}
+
(
CGFloat
)
heightOfCell
{
if
([[
UIDevice
currentDevice
]
userInterfaceIdiom
]
==
UIUserInterfaceIdiomPad
)
...
...
AspenProject/VLCLocalServerListViewController.m
View file @
661813b7
...
...
@@ -96,6 +96,9 @@
BasicUPnPDevice
*
device
=
_devices
[
indexPath
.
row
];
[
cell
setTitle
:[
device
friendlyName
]];
UIImage
*
icon
=
[
device
smallIcon
];
if
(
icon
)
[
cell
setIcon
:
icon
];
if
([[
device
urn
]
isEqualToString
:
@"urn:schemas-upnp-org:device:MediaServer:1"
])
[
cell
setIsDirectory
:
YES
];
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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