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
bf82348f
Commit
bf82348f
authored
Mar 15, 2014
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
library: add a visual indicator for folders and TV shows (iOS 7 only for now)
parent
2d94a16e
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
34 additions
and
4 deletions
+34
-4
Resources/VLCFuturePlaylistCollectionViewCell.xib
Resources/VLCFuturePlaylistCollectionViewCell.xib
+9
-3
Resources/VLCFuturePlaylistTableViewCell.xib
Resources/VLCFuturePlaylistTableViewCell.xib
+7
-1
Sources/VLCPlaylistCollectionViewCell.h
Sources/VLCPlaylistCollectionViewCell.h
+1
-0
Sources/VLCPlaylistCollectionViewCell.m
Sources/VLCPlaylistCollectionViewCell.m
+8
-0
Sources/VLCPlaylistTableViewCell.h
Sources/VLCPlaylistTableViewCell.h
+1
-0
Sources/VLCPlaylistTableViewCell.m
Sources/VLCPlaylistTableViewCell.m
+8
-0
No files found.
Resources/VLCFuturePlaylistCollectionViewCell.xib
View file @
bf82348f
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB"
version=
"3.0"
toolsVersion=
"
4514
"
systemVersion=
"12F45"
targetRuntime=
"iOS.CocoaTouch.iPad"
propertyAccessControl=
"none"
>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB"
version=
"3.0"
toolsVersion=
"
5053
"
systemVersion=
"12F45"
targetRuntime=
"iOS.CocoaTouch.iPad"
propertyAccessControl=
"none"
>
<dependencies>
<deployment
version=
"1792"
defaultVersion=
"1552"
identifier=
"iOS"
/>
<development
version=
"5000"
identifier=
"xcode"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"37
47
"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"37
33
"
/>
</dependencies>
<objects>
<placeholder
placeholderIdentifier=
"IBFilesOwner"
id=
"-1"
userLabel=
"File's Owner"
/>
...
...
@@ -20,6 +20,10 @@
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
heightSizable=
"YES"
/>
<color
key=
"backgroundColor"
red=
"0.0"
green=
"0.0"
blue=
"0.0"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
</imageView>
<imageView
hidden=
"YES"
clipsSubviews=
"YES"
userInteractionEnabled=
"NO"
contentMode=
"center"
image=
"folderIcon.png"
id=
"0uT-W6-UMC"
>
<rect
key=
"frame"
x=
"0.0"
y=
"85"
width=
"341"
height=
"190"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
heightSizable=
"YES"
/>
</imageView>
<imageView
opaque=
"NO"
clearsContextBeforeDrawing=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"scaleToFill"
image=
"gradient-cell-ios7-ipad.png"
id=
"Gzk-gj-0jk"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"341"
height=
"190"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
heightSizable=
"YES"
/>
...
...
@@ -57,6 +61,7 @@
</view>
<size
key=
"customSize"
width=
"298"
height=
"167"
/>
<connections>
<outlet
property=
"folderIconView"
destination=
"0uT-W6-UMC"
id=
"coZ-4M-nCp"
/>
<outlet
property=
"isSelectedView"
destination=
"pl6-iw-2ZI"
id=
"1sX-gh-yiU"
/>
<outlet
property=
"mediaIsUnreadView"
destination=
"ftR-Og-FOs"
id=
"5aH-vE-E37"
/>
<outlet
property=
"subtitleLabel"
destination=
"jdp-lJ-hIF"
id=
"YUa-G7-CMl"
/>
...
...
@@ -67,6 +72,7 @@
</objects>
<resources>
<image
name=
"checkboxEmpty.png"
width=
"25"
height=
"25"
/>
<image
name=
"folderIcon.png"
width=
"221"
height=
"205"
/>
<image
name=
"gradient-cell-ios7-ipad.png"
width=
"2"
height=
"190"
/>
</resources>
</document>
\ No newline at end of file
</document>
Resources/VLCFuturePlaylistTableViewCell.xib
View file @
bf82348f
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"50
37.
3"
systemVersion=
"12F45"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"50
5
3"
systemVersion=
"12F45"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
>
<dependencies>
<deployment
version=
"1792"
defaultVersion=
"1552"
identifier=
"iOS"
/>
<development
version=
"5000"
identifier=
"xcode"
/>
...
...
@@ -20,6 +20,10 @@
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
heightSizable=
"YES"
/>
<color
key=
"backgroundColor"
red=
"0.0"
green=
"0.0"
blue=
"0.0"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
</imageView>
<imageView
hidden=
"YES"
clipsSubviews=
"YES"
userInteractionEnabled=
"NO"
contentMode=
"top"
image=
"folderIcon.png"
id=
"5iA-hI-rrr"
>
<rect
key=
"frame"
x=
"0.0"
y=
"35"
width=
"320"
height=
"55"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
heightSizable=
"YES"
/>
</imageView>
<imageView
userInteractionEnabled=
"NO"
contentMode=
"scaleToFill"
image=
"gradient-cell-ios7.png"
id=
"22"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"320"
height=
"90"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
heightSizable=
"YES"
/>
...
...
@@ -52,6 +56,7 @@
</tableViewCellContentView>
<color
key=
"backgroundColor"
white=
"0.12"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<connections>
<outlet
property=
"folderIconView"
destination=
"5iA-hI-rrr"
id=
"K2w-2u-dEl"
/>
<outlet
property=
"mediaIsUnreadView"
destination=
"sYw-l2-Tmv"
id=
"us6-sJ-NVp"
/>
<outlet
property=
"subtitleLabel"
destination=
"7"
id=
"8"
/>
<outlet
property=
"thumbnailView"
destination=
"4"
id=
"9"
/>
...
...
@@ -60,6 +65,7 @@
</tableViewCell>
</objects>
<resources>
<image
name=
"folderIcon.png"
width=
"120"
height=
"112"
/>
<image
name=
"gradient-cell-ios7.png"
width=
"2"
height=
"92"
/>
</resources>
</document>
Sources/VLCPlaylistCollectionViewCell.h
View file @
bf82348f
...
...
@@ -23,6 +23,7 @@
@property
(
nonatomic
,
strong
)
IBOutlet
VLCLinearProgressIndicator
*
progressView
;
@property
(
nonatomic
,
strong
)
IBOutlet
UIView
*
mediaIsUnreadView
;
@property
(
nonatomic
,
strong
)
IBOutlet
UIImageView
*
isSelectedView
;
@property
(
nonatomic
,
strong
)
IBOutlet
UIImageView
*
folderIconView
;
@property
(
nonatomic
,
retain
)
MLFile
*
mediaObject
;
...
...
Sources/VLCPlaylistCollectionViewCell.m
View file @
bf82348f
...
...
@@ -224,6 +224,8 @@
self
.
subtitleLabel
.
text
=
[
string
stringByAppendingString
:[
NSString
stringWithFormat
:(
count
>
1
)
?
NSLocalizedString
(
@"LIBRARY_EPISODES"
,
@""
)
:
NSLocalizedString
(
@"LIBRARY_SINGLE_EPISODE"
,
@""
),
count
,
show
.
unreadEpisodes
.
count
]];
self
.
mediaIsUnreadView
.
hidden
=
YES
;
self
.
progressView
.
hidden
=
YES
;
self
.
folderIconView
.
image
=
[
UIImage
imageNamed
:
@"PlayingExternally"
];
self
.
folderIconView
.
hidden
=
NO
;
}
-
(
void
)
_configureForAlbumTrack
:(
MLAlbumTrack
*
)
albumTrack
...
...
@@ -234,6 +236,7 @@
self
.
titleLabel
.
text
=
albumTrack
.
title
;
[
self
_showPositionOfItem
:
anyFileFromTrack
];
self
.
folderIconView
.
hidden
=
YES
;
}
-
(
void
)
_configureForShowEpisode
:(
MLShowEpisode
*
)
showEpisode
...
...
@@ -247,6 +250,7 @@
}
else
self
.
subtitleLabel
.
text
=
[
NSString
stringWithFormat
:
@"S%02dE%02d — %@"
,
showEpisode
.
seasonNumber
.
intValue
,
showEpisode
.
episodeNumber
.
intValue
,
[
VLCTime
timeWithNumber
:[
anyFileFromEpisode
duration
]]];
[
self
_showPositionOfItem
:
anyFileFromEpisode
];
self
.
folderIconView
.
hidden
=
YES
;
}
-
(
void
)
_configureForAlbum
:(
MLAlbum
*
)
album
...
...
@@ -265,6 +269,7 @@
self
.
subtitleLabel
.
text
=
string
;
self
.
mediaIsUnreadView
.
hidden
=
YES
;
self
.
progressView
.
hidden
=
YES
;
self
.
folderIconView
.
hidden
=
YES
;
}
-
(
void
)
_configureForFolder
:(
MLLabel
*
)
label
...
...
@@ -274,6 +279,8 @@
self
.
subtitleLabel
.
text
=
[
NSString
stringWithFormat
:(
count
==
1
)
?
NSLocalizedString
(
@"LIBRARY_SINGLE_TRACK"
,
@""
)
:
NSLocalizedString
(
@"LIBRARY_TRACKS"
,
@""
),
count
];
self
.
mediaIsUnreadView
.
hidden
=
YES
;
self
.
progressView
.
hidden
=
YES
;
self
.
folderIconView
.
image
=
[
UIImage
imageNamed
:
@"folderIcon"
];
self
.
folderIconView
.
hidden
=
NO
;
}
-
(
void
)
_configureForMLFile
:(
MLFile
*
)
mediaFile
...
...
@@ -302,6 +309,7 @@
}
}
[
self
_showPositionOfItem
:
mediaFile
];
self
.
folderIconView
.
hidden
=
YES
;
}
-
(
void
)
_showPositionOfItem
:(
MLFile
*
)
mediaItem
...
...
Sources/VLCPlaylistTableViewCell.h
View file @
bf82348f
...
...
@@ -21,6 +21,7 @@
@property
(
nonatomic
,
strong
)
IBOutlet
UIImageView
*
thumbnailView
;
@property
(
nonatomic
,
strong
)
IBOutlet
VLCLinearProgressIndicator
*
progressIndicator
;
@property
(
nonatomic
,
strong
)
IBOutlet
UIView
*
mediaIsUnreadView
;
@property
(
nonatomic
,
strong
)
IBOutlet
UIImageView
*
folderIconView
;
@property
(
nonatomic
,
strong
)
NSManagedObject
*
mediaObject
;
...
...
Sources/VLCPlaylistTableViewCell.m
View file @
bf82348f
...
...
@@ -209,6 +209,8 @@
self
.
subtitleLabel
.
text
=
[
string
stringByAppendingString
:[
NSString
stringWithFormat
:(
count
>
1
)
?
NSLocalizedString
(
@"LIBRARY_EPISODES"
,
@""
)
:
NSLocalizedString
(
@"LIBRARY_SINGLE_EPISODE"
,
@""
),
count
,
show
.
unreadEpisodes
.
count
]];
self
.
mediaIsUnreadView
.
hidden
=
YES
;
self
.
progressIndicator
.
hidden
=
YES
;
self
.
folderIconView
.
image
=
[
UIImage
imageNamed
:
@"PlayingExternally"
];
self
.
folderIconView
.
hidden
=
NO
;
}
-
(
void
)
_configureForAlbumTrack
:(
MLAlbumTrack
*
)
albumTrack
...
...
@@ -217,6 +219,7 @@
self
.
subtitleLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@ — %@ — %@"
,
albumTrack
.
artist
,
[
NSString
stringWithFormat
:
NSLocalizedString
(
@"LIBRARY_TRACK_N"
,
@""
),
albumTrack
.
trackNumber
.
intValue
],
[
VLCTime
timeWithNumber
:[
anyFileFromTrack
duration
]]];
self
.
titleLabel
.
text
=
albumTrack
.
title
;
[
self
_showPositionOfItem
:
anyFileFromTrack
];
self
.
folderIconView
.
hidden
=
YES
;
}
-
(
void
)
_configureForShowEpisode
:(
MLShowEpisode
*
)
showEpisode
...
...
@@ -231,6 +234,7 @@
self
.
subtitleLabel
.
text
=
[
NSString
stringWithFormat
:
@"S%02dE%02d — %@"
,
showEpisode
.
seasonNumber
.
intValue
,
showEpisode
.
episodeNumber
.
intValue
,
[
VLCTime
timeWithNumber
:[
anyFileFromEpisode
duration
]]];
[
self
_showPositionOfItem
:
anyFileFromEpisode
];
self
.
folderIconView
.
hidden
=
YES
;
}
-
(
void
)
_configureForAlbum
:(
MLAlbum
*
)
album
...
...
@@ -249,6 +253,7 @@
self
.
subtitleLabel
.
text
=
string
;
self
.
mediaIsUnreadView
.
hidden
=
YES
;
self
.
progressIndicator
.
hidden
=
YES
;
self
.
folderIconView
.
hidden
=
YES
;
}
-
(
void
)
_configureForFolder
:(
MLLabel
*
)
label
...
...
@@ -258,6 +263,8 @@
self
.
subtitleLabel
.
text
=
[
NSString
stringWithFormat
:(
count
==
1
)
?
NSLocalizedString
(
@"LIBRARY_SINGLE_TRACK"
,
@""
)
:
NSLocalizedString
(
@"LIBRARY_TRACKS"
,
@""
),
count
];
self
.
mediaIsUnreadView
.
hidden
=
YES
;
self
.
progressIndicator
.
hidden
=
YES
;
self
.
folderIconView
.
image
=
[
UIImage
imageNamed
:
@"folderIcon"
];
self
.
folderIconView
.
hidden
=
NO
;
}
-
(
void
)
_configureForMLFile
:(
MLFile
*
)
mediaFile
...
...
@@ -284,6 +291,7 @@
}
}
[
self
_showPositionOfItem
:
mediaFile
];
self
.
folderIconView
.
hidden
=
YES
;
}
-
(
void
)
_showPositionOfItem
:(
MLFile
*
)
mediaItem
...
...
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