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
4864f628
Commit
4864f628
authored
Oct 25, 2013
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
The future is now.
parent
1b69e82f
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
33 additions
and
33 deletions
+33
-33
AspenProject/UIBarButtonItem+Theme.m
AspenProject/UIBarButtonItem+Theme.m
+3
-3
AspenProject/UINavigationController+Theme.m
AspenProject/UINavigationController+Theme.m
+1
-1
AspenProject/VLC for iOS-Prefix.pch
AspenProject/VLC for iOS-Prefix.pch
+2
-2
AspenProject/VLCAboutViewController.m
AspenProject/VLCAboutViewController.m
+1
-1
AspenProject/VLCDownloadViewController.m
AspenProject/VLCDownloadViewController.m
+1
-1
AspenProject/VLCMenuTableViewController.m
AspenProject/VLCMenuTableViewController.m
+1
-1
AspenProject/VLCMovieViewController.m
AspenProject/VLCMovieViewController.m
+3
-3
AspenProject/VLCNetworkLoginViewController.m
AspenProject/VLCNetworkLoginViewController.m
+2
-2
AspenProject/VLCOpenNetworkStreamViewController.m
AspenProject/VLCOpenNetworkStreamViewController.m
+1
-1
AspenProject/VLCPlaylistTableViewCell.m
AspenProject/VLCPlaylistTableViewCell.m
+7
-7
AspenProject/VLCPlaylistViewController.m
AspenProject/VLCPlaylistViewController.m
+9
-9
AspenProject/VLCSlider.m
AspenProject/VLCSlider.m
+2
-2
No files found.
AspenProject/UIBarButtonItem+Theme.m
View file @
4864f628
...
...
@@ -17,7 +17,7 @@
style:
UIBarButtonItemStyleBordered
target:
target
action:
selector
];
if
(
SYSTEM_RUNS_I
N_THE_FUTURE
)
if
(
SYSTEM_RUNS_I
OS7_OR_LATER
)
doneButton
.
tintColor
=
[
UIColor
whiteColor
];
else
{
[
doneButton
setBackgroundImage
:[
UIImage
imageNamed
:
@"doneButton"
]
...
...
@@ -38,7 +38,7 @@
style:
UIBarButtonItemStyleBordered
target:
target
action:
selector
];
if
(
SYSTEM_RUNS_I
N_THE_FUTURE
)
if
(
SYSTEM_RUNS_I
OS7_OR_LATER
)
backButton
.
tintColor
=
[
UIColor
whiteColor
];
else
{
[
backButton
setBackgroundImage
:[[
UIImage
imageNamed
:
@"backButton"
]
resizableImageWithCapInsets
:
UIEdgeInsetsMake
(
0
,
12
,
0
,
6
)]
...
...
@@ -56,7 +56,7 @@
+
(
UIBarButtonItem
*
)
themedRevealMenuButtonWithTarget
:(
id
)
target
andSelector
:(
SEL
)
selector
{
UIBarButtonItem
*
menuButton
=
[[
UIBarButtonItem
alloc
]
initWithImage
:[
UIImage
imageNamed
:
@"menuCone"
]
style
:
UIBarButtonItemStyleBordered
target
:
target
action
:
selector
];
if
(
SYSTEM_RUNS_I
N_THE_FUTURE
)
if
(
SYSTEM_RUNS_I
OS7_OR_LATER
)
menuButton
.
tintColor
=
[
UIColor
whiteColor
];
else
{
[
menuButton
setBackgroundImage
:[
UIImage
imageNamed
:
@"button"
]
forState
:
UIControlStateNormal
barMetrics
:
UIBarMetricsDefault
];
...
...
AspenProject/UINavigationController+Theme.m
View file @
4864f628
...
...
@@ -14,7 +14,7 @@
-
(
void
)
loadTheme
{
UINavigationBar
*
navBar
=
self
.
navigationBar
;
if
(
!
SYSTEM_RUNS_I
N_THE_FUTURE
)
{
if
(
!
SYSTEM_RUNS_I
OS7_OR_LATER
)
{
[
navBar
setBackgroundImage
:[
UIImage
imageNamed
:
@"navBarBackground"
]
forBarMetrics:
UIBarMetricsDefault
];
navBar
.
barStyle
=
UIBarStyleBlack
;
...
...
AspenProject/VLC for iOS-Prefix.pch
View file @
4864f628
...
...
@@ -22,9 +22,9 @@
#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending)
#ifdef __IPHONE_7_0
#define SYSTEM_RUNS_I
N_THE_FUTURE
SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"7.0")
#define SYSTEM_RUNS_I
OS7_OR_LATER
SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"7.0")
#else
#define SYSTEM_RUNS_I
N_THE_FUTURE
NO
#define SYSTEM_RUNS_I
OS7_OR_LATER
NO
#endif
#ifndef NDEBUG
...
...
AspenProject/VLCAboutViewController.m
View file @
4864f628
...
...
@@ -21,7 +21,7 @@
self
.
navigationItem
.
titleView
=
[[
UIImageView
alloc
]
initWithImage
:[
UIImage
imageNamed
:
@"title"
]];
UIBarButtonItem
*
contributeButton
=
[[
UIBarButtonItem
alloc
]
initWithTitle
:
NSLocalizedString
(
@"BUTTON_CONTRIBUTE"
,
@""
)
style
:
UIBarButtonItemStyleBordered
target
:
self
action
:
@selector
(
openContributePage
:
)];
if
(
SYSTEM_RUNS_I
N_THE_FUTURE
)
if
(
SYSTEM_RUNS_I
OS7_OR_LATER
)
contributeButton
.
tintColor
=
[
UIColor
whiteColor
];
else
{
[
contributeButton
setBackgroundImage
:[
UIImage
imageNamed
:
@"button"
]
forState
:
UIControlStateNormal
barMetrics
:
UIBarMetricsDefault
];
...
...
AspenProject/VLCDownloadViewController.m
View file @
4864f628
...
...
@@ -78,7 +78,7 @@
-
(
void
)
viewWillDisappear
:(
BOOL
)
animated
{
if
(
SYSTEM_RUNS_I
N_THE_FUTURE
)
if
(
SYSTEM_RUNS_I
OS7_OR_LATER
)
self
.
navigationController
.
navigationBar
.
translucent
=
YES
;
[
super
viewWillDisappear
:
animated
];
}
...
...
AspenProject/VLCMenuTableViewController.m
View file @
4864f628
...
...
@@ -77,7 +77,7 @@
self
.
view
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
.
0
f
,
0
.
0
f
,
kGHRevealSidebarWidth
,
CGRectGetHeight
(
self
.
view
.
bounds
))];
[
self
.
view
addSubview
:
_tableView
];
if
(
SYSTEM_RUNS_I
N_THE_FUTURE
)
{
if
(
SYSTEM_RUNS_I
OS7_OR_LATER
)
{
UIView
*
brandingBackgroundView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
.
0
f
,
0
.
0
f
,
kGHRevealSidebarWidth
,
64
.
0
f
)];
brandingBackgroundView
.
backgroundColor
=
[
UIColor
colorWithRed
:
0
.
1608
green
:
0
.
1608
blue
:
0
.
1608
alpha
:
1
.
0000
];
[
self
.
view
addSubview
:
brandingBackgroundView
];
...
...
AspenProject/VLCMovieViewController.m
View file @
4864f628
...
...
@@ -199,7 +199,7 @@
[
self
.
aspectRatioButton
setBackgroundImage
:[
UIImage
imageNamed
:
@"ratioButton"
]
forState
:
UIControlStateNormal
];
[
self
.
aspectRatioButton
setBackgroundImage
:[
UIImage
imageNamed
:
@"ratioButtonHighlight"
]
forState
:
UIControlStateHighlighted
];
[
self
.
aspectRatioButton
setImage
:[
UIImage
imageNamed
:
@"ratioIcon"
]
forState
:
UIControlStateNormal
];
if
(
SYSTEM_RUNS_I
N_THE_FUTURE
)
{
if
(
SYSTEM_RUNS_I
OS7_OR_LATER
)
{
self
.
backButton
.
tintColor
=
[
UIColor
colorWithRed
:(
190
.
0
f
/
255
.
0
f
)
green
:(
190
.
0
f
/
255
.
0
f
)
blue
:
(
190
.
0
f
/
255
.
0
f
)
alpha
:
1
.];
self
.
toolbar
.
tintColor
=
[
UIColor
whiteColor
];
self
.
toolbar
.
barTintColor
=
[
UIColor
colorWithWhite
:
0
.
f
alpha
:
1
.
f
];
...
...
@@ -271,7 +271,7 @@
[
self
.
navigationController
setNavigationBarHidden
:
YES
animated
:
YES
];
if
(
!
SYSTEM_RUNS_I
N_THE_FUTURE
)
{
if
(
!
SYSTEM_RUNS_I
OS7_OR_LATER
)
{
if
(
UI_USER_INTERFACE_IDIOM
()
==
UIUserInterfaceIdiomPhone
)
[
UIApplication
sharedApplication
].
statusBarStyle
=
UIStatusBarStyleBlackTranslucent
;
}
...
...
@@ -448,7 +448,7 @@
_idleTimer
=
nil
;
}
[
self
.
navigationController
setNavigationBarHidden
:
NO
animated
:
YES
];
if
(
!
SYSTEM_RUNS_I
N_THE_FUTURE
)
if
(
!
SYSTEM_RUNS_I
OS7_OR_LATER
)
[
UIApplication
sharedApplication
].
statusBarStyle
=
UIStatusBarStyleBlackOpaque
;
[[
UIApplication
sharedApplication
]
setStatusBarHidden
:
NO
withAnimation
:
UIStatusBarAnimationFade
];
[
super
viewWillDisappear
:
animated
];
...
...
AspenProject/VLCNetworkLoginViewController.m
View file @
4864f628
...
...
@@ -74,7 +74,7 @@
-
(
IBAction
)
dismissWithAnimation
:(
id
)
sender
{
if
(
SYSTEM_RUNS_I
N_THE_FUTURE
)
if
(
SYSTEM_RUNS_I
OS7_OR_LATER
)
self
.
navigationController
.
navigationBar
.
translucent
=
YES
;
if
(
UI_USER_INTERFACE_IDIOM
()
==
UIUserInterfaceIdiomPhone
)
...
...
@@ -85,7 +85,7 @@
-
(
IBAction
)
dismiss
:(
id
)
sender
{
if
(
SYSTEM_RUNS_I
N_THE_FUTURE
)
if
(
SYSTEM_RUNS_I
OS7_OR_LATER
)
self
.
navigationController
.
navigationBar
.
translucent
=
YES
;
if
(
UI_USER_INTERFACE_IDIOM
()
==
UIUserInterfaceIdiomPhone
)
...
...
AspenProject/VLCOpenNetworkStreamViewController.m
View file @
4864f628
...
...
@@ -68,7 +68,7 @@
-
(
void
)
viewWillDisappear
:(
BOOL
)
animated
{
if
(
SYSTEM_RUNS_I
N_THE_FUTURE
)
if
(
SYSTEM_RUNS_I
OS7_OR_LATER
)
self
.
navigationController
.
navigationBar
.
translucent
=
YES
;
NSUserDefaults
*
defaults
=
[
NSUserDefaults
standardUserDefaults
];
...
...
AspenProject/VLCPlaylistTableViewCell.m
View file @
4864f628
...
...
@@ -18,7 +18,7 @@
+
(
VLCPlaylistTableViewCell
*
)
cellWithReuseIdentifier
:(
NSString
*
)
ident
{
NSArray
*
nibContentArray
;
if
(
SYSTEM_RUNS_I
N_THE_FUTURE
)
if
(
SYSTEM_RUNS_I
OS7_OR_LATER
)
nibContentArray
=
[[
NSBundle
mainBundle
]
loadNibNamed
:
@"VLCFuturePlaylistTableViewCell"
owner
:
nil
options
:
nil
];
else
nibContentArray
=
[[
NSBundle
mainBundle
]
loadNibNamed
:
@"VLCPlaylistTableViewCell"
owner
:
nil
options
:
nil
];
...
...
@@ -122,7 +122,7 @@
+
(
CGFloat
)
heightOfCell
{
if
(
SYSTEM_RUNS_I
N_THE_FUTURE
)
if
(
SYSTEM_RUNS_I
OS7_OR_LATER
)
return
90
.;
return
80
.;
...
...
@@ -134,7 +134,7 @@
{
self
.
titleLabel
.
text
=
show
.
name
;
NSUInteger
count
=
show
.
episodes
.
count
;
if
(
SYSTEM_RUNS_I
N_THE_FUTURE
)
{
if
(
SYSTEM_RUNS_I
OS7_OR_LATER
)
{
NSString
*
string
=
@""
;
if
(
show
.
releaseYear
)
string
=
[
NSString
stringWithFormat
:
@"%@ — "
,
show
.
releaseYear
];
...
...
@@ -152,7 +152,7 @@
{
MLFile
*
anyFileFromTrack
=
albumTrack
.
files
.
anyObject
;
if
(
SYSTEM_RUNS_I
N_THE_FUTURE
)
if
(
SYSTEM_RUNS_I
OS7_OR_LATER
)
self
.
subtitleLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@ — %@ — %@"
,
albumTrack
.
artist
,
[
NSString
stringWithFormat
:
NSLocalizedString
(
@"LIBRARY_TRACK_N"
,
@""
),
albumTrack
.
trackNumber
.
intValue
],
[
VLCTime
timeWithNumber
:[
anyFileFromTrack
duration
]]];
else
{
self
.
artistNameLabel
.
text
=
albumTrack
.
artist
;
...
...
@@ -184,7 +184,7 @@
self
.
titleLabel
.
text
=
album
.
name
;
MLAlbumTrack
*
anyTrack
=
[
album
.
tracks
anyObject
];
NSUInteger
count
=
album
.
tracks
.
count
;
if
(
SYSTEM_RUNS_I
N_THE_FUTURE
)
{
if
(
SYSTEM_RUNS_I
OS7_OR_LATER
)
{
NSMutableString
*
string
=
[[
NSMutableString
alloc
]
init
];
if
(
anyTrack
)
{
[
string
appendString
:
anyTrack
.
artist
];
...
...
@@ -205,7 +205,7 @@
-
(
void
)
_configureForMLFile
:(
MLFile
*
)
mediaFile
{
if
(
mediaFile
.
isAlbumTrack
)
{
if
(
SYSTEM_RUNS_I
N_THE_FUTURE
)
{
if
(
SYSTEM_RUNS_I
OS7_OR_LATER
)
{
NSString
*
string
=
@""
;
if
(
mediaFile
.
albumTrack
.
artist
)
string
=
[
NSString
stringWithFormat
:
@"%@ — "
,
mediaFile
.
albumTrack
.
artist
];
...
...
@@ -240,7 +240,7 @@
{
CGFloat
position
=
mediaItem
.
lastPosition
.
floatValue
;
if
(
SYSTEM_RUNS_I
N_THE_FUTURE
)
{
if
(
SYSTEM_RUNS_I
OS7_OR_LATER
)
{
CGFloat
duration
=
mediaItem
.
duration
.
floatValue
;
if
(
position
>
.
1
f
&&
position
<
.
95
f
)
{
[(
UITextView
*
)
self
.
mediaIsUnreadView
setText
:[
NSString
stringWithFormat
:
NSLocalizedString
(
@"LIBRARY_MINUTES_LEFT"
,
@""
),
[[
VLCTime
timeWithInt
:(
duration
*
position
-
duration
)]
minuteStringValue
]]];
...
...
AspenProject/VLCPlaylistViewController.m
View file @
4864f628
...
...
@@ -49,7 +49,7 @@
_tableView
.
dataSource
=
self
;
self
.
view
=
_tableView
;
if
(
SYSTEM_RUNS_I
N_THE_FUTURE
)
{
if
(
SYSTEM_RUNS_I
OS7_OR_LATER
)
{
UILongPressGestureRecognizer
*
gestureRecognizer
=
[[
UILongPressGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
tableViewLongTouchGestureAction
:
)];
[
self
.
view
addGestureRecognizer
:
gestureRecognizer
];
}
...
...
@@ -63,7 +63,7 @@
_collectionView
.
dataSource
=
self
;
self
.
view
=
_collectionView
;
if
(
SYSTEM_RUNS_I
N_THE_FUTURE
)
if
(
SYSTEM_RUNS_I
OS7_OR_LATER
)
[
_collectionView
registerNib
:[
UINib
nibWithNibName
:
@"VLCFuturePlaylistCollectionViewCell"
bundle
:
nil
]
forCellWithReuseIdentifier
:
@"PlaylistCell"
];
else
[
_collectionView
registerNib
:[
UINib
nibWithNibName
:
@"VLCPlaylistCollectionViewCell"
bundle
:
nil
]
forCellWithReuseIdentifier
:
@"PlaylistCell"
];
...
...
@@ -101,7 +101,7 @@
self
.
navigationItem
.
leftBarButtonItem
=
_menuButton
;
if
(
SYSTEM_RUNS_I
N_THE_FUTURE
)
if
(
SYSTEM_RUNS_I
OS7_OR_LATER
)
self
.
editButtonItem
.
tintColor
=
[
UIColor
whiteColor
];
else
{
[
self
.
editButtonItem
setBackgroundImage
:[
UIImage
imageNamed
:
@"button"
]
...
...
@@ -144,7 +144,7 @@
[
self
updateViewContents
];
[[
MLMediaLibrary
sharedMediaLibrary
]
performSelector
:
@selector
(
libraryDidAppear
)
withObject
:
nil
afterDelay
:
1
.];
if
(
SYSTEM_RUNS_I
N_THE_FUTURE
)
if
(
SYSTEM_RUNS_I
OS7_OR_LATER
)
[
UIApplication
sharedApplication
].
statusBarStyle
=
UIStatusBarStyleLightContent
;
}
...
...
@@ -382,7 +382,7 @@
-
(
CGSize
)
collectionView
:(
UICollectionView
*
)
collectionView
layout
:(
UICollectionViewLayout
*
)
collectionViewLayout
sizeForItemAtIndexPath
:(
NSIndexPath
*
)
indexPath
{
if
(
SYSTEM_RUNS_I
N_THE_FUTURE
)
if
(
SYSTEM_RUNS_I
OS7_OR_LATER
)
return
CGSizeMake
(
334
.
0
,
191
.
0
);
return
CGSizeMake
(
298
.
0
,
220
.
0
);
...
...
@@ -390,21 +390,21 @@
-
(
UIEdgeInsets
)
collectionView
:(
UICollectionView
*
)
collectionView
layout
:(
UICollectionViewLayout
*
)
collectionViewLayout
insetForSectionAtIndex
:(
NSInteger
)
section
{
if
(
SYSTEM_RUNS_I
N_THE_FUTURE
)
if
(
SYSTEM_RUNS_I
OS7_OR_LATER
)
return
UIEdgeInsetsMake
(
0
.
0
,
0
.
0
,
0
.
0
,
0
.
0
);
return
UIEdgeInsetsMake
(
0
.
0
,
34
.
0
,
0
.
0
,
34
.
0
);
}
-
(
CGFloat
)
collectionView
:(
UICollectionView
*
)
collectionView
layout
:(
UICollectionViewLayout
*
)
collectionViewLayout
minimumLineSpacingForSectionAtIndex
:(
NSInteger
)
section
{
if
(
SYSTEM_RUNS_I
N_THE_FUTURE
)
if
(
SYSTEM_RUNS_I
OS7_OR_LATER
)
return
0
.
0
;
return
10
.
0
;
}
-
(
CGFloat
)
collectionView
:(
UICollectionView
*
)
collectionView
layout
:(
UICollectionViewLayout
*
)
collectionViewLayout
minimumInteritemSpacingForSectionAtIndex
:(
NSInteger
)
section
{
if
(
SYSTEM_RUNS_I
N_THE_FUTURE
)
if
(
SYSTEM_RUNS_I
OS7_OR_LATER
)
return
0
.
0
;
return
10
.
0
;
}
...
...
@@ -426,7 +426,7 @@
UIBarButtonItem
*
editButton
=
self
.
editButtonItem
;
NSString
*
editImage
=
editing
?
@"doneButton"
:
@"button"
;
NSString
*
editImageHighlight
=
editing
?
@"doneButtonHighlight"
:
@"buttonHighlight"
;
if
(
SYSTEM_RUNS_I
N_THE_FUTURE
)
if
(
SYSTEM_RUNS_I
OS7_OR_LATER
)
editButton
.
tintColor
=
[
UIColor
whiteColor
];
else
{
[
editButton
setBackgroundImage
:[
UIImage
imageNamed
:
editImage
]
forState
:
UIControlStateNormal
...
...
AspenProject/VLCSlider.m
View file @
4864f628
...
...
@@ -26,7 +26,7 @@
{
CGRect
returnValue
=
[
super
trackRectForBounds
:
bounds
];
returnValue
.
origin
.
x
=
5
.;
if
(
!
SYSTEM_RUNS_I
N_THE_FUTURE
)
if
(
!
SYSTEM_RUNS_I
OS7_OR_LATER
)
returnValue
.
origin
.
y
=
7
.;
returnValue
.
size
.
width
=
bounds
.
size
.
width
-
10
.;
return
returnValue
;
...
...
@@ -50,7 +50,7 @@
{
CGRect
returnValue
=
[
super
trackRectForBounds
:
bounds
];
returnValue
.
origin
.
x
=
5
.;
if
(
!
SYSTEM_RUNS_I
N_THE_FUTURE
)
if
(
!
SYSTEM_RUNS_I
OS7_OR_LATER
)
returnValue
.
origin
.
y
=
7
.;
returnValue
.
size
.
width
=
bounds
.
size
.
width
-
10
.;
return
returnValue
;
...
...
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