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
13bf28e9
Commit
13bf28e9
authored
Jun 16, 2013
by
Romain Goyet
Committed by
Felix Paul Kühne
Jun 17, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Factorisate the display of a ViewController from the menu
Signed-off-by:
Felix Paul Kühne
<
fkuehne@videolan.org
>
parent
2225db4f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
9 deletions
+15
-9
AspenProject/VLCMenuViewController.m
AspenProject/VLCMenuViewController.m
+14
-8
AspenProject/VLCPlaylistViewController.m
AspenProject/VLCPlaylistViewController.m
+1
-1
No files found.
AspenProject/VLCMenuViewController.m
View file @
13bf28e9
...
...
@@ -31,6 +31,7 @@
VLCHTTPDownloadViewController
*
_downloadViewController
;
Reachability
*
_reachability
;
}
-
(
void
)
_presentViewController
:(
UIViewController
*
)
viewController
;
@end
@implementation
VLCMenuViewController
...
...
@@ -123,14 +124,7 @@
-
(
IBAction
)
openAboutPanel
:(
id
)
sender
{
UIViewController
*
aboutController
=
[[
VLCAboutViewController
alloc
]
initWithNibName
:
nil
bundle
:
nil
];
if
(
UI_USER_INTERFACE_IDIOM
()
==
UIUserInterfaceIdiomPad
)
{
UINavigationController
*
navController
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
aboutController
];
[
navController
loadTheme
];
[
self
presentModalViewController
:
navController
animated
:
YES
];
}
else
{
[
self
.
navigationController
pushViewController
:
aboutController
animated
:
YES
];
}
[
self
_presentViewController
:
aboutController
];
}
-
(
IBAction
)
openNetworkStream
:(
id
)
sender
...
...
@@ -218,4 +212,16 @@
[
self
presentModalViewController
:
navController
animated
:
YES
];
}
#pragma mark - Private methods
-
(
void
)
_presentViewController
:(
UIViewController
*
)
viewController
{
if
(
UI_USER_INTERFACE_IDIOM
()
==
UIUserInterfaceIdiomPad
)
{
UINavigationController
*
navController
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
viewController
];
[
navController
loadTheme
];
[
self
presentModalViewController
:
navController
animated
:
YES
];
}
else
{
[
self
.
navigationController
pushViewController
:
viewController
animated
:
YES
];
}
}
@end
AspenProject/VLCPlaylistViewController.m
View file @
13bf28e9
...
...
@@ -298,7 +298,7 @@
if
(
self
.
menuViewController
==
nil
)
{
VLCMenuViewController
*
menuViewController
=
[[
VLCMenuViewController
alloc
]
initWithNibName
:
nil
bundle
:
nil
];
UINavigationController
*
navigationController
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
menuViewController
];
[
navigationController
loadTheme
]
,
[
navigationController
loadTheme
]
;
self
.
menuViewController
=
navigationController
;
if
(
UI_USER_INTERFACE_IDIOM
()
==
UIUserInterfaceIdiomPad
)
navigationController
.
navigationBarHidden
=
YES
;
...
...
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