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
21c38b36
Commit
21c38b36
authored
Jul 21, 2013
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Dropbox: fix stack navigation (close #8993)
parent
7152f614
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
3 deletions
+16
-3
AspenProject/VLCDropboxTableViewController.m
AspenProject/VLCDropboxTableViewController.m
+16
-3
No files found.
AspenProject/VLCDropboxTableViewController.m
View file @
21c38b36
...
...
@@ -21,6 +21,8 @@
VLCDropboxController
*
_dropboxController
;
NSString
*
_currentPath
;
UIBarButtonItem
*
_backButton
;
UIBarButtonItem
*
_numberOfFilesBarButtonItem
;
UIBarButtonItem
*
_progressBarButtonItem
;
UIBarButtonItem
*
_downloadingBarLabel
;
...
...
@@ -48,6 +50,11 @@
self
.
navigationItem
.
titleView
=
[[
UIImageView
alloc
]
initWithImage
:[
UIImage
imageNamed
:
@"dropbox-white"
]];
self
.
navigationItem
.
titleView
.
contentMode
=
UIViewContentModeScaleAspectFit
;
_backButton
=
[[
UIBarButtonItem
alloc
]
initWithTitle
:
@"Back"
style
:
UIBarButtonItemStyleBordered
target
:
self
action
:
@selector
(
goBack
:
)];
[
_backButton
setBackgroundImage
:[
UIImage
imageNamed
:
@"backButton"
]
forState
:
UIControlStateNormal
barMetrics
:
UIBarMetricsDefault
];
[
_backButton
setBackgroundImage
:[
UIImage
imageNamed
:
@"backButtonHighlight"
]
forState
:
UIControlStateHighlighted
barMetrics
:
UIBarMetricsDefault
];
self
.
navigationItem
.
leftBarButtonItem
=
_backButton
;
self
.
tableView
.
rowHeight
=
[
VLCDropboxTableViewCell
heightOfCell
];
self
.
tableView
.
separatorColor
=
[
UIColor
colorWithWhite
:.
122
alpha
:
1
.];
self
.
view
.
backgroundColor
=
[
UIColor
colorWithWhite
:.
122
alpha
:
1
.];
...
...
@@ -105,12 +112,18 @@
{
[
_activityIndicator
startAnimating
];
[
_dropboxController
requestDirectoryListingAtPath
:
_currentPath
];
if
(
UI_USER_INTERFACE_IDIOM
()
==
UIUserInterfaceIdiomPad
)
_backButton
.
enabled
=
!
[
_currentPath
isEqualToString
:
@"/"
];
}
-
(
IBAction
)
folderUp
:(
id
)
sender
-
(
IBAction
)
goBack
:(
id
)
sender
{
_currentPath
=
[
_currentPath
stringByDeletingLastPathComponent
];
[
self
_requestInformationForCurrentPath
];
if
(
!
[
_currentPath
isEqualToString
:
@"/"
])
{
_currentPath
=
[
_currentPath
stringByDeletingLastPathComponent
];
[
self
_requestInformationForCurrentPath
];
}
else
[
self
.
navigationController
popViewControllerAnimated
:
YES
];
}
#pragma mark - Table view data source
...
...
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