Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
VideoLAN
VLC-iOS
Commits
e6d8dc63
Commit
e6d8dc63
authored
Jun 07, 2013
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Library View: implement alternating background color for the phone factor
parent
df0a7920
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
61 additions
and
6 deletions
+61
-6
AspenProject/VLCPlaylistTableViewCell.h
AspenProject/VLCPlaylistTableViewCell.h
+3
-0
AspenProject/VLCPlaylistTableViewCell.m
AspenProject/VLCPlaylistTableViewCell.m
+14
-0
AspenProject/VLCPlaylistViewController.m
AspenProject/VLCPlaylistViewController.m
+3
-1
Resources/VLCPlaylistTableViewCell.xib
Resources/VLCPlaylistTableViewCell.xib
+41
-5
No files found.
AspenProject/VLCPlaylistTableViewCell.h
View file @
e6d8dc63
...
...
@@ -16,9 +16,12 @@
@property
(
nonatomic
,
strong
)
IBOutlet
UIImageView
*
thumbnailView
;
@property
(
nonatomic
,
strong
)
IBOutlet
VLCLinearProgressIndicator
*
progressIndicator
;
@property
(
nonatomic
,
strong
)
IBOutlet
UIImageView
*
mediaIsUnreadView
;
@property
(
nonatomic
,
strong
)
IBOutlet
UIView
*
alternatingColorView
;
@property
(
nonatomic
,
retain
)
MLFile
*
mediaObject
;
@property
(
nonatomic
)
BOOL
isEven
;
+
(
VLCPlaylistTableViewCell
*
)
cellWithReuseIdentifier
:(
NSString
*
)
ident
;
+
(
CGFloat
)
heightOfCell
;
...
...
AspenProject/VLCPlaylistTableViewCell.m
View file @
e6d8dc63
...
...
@@ -8,6 +8,11 @@
#import "VLCPlaylistTableViewCell.h"
@interface
VLCPlaylistTableViewCell
()
{
}
@end
@implementation
VLCPlaylistTableViewCell
+
(
VLCPlaylistTableViewCell
*
)
cellWithReuseIdentifier
:(
NSString
*
)
ident
...
...
@@ -65,6 +70,15 @@
[
self
setNeedsDisplay
];
}
-
(
void
)
setIsEven
:(
BOOL
)
isEven
{
if
(
isEven
)
self
.
alternatingColorView
.
backgroundColor
=
[
UIColor
blackColor
];
else
self
.
alternatingColorView
.
backgroundColor
=
[
UIColor
colorWithWhite
:.
122
alpha
:
1
.];
[
self
.
alternatingColorView
setNeedsDisplay
];
}
+
(
CGFloat
)
heightOfCell
{
return
80
.;
...
...
AspenProject/VLCPlaylistViewController.m
View file @
e6d8dc63
...
...
@@ -174,7 +174,9 @@
if
(
cell
==
nil
)
cell
=
[
VLCPlaylistTableViewCell
cellWithReuseIdentifier
:
CellIdentifier
];
cell
.
mediaObject
=
_foundMedia
[
indexPath
.
row
];
NSInteger
row
=
indexPath
.
row
;
cell
.
mediaObject
=
_foundMedia
[
row
];
cell
.
isEven
=
(
row
%
2
==
0
);
return
cell
;
}
...
...
Resources/VLCPlaylistTableViewCell.xib
View file @
e6d8dc63
...
...
@@ -41,6 +41,22 @@
<reference
key=
"NSNextResponder"
ref=
"962619467"
/>
<int
key=
"NSvFlags"
>
256
</int>
<array
class=
"NSMutableArray"
key=
"NSSubviews"
>
<object
class=
"IBUIView"
id=
"889586540"
>
<reference
key=
"NSNextResponder"
ref=
"162418872"
/>
<int
key=
"NSvFlags"
>
292
</int>
<string
key=
"NSFrameSize"
>
{320, 79}
</string>
<reference
key=
"NSSuperview"
ref=
"162418872"
/>
<reference
key=
"NSWindow"
/>
<string
key=
"NSReuseIdentifierKey"
>
_NS:9
</string>
<object
class=
"NSColor"
key=
"IBUIBackgroundColor"
>
<int
key=
"NSColorSpace"
>
3
</int>
<bytes
key=
"NSWhite"
>
MQA
</bytes>
<object
class=
"NSColorSpace"
key=
"NSCustomColorSpace"
>
<int
key=
"NSID"
>
2
</int>
</object>
</object>
<string
key=
"targetRuntimeIdentifier"
>
IBCocoaTouchFramework
</string>
</object>
<object
class=
"IBUIImageView"
id=
"784253519"
>
<reference
key=
"NSNextResponder"
ref=
"162418872"
/>
<int
key=
"NSvFlags"
>
292
</int>
...
...
@@ -52,7 +68,7 @@
<bool
key=
"IBUIUserInteractionEnabled"
>
NO
</bool>
<string
key=
"targetRuntimeIdentifier"
>
IBCocoaTouchFramework
</string>
</object>
<object
class=
"IBUIImageView"
id=
"
993470095
"
>
<object
class=
"IBUIImageView"
id=
"
172563179
"
>
<reference
key=
"NSNextResponder"
ref=
"162418872"
/>
<int
key=
"NSvFlags"
>
292
</int>
<string
key=
"NSFrame"
>
{{3, 2}, {129, 75}}
</string>
...
...
@@ -164,7 +180,7 @@
<string
key=
"NSFrameSize"
>
{320, 79}
</string>
<reference
key=
"NSSuperview"
ref=
"962619467"
/>
<reference
key=
"NSWindow"
/>
<reference
key=
"NSNextKeyView"
ref=
"
993470095
"
/>
<reference
key=
"NSNextKeyView"
ref=
"
172563179
"
/>
<string
key=
"NSReuseIdentifierKey"
>
_NS:11
</string>
<reference
key=
"IBUIBackgroundColor"
ref=
"698237866"
/>
<bool
key=
"IBUIOpaque"
>
NO
</bool>
...
...
@@ -231,6 +247,14 @@
</object>
<int
key=
"connectionID"
>
21
</int>
</object>
<object
class=
"IBConnectionRecord"
>
<object
class=
"IBCocoaTouchOutletConnection"
key=
"connection"
>
<string
key=
"label"
>
alternatingColorView
</string>
<reference
key=
"source"
ref=
"962619467"
/>
<reference
key=
"destination"
ref=
"889586540"
/>
</object>
<int
key=
"connectionID"
>
24
</int>
</object>
</array>
<object
class=
"IBMutableOrderedSet"
key=
"objectRecords"
>
<array
key=
"orderedObjects"
>
...
...
@@ -260,7 +284,8 @@
<reference
ref=
"625431089"
/>
<reference
ref=
"442944742"
/>
<reference
ref=
"775158982"
/>
<reference
ref=
"993470095"
/>
<reference
ref=
"172563179"
/>
<reference
ref=
"889586540"
/>
</array>
<reference
key=
"parent"
ref=
"0"
/>
</object>
...
...
@@ -291,7 +316,12 @@
</object>
<object
class=
"IBObjectRecord"
>
<int
key=
"objectID"
>
22
</int>
<reference
key=
"object"
ref=
"993470095"
/>
<reference
key=
"object"
ref=
"172563179"
/>
<reference
key=
"parent"
ref=
"962619467"
/>
</object>
<object
class=
"IBObjectRecord"
>
<int
key=
"objectID"
>
23
</int>
<reference
key=
"object"
ref=
"889586540"
/>
<reference
key=
"parent"
ref=
"962619467"
/>
</object>
</array>
...
...
@@ -304,6 +334,7 @@
<string
key=
"18.IBPluginDependency"
>
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
</string>
<string
key=
"20.IBPluginDependency"
>
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
</string>
<string
key=
"22.IBPluginDependency"
>
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
</string>
<string
key=
"23.IBPluginDependency"
>
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
</string>
<string
key=
"3.CustomClassName"
>
VLCPlaylistTableViewCell
</string>
<string
key=
"3.IBPluginDependency"
>
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
</string>
<string
key=
"4.IBPluginDependency"
>
com.apple.InterfaceBuilder.IBCocoaTouchPlugin
</string>
...
...
@@ -314,7 +345,7 @@
<nil
key=
"activeLocalization"
/>
<dictionary
class=
"NSMutableDictionary"
key=
"localizations"
/>
<nil
key=
"sourceID"
/>
<int
key=
"maxID"
>
2
2
</int>
<int
key=
"maxID"
>
2
4
</int>
</object>
<object
class=
"IBClassDescriber"
key=
"IBDocument.Classes"
>
<array
class=
"NSMutableArray"
key=
"referencedPartialClassDescriptions"
>
...
...
@@ -330,6 +361,7 @@
<string
key=
"className"
>
VLCPlaylistTableViewCell
</string>
<string
key=
"superclassName"
>
UITableViewCell
</string>
<dictionary
class=
"NSMutableDictionary"
key=
"outlets"
>
<string
key=
"alternatingColorView"
>
UIView
</string>
<string
key=
"mediaIsUnreadView"
>
UIImageView
</string>
<string
key=
"progressIndicator"
>
VLCLinearProgressIndicator
</string>
<string
key=
"subtitleLabel"
>
UILabel
</string>
...
...
@@ -337,6 +369,10 @@
<string
key=
"titleLabel"
>
UILabel
</string>
</dictionary>
<dictionary
class=
"NSMutableDictionary"
key=
"toOneOutletInfosByName"
>
<object
class=
"IBToOneOutletInfo"
key=
"alternatingColorView"
>
<string
key=
"name"
>
alternatingColorView
</string>
<string
key=
"candidateClassName"
>
UIView
</string>
</object>
<object
class=
"IBToOneOutletInfo"
key=
"mediaIsUnreadView"
>
<string
key=
"name"
>
mediaIsUnreadView
</string>
<string
key=
"candidateClassName"
>
UIImageView
</string>
...
...
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