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
c37f5796
Commit
c37f5796
authored
Jun 09, 2013
by
Felix Paul Kühne
Browse files
Dropbox: adapt table view appearance to match the library
parent
3635dbd4
Changes
2
Hide whitespace changes
Inline
Side-by-side
AspenProject/VLCDropboxTableViewCell.m
View file @
c37f5796
...
...
@@ -16,13 +16,6 @@
NSAssert
([
nibContentArray
count
]
==
1
,
@"meh"
);
NSAssert
([[
nibContentArray
lastObject
]
isKindOfClass
:[
VLCDropboxTableViewCell
class
]],
@"meh meh"
);
VLCDropboxTableViewCell
*
cell
=
(
VLCDropboxTableViewCell
*
)[
nibContentArray
lastObject
];
CGRect
frame
=
[
cell
frame
];
UIView
*
background
=
[[
UIView
alloc
]
initWithFrame
:
frame
];
background
.
backgroundColor
=
[
UIColor
colorWithWhite
:.
05
alpha
:
1
.];
cell
.
backgroundView
=
background
;
UIView
*
highlightedBackground
=
[[
UIView
alloc
]
initWithFrame
:
frame
];
highlightedBackground
.
backgroundColor
=
[
UIColor
colorWithWhite
:.
2
alpha
:
1
.];
cell
.
selectedBackgroundView
=
highlightedBackground
;
return
cell
;
}
...
...
AspenProject/VLCDropboxTableViewController.m
View file @
c37f5796
...
...
@@ -65,7 +65,8 @@
self
.
navigationItem
.
titleView
.
contentMode
=
UIViewContentModeScaleAspectFit
;
self
.
tableView
.
rowHeight
=
[
VLCDropboxTableViewCell
heightOfCell
];
self
.
tableView
.
separatorColor
=
[
UIColor
colorWithWhite
:.
2
alpha
:
1
.];
self
.
tableView
.
separatorColor
=
[
UIColor
colorWithWhite
:.
122
alpha
:
1
.];
self
.
view
.
backgroundColor
=
[
UIColor
colorWithWhite
:.
122
alpha
:
1
.];
_numberOfFilesBarButtonItem
=
[[
UIBarButtonItem
alloc
]
initWithTitle
:[
NSString
stringWithFormat
:
NSLocalizedString
(
@"NUM_OF_FILES"
,
@""
),
0
]
style
:
UIBarButtonItemStylePlain
target
:
nil
action
:
nil
];
[
_numberOfFilesBarButtonItem
setTitleTextAttributes
:@{
UITextAttributeFont
:
[
UIFont
systemFontOfSize
:
11
.]
}
forState
:
UIControlStateNormal
];
...
...
@@ -160,6 +161,11 @@
#pragma mark - Table view delegate
-
(
void
)
tableView
:(
UITableView
*
)
tableView
willDisplayCell
:(
UITableViewCell
*
)
cell
forRowAtIndexPath
:(
NSIndexPath
*
)
indexPath
{
cell
.
backgroundColor
=
(
indexPath
.
row
%
2
==
0
)?
[
UIColor
blackColor
]:
[
UIColor
colorWithWhite
:.
122
alpha
:
1
.];
}
-
(
void
)
tableView
:(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:(
NSIndexPath
*
)
indexPath
{
DBMetadata
*
selectedFile
=
_dropboxController
.
currentListFiles
[
indexPath
.
row
];
...
...
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