Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
VideoLAN
VLC-iOS
Commits
bd646850
Commit
bd646850
authored
Jun 14, 2013
by
Romain Goyet
Committed by
Felix Paul Kühne
Jun 14, 2013
Browse files
Menu: Leverage using a UINavigationController
Signed-off-by:
Felix Paul Kühne
<
fkuehne@videolan.org
>
parent
32b45d2d
Changes
2
Hide whitespace changes
Inline
Side-by-side
AspenProject/VLCAboutViewController.m
View file @
bd646850
...
...
@@ -36,7 +36,8 @@
[
dismissButton
setBackgroundImage
:[
UIImage
imageNamed
:
@"doneButton"
]
forState
:
UIControlStateNormal
barMetrics
:
UIBarMetricsDefault
];
[
dismissButton
setBackgroundImage
:[
UIImage
imageNamed
:
@"doneButtonHighlight"
]
forState
:
UIControlStateHighlighted
barMetrics
:
UIBarMetricsDefault
];
[
dismissButton
setTitleTextAttributes
:@{
UITextAttributeTextShadowColor
:
[
UIColor
whiteColor
],
UITextAttributeTextColor
:
[
UIColor
blackColor
]}
forState
:
UIControlStateNormal
];
self
.
navigationItem
.
rightBarButtonItem
=
dismissButton
;
if
(
UI_USER_INTERFACE_IDIOM
()
==
UIUserInterfaceIdiomPad
)
self
.
navigationItem
.
rightBarButtonItem
=
dismissButton
;
}
-
(
BOOL
)
webView
:(
UIWebView
*
)
webView
shouldStartLoadWithRequest
:(
NSURLRequest
*
)
request
navigationType
:(
UIWebViewNavigationType
)
navigationType
...
...
AspenProject/VLCMenuViewController.m
View file @
bd646850
...
...
@@ -117,13 +117,14 @@
{
UIViewController
*
aboutController
=
[[
VLCAboutViewController
alloc
]
initWithNibName
:
nil
bundle
:
nil
];
UINavigationController
*
navController
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
aboutController
];
navController
.
navigationBar
.
barStyle
=
UIBarStyleBlack
;
[
navController
.
navigationBar
setBackgroundImage
:[
UIImage
imageNamed
:
@"navBarBackground"
]
forBarMetrics
:
UIBarMetricsDefault
];
if
(
UI_USER_INTERFACE_IDIOM
()
==
UIUserInterfaceIdiomPhone
)
[
navController
.
navigationBar
setBackgroundImage
:[
UIImage
imageNamed
:
@"navBarBackgroundPhoneLandscape"
]
forBarMetrics
:
UIBarMetricsLandscapePhone
];
[
self
presentModalViewController
:
navController
animated
:
YES
];
if
(
UI_USER_INTERFACE_IDIOM
()
==
UIUserInterfaceIdiomPad
)
{
UINavigationController
*
navController
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
aboutController
];
navController
.
navigationBar
.
barStyle
=
UIBarStyleBlack
;
[
navController
.
navigationBar
setBackgroundImage
:[
UIImage
imageNamed
:
@"navBarBackground"
]
forBarMetrics
:
UIBarMetricsDefault
];
[
self
presentModalViewController
:
navController
animated
:
YES
];
}
else
{
[
self
.
navigationController
pushViewController
:
aboutController
animated
:
YES
];
}
}
-
(
IBAction
)
openNetworkStream
:(
id
)
sender
...
...
Write
Preview
Supports
Markdown
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