Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
VLC-iOS
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
269
Issues
269
List
Boards
Labels
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
VideoLAN
VLC-iOS
Commits
8e57c4e3
Commit
8e57c4e3
authored
Feb 11, 2014
by
Pierre SAGASPE
Committed by
Felix Paul Kühne
Feb 11, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Formatting: replaces tabs with space and apply code rules
Signed-off-by:
Felix Paul Kühne
<
fkuehne@videolan.org
>
parent
dae89c60
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
114 additions
and
95 deletions
+114
-95
Sources/VLCAppDelegate.m
Sources/VLCAppDelegate.m
+4
-3
Sources/VLCDownloadViewController.m
Sources/VLCDownloadViewController.m
+2
-1
Sources/VLCHTTPFileDownloader.m
Sources/VLCHTTPFileDownloader.m
+4
-2
Sources/VLCLocalServerFolderListViewController.m
Sources/VLCLocalServerFolderListViewController.m
+1
-1
Sources/VLCLocalServerListViewController.m
Sources/VLCLocalServerListViewController.m
+30
-26
Sources/VLCMenuTableViewController.m
Sources/VLCMenuTableViewController.m
+54
-44
Sources/VLCMovieViewController.m
Sources/VLCMovieViewController.m
+4
-2
Sources/VLCNetworkLoginViewController.m
Sources/VLCNetworkLoginViewController.m
+5
-11
Sources/VLCOpenNetworkStreamViewController.m
Sources/VLCOpenNetworkStreamViewController.m
+2
-1
Sources/VLCPlaylistViewController.m
Sources/VLCPlaylistViewController.m
+8
-4
No files found.
Sources/VLCAppDelegate.m
View file @
8e57c4e3
...
...
@@ -209,7 +209,8 @@
#pragma mark - media discovering
-
(
void
)
mediaFileAdded
:(
NSString
*
)
fileName
loading
:(
BOOL
)
isLoading
{
-
(
void
)
mediaFileAdded
:(
NSString
*
)
fileName
loading
:(
BOOL
)
isLoading
{
if
(
!
isLoading
)
{
MLMediaLibrary
*
sharedLibrary
=
[
MLMediaLibrary
sharedMediaLibrary
];
[
sharedLibrary
addFilePaths
:@[
fileName
]];
...
...
@@ -224,7 +225,8 @@
}
}
-
(
void
)
mediaFileDeleted
:(
NSString
*
)
name
{
-
(
void
)
mediaFileDeleted
:(
NSString
*
)
name
{
[[
MLMediaLibrary
sharedMediaLibrary
]
updateMediaDatabase
];
[
_playlistViewController
updateViewContents
];
}
...
...
@@ -352,5 +354,4 @@
[
self
.
window
.
rootViewController
presentViewController
:
navCon
animated
:
YES
completion
:
nil
];
}
@end
Sources/VLCDownloadViewController.m
View file @
8e57c4e3
...
...
@@ -394,7 +394,8 @@
}
#pragma mark - text view delegate
-
(
BOOL
)
textFieldShouldReturn
:(
UITextField
*
)
textField
{
-
(
BOOL
)
textFieldShouldReturn
:(
UITextField
*
)
textField
{
[
self
.
urlField
resignFirstResponder
];
return
NO
;
}
...
...
Sources/VLCHTTPFileDownloader.m
View file @
8e57c4e3
...
...
@@ -122,13 +122,15 @@
[
fileHandle
closeFile
];
}
-
(
void
)
connectionDidFinishLoading
:(
NSURLConnection
*
)
connection
{
-
(
void
)
connectionDidFinishLoading
:(
NSURLConnection
*
)
connection
{
APLog
(
@"http file download complete"
);
[
self
_downloadEnded
];
}
-
(
void
)
connection
:(
NSURLConnection
*
)
connection
didFailWithError
:(
NSError
*
)
error
{
-
(
void
)
connection
:(
NSURLConnection
*
)
connection
didFailWithError
:(
NSError
*
)
error
{
APLog
(
@"http file download failed (%li)"
,
(
long
)
error
.
code
);
if
([
self
.
delegate
respondsToSelector
:
@selector
(
downloadFailedWithErrorDescription
:)])
...
...
Sources/VLCLocalServerFolderListViewController.m
View file @
8e57c4e3
...
...
@@ -161,7 +161,7 @@
{
if
(
tableView
==
self
.
searchDisplayController
.
searchResultsTableView
)
return
_searchData
.
count
;
else
{
else
{
if
(
_serverType
==
kVLCServerTypeUPNP
)
return
_mutableObjectList
.
count
;
...
...
Sources/VLCLocalServerListViewController.m
View file @
8e57c4e3
...
...
@@ -346,15 +346,17 @@
#pragma mark - custom table view appearance
-
(
CGFloat
)
tableView
:(
UITableView
*
)
tableView
heightForHeaderInSection
:(
NSInteger
)
section
{
-
(
CGFloat
)
tableView
:(
UITableView
*
)
tableView
heightForHeaderInSection
:(
NSInteger
)
section
{
return
21
.
f
;
}
-
(
UIView
*
)
tableView
:(
UITableView
*
)
tableView
viewForHeaderInSection
:(
NSInteger
)
section
{
NSObject
*
headerText
=
NSLocalizedString
(
_sectionHeaderTexts
[
section
],
@""
);
UIView
*
headerView
=
nil
;
if
(
headerText
!=
[
NSNull
null
])
{
headerView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
.
0
f
,
0
.
0
f
,
[
UIScreen
mainScreen
].
bounds
.
size
.
height
,
21
.
0
f
)];
-
(
UIView
*
)
tableView
:(
UITableView
*
)
tableView
viewForHeaderInSection
:(
NSInteger
)
section
{
NSObject
*
headerText
=
NSLocalizedString
(
_sectionHeaderTexts
[
section
],
@""
);
UIView
*
headerView
=
nil
;
if
(
headerText
!=
[
NSNull
null
])
{
headerView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
.
0
f
,
0
.
0
f
,
[
UIScreen
mainScreen
].
bounds
.
size
.
height
,
21
.
0
f
)];
if
(
!
SYSTEM_RUNS_IOS7_OR_LATER
)
{
CAGradientLayer
*
gradient
=
[
CAGradientLayer
layer
];
gradient
.
frame
=
headerView
.
bounds
;
...
...
@@ -366,24 +368,24 @@
}
else
headerView
.
backgroundColor
=
[
UIColor
colorWithWhite
:.
122
alpha
:
1
.];
UILabel
*
textLabel
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectInset
(
headerView
.
bounds
,
12
.
0
f
,
5
.
0
f
)];
textLabel
.
text
=
(
NSString
*
)
headerText
;
textLabel
.
font
=
[
UIFont
fontWithName
:
@"Helvetica-Bold"
size
:([
UIFont
systemFontSize
]
*
0
.
8
f
)];
textLabel
.
shadowOffset
=
CGSizeMake
(
0
.
0
f
,
1
.
0
f
);
textLabel
.
shadowColor
=
[
UIColor
colorWithWhite
:
0
.
0
f
alpha
:
0
.
25
f
];
textLabel
.
textColor
=
[
UIColor
colorWithRed
:(
118
.
0
f
/
255
.
0
f
)
green
:(
118
.
0
f
/
255
.
0
f
)
blue
:
(
118
.
0
f
/
255
.
0
f
)
alpha
:
1
.
0
f
];
textLabel
.
backgroundColor
=
[
UIColor
clearColor
];
[
headerView
addSubview
:
textLabel
];
UIView
*
topLine
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
.
0
f
,
0
.
0
f
,
[
UIScreen
mainScreen
].
bounds
.
size
.
height
,
1
.
0
f
)];
topLine
.
backgroundColor
=
[
UIColor
colorWithRed
:(
95
.
0
f
/
255
.
0
f
)
green
:(
95
.
0
f
/
255
.
0
f
)
blue
:
(
95
.
0
f
/
255
.
0
f
)
alpha
:
1
.
0
f
];
[
headerView
addSubview
:
topLine
];
UIView
*
bottomLine
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
.
0
f
,
21
.
0
f
,
[
UIScreen
mainScreen
].
bounds
.
size
.
height
,
1
.
0
f
)];
bottomLine
.
backgroundColor
=
[
UIColor
colorWithRed
:(
16
.
0
f
/
255
.
0
f
)
green
:(
16
.
0
f
/
255
.
0
f
)
blue
:
(
16
.
0
f
/
255
.
0
f
)
alpha
:
1
.
0
f
];
[
headerView
addSubview
:
bottomLine
];
}
return
headerView
;
UILabel
*
textLabel
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectInset
(
headerView
.
bounds
,
12
.
0
f
,
5
.
0
f
)];
textLabel
.
text
=
(
NSString
*
)
headerText
;
textLabel
.
font
=
[
UIFont
fontWithName
:
@"Helvetica-Bold"
size
:([
UIFont
systemFontSize
]
*
0
.
8
f
)];
textLabel
.
shadowOffset
=
CGSizeMake
(
0
.
0
f
,
1
.
0
f
);
textLabel
.
shadowColor
=
[
UIColor
colorWithWhite
:
0
.
0
f
alpha
:
0
.
25
f
];
textLabel
.
textColor
=
[
UIColor
colorWithRed
:(
118
.
0
f
/
255
.
0
f
)
green
:(
118
.
0
f
/
255
.
0
f
)
blue
:
(
118
.
0
f
/
255
.
0
f
)
alpha
:
1
.
0
f
];
textLabel
.
backgroundColor
=
[
UIColor
clearColor
];
[
headerView
addSubview
:
textLabel
];
UIView
*
topLine
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
.
0
f
,
0
.
0
f
,
[
UIScreen
mainScreen
].
bounds
.
size
.
height
,
1
.
0
f
)];
topLine
.
backgroundColor
=
[
UIColor
colorWithRed
:(
95
.
0
f
/
255
.
0
f
)
green
:(
95
.
0
f
/
255
.
0
f
)
blue
:
(
95
.
0
f
/
255
.
0
f
)
alpha
:
1
.
0
f
];
[
headerView
addSubview
:
topLine
];
UIView
*
bottomLine
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
.
0
f
,
21
.
0
f
,
[
UIScreen
mainScreen
].
bounds
.
size
.
height
,
1
.
0
f
)];
bottomLine
.
backgroundColor
=
[
UIColor
colorWithRed
:(
16
.
0
f
/
255
.
0
f
)
green
:(
16
.
0
f
/
255
.
0
f
)
blue
:
(
16
.
0
f
/
255
.
0
f
)
alpha
:
1
.
0
f
];
[
headerView
addSubview
:
bottomLine
];
}
return
headerView
;
}
#pragma mark - bonjour discovery
...
...
@@ -424,10 +426,12 @@
#pragma mark - UPNP details
//protocol UPnPDBObserver
-
(
void
)
UPnPDBWillUpdate
:(
UPnPDB
*
)
sender
{
-
(
void
)
UPnPDBWillUpdate
:(
UPnPDB
*
)
sender
{
}
-
(
void
)
UPnPDBUpdated
:(
UPnPDB
*
)
sender
{
-
(
void
)
UPnPDBUpdated
:(
UPnPDB
*
)
sender
{
NSUInteger
count
=
_UPNPdevices
.
count
;
BasicUPnPDevice
*
device
;
NSMutableArray
*
mutArray
=
[[
NSMutableArray
alloc
]
init
];
...
...
Sources/VLCMenuTableViewController.m
View file @
8e57c4e3
...
...
@@ -66,7 +66,7 @@
[
super
viewDidLoad
];
self
.
view
.
frame
=
CGRectMake
(
0
.
0
f
,
0
.
0
f
,
kGHRevealSidebarWidth
,
CGRectGetHeight
(
self
.
view
.
bounds
));
self
.
view
.
autoresizingMask
=
UIViewAutoresizingFlexibleHeight
;
self
.
view
.
autoresizingMask
=
UIViewAutoresizingFlexibleHeight
;
_sectionHeaderTexts
=
@[
@"SECTION_HEADER_LIBRARY"
,
@"SECTION_HEADER_NETWORK"
,
@"Settings"
];
_menuItemsSectionOne
=
@[
@"LIBRARY_ALL_FILES"
,
@"LIBRARY_MUSIC"
,
@"LIBRARY_SERIES"
];
...
...
@@ -75,10 +75,10 @@
_tableView
=
[[
UITableView
alloc
]
initWithFrame
:
CGRectMake
(
0
.
0
f
,
44
.
0
f
+
20
.
0
f
,
kGHRevealSidebarWidth
,
CGRectGetHeight
(
self
.
view
.
bounds
)
-
(
44
.
0
f
+
20
.
0
f
))
style
:
UITableViewStylePlain
];
_tableView
.
delegate
=
self
;
_tableView
.
dataSource
=
self
;
_tableView
.
autoresizingMask
=
UIViewAutoresizingFlexibleHeight
;
_tableView
.
backgroundColor
=
[
UIColor
colorWithRed
:(
43
.
0
f
/
255
.
0
f
)
green
:(
43
.
0
f
/
255
.
0
f
)
blue
:
(
43
.
0
f
/
255
.
0
f
)
alpha
:
1
.
0
f
];
_tableView
.
separatorStyle
=
UITableViewCellSeparatorStyleNone
;
_tableView
.
dataSource
=
self
;
_tableView
.
autoresizingMask
=
UIViewAutoresizingFlexibleHeight
;
_tableView
.
backgroundColor
=
[
UIColor
colorWithRed
:(
43
.
0
f
/
255
.
0
f
)
green
:(
43
.
0
f
/
255
.
0
f
)
blue
:
(
43
.
0
f
/
255
.
0
f
)
alpha
:
1
.
0
f
];
_tableView
.
separatorStyle
=
UITableViewCellSeparatorStyleNone
;
_tableView
.
rowHeight
=
[
VLCWiFiUploadTableViewCell
heightOfCell
];
_tableView
.
scrollsToTop
=
NO
;
...
...
@@ -120,8 +120,9 @@
[
self
updateHTTPServerAddress
];
}
-
(
void
)
viewWillAppear
:(
BOOL
)
animated
{
self
.
view
.
frame
=
CGRectMake
(
0
.
0
f
,
0
.
0
f
,
kGHRevealSidebarWidth
,
CGRectGetHeight
(
self
.
view
.
bounds
));
-
(
void
)
viewWillAppear
:(
BOOL
)
animated
{
self
.
view
.
frame
=
CGRectMake
(
0
.
0
f
,
0
.
0
f
,
kGHRevealSidebarWidth
,
CGRectGetHeight
(
self
.
view
.
bounds
));
[
self
netReachabilityChanged
:
nil
];
}
...
...
@@ -142,14 +143,16 @@
-
(
BOOL
)
shouldAutorotate
{
UIInterfaceOrientation
orientation
=
[[
UIApplication
sharedApplication
]
statusBarOrientation
];
return
(
orientation
==
UIInterfaceOrientationPortraitUpsideDown
)
?
(
UI_USER_INTERFACE_IDIOM
()
==
UIUserInterfaceIdiomPad
)
:
YES
;
return
(
orientation
==
UIInterfaceOrientationPortraitUpsideDown
)
?
(
UI_USER_INTERFACE_IDIOM
()
==
UIUserInterfaceIdiomPad
)
:
YES
;
}
-
(
NSInteger
)
numberOfSectionsInTableView
:(
UITableView
*
)
tableView
{
-
(
NSInteger
)
numberOfSectionsInTableView
:(
UITableView
*
)
tableView
{
return
3
;
}
-
(
NSInteger
)
tableView
:(
UITableView
*
)
tableView
numberOfRowsInSection
:(
NSInteger
)
section
{
-
(
NSInteger
)
tableView
:(
UITableView
*
)
tableView
numberOfRowsInSection
:(
NSInteger
)
section
{
if
(
section
==
0
)
// media
return
_menuItemsSectionOne
.
count
;
else
if
(
section
==
1
)
// network
...
...
@@ -160,7 +163,8 @@
return
0
;
}
-
(
UITableViewCell
*
)
tableView
:(
UITableView
*
)
tableView
cellForRowAtIndexPath
:(
NSIndexPath
*
)
indexPath
{
-
(
UITableViewCell
*
)
tableView
:(
UITableView
*
)
tableView
cellForRowAtIndexPath
:(
NSIndexPath
*
)
indexPath
{
static
NSString
*
CellIdentifier
=
@"VLCMenuCell"
;
static
NSString
*
WiFiCellIdentifier
=
@"VLCMenuWiFiCell"
;
...
...
@@ -224,17 +228,19 @@
}
#pragma mark - tv delegate
-
(
CGFloat
)
tableView
:(
UITableView
*
)
tableView
heightForHeaderInSection
:(
NSInteger
)
section
{
-
(
CGFloat
)
tableView
:(
UITableView
*
)
tableView
heightForHeaderInSection
:(
NSInteger
)
section
{
if
(
section
<
3
)
return
21
.
f
;
return
0
.;
}
-
(
UIView
*
)
tableView
:(
UITableView
*
)
tableView
viewForHeaderInSection
:(
NSInteger
)
section
{
NSObject
*
headerText
=
NSLocalizedString
(
_sectionHeaderTexts
[
section
],
@""
);
UIView
*
headerView
=
nil
;
if
(
headerText
!=
[
NSNull
null
])
{
headerView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
.
0
f
,
0
.
0
f
,
[
UIScreen
mainScreen
].
bounds
.
size
.
height
,
21
.
0
f
)];
-
(
UIView
*
)
tableView
:(
UITableView
*
)
tableView
viewForHeaderInSection
:(
NSInteger
)
section
{
NSObject
*
headerText
=
NSLocalizedString
(
_sectionHeaderTexts
[
section
],
@""
);
UIView
*
headerView
=
nil
;
if
(
headerText
!=
[
NSNull
null
])
{
headerView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
.
0
f
,
0
.
0
f
,
[
UIScreen
mainScreen
].
bounds
.
size
.
height
,
21
.
0
f
)];
if
(
!
SYSTEM_RUNS_IOS7_OR_LATER
)
{
CAGradientLayer
*
gradient
=
[
CAGradientLayer
layer
];
gradient
.
frame
=
headerView
.
bounds
;
...
...
@@ -246,24 +252,24 @@
}
else
headerView
.
backgroundColor
=
[
UIColor
colorWithWhite
:.
122
alpha
:
1
.];
UILabel
*
textLabel
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectInset
(
headerView
.
bounds
,
12
.
0
f
,
5
.
0
f
)];
textLabel
.
text
=
(
NSString
*
)
headerText
;
textLabel
.
font
=
[
UIFont
fontWithName
:
@"Helvetica-Bold"
size
:([
UIFont
systemFontSize
]
*
0
.
8
f
)];
textLabel
.
shadowOffset
=
CGSizeMake
(
0
.
0
f
,
1
.
0
f
);
textLabel
.
shadowColor
=
[
UIColor
colorWithWhite
:
0
.
0
f
alpha
:
0
.
25
f
];
textLabel
.
textColor
=
[
UIColor
colorWithRed
:(
118
.
0
f
/
255
.
0
f
)
green
:(
118
.
0
f
/
255
.
0
f
)
blue
:
(
118
.
0
f
/
255
.
0
f
)
alpha
:
1
.
0
f
];
textLabel
.
backgroundColor
=
[
UIColor
clearColor
];
[
headerView
addSubview
:
textLabel
];
UIView
*
topLine
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
.
0
f
,
0
.
0
f
,
[
UIScreen
mainScreen
].
bounds
.
size
.
height
,
1
.
0
f
)];
topLine
.
backgroundColor
=
[
UIColor
colorWithRed
:(
95
.
0
f
/
255
.
0
f
)
green
:(
95
.
0
f
/
255
.
0
f
)
blue
:
(
95
.
0
f
/
255
.
0
f
)
alpha
:
1
.
0
f
];
[
headerView
addSubview
:
topLine
];
UIView
*
bottomLine
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
.
0
f
,
21
.
0
f
,
[
UIScreen
mainScreen
].
bounds
.
size
.
height
,
1
.
0
f
)];
bottomLine
.
backgroundColor
=
[
UIColor
colorWithRed
:(
16
.
0
f
/
255
.
0
f
)
green
:(
16
.
0
f
/
255
.
0
f
)
blue
:
(
16
.
0
f
/
255
.
0
f
)
alpha
:
1
.
0
f
];
[
headerView
addSubview
:
bottomLine
];
}
return
headerView
;
UILabel
*
textLabel
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectInset
(
headerView
.
bounds
,
12
.
0
f
,
5
.
0
f
)];
textLabel
.
text
=
(
NSString
*
)
headerText
;
textLabel
.
font
=
[
UIFont
fontWithName
:
@"Helvetica-Bold"
size
:([
UIFont
systemFontSize
]
*
0
.
8
f
)];
textLabel
.
shadowOffset
=
CGSizeMake
(
0
.
0
f
,
1
.
0
f
);
textLabel
.
shadowColor
=
[
UIColor
colorWithWhite
:
0
.
0
f
alpha
:
0
.
25
f
];
textLabel
.
textColor
=
[
UIColor
colorWithRed
:(
118
.
0
f
/
255
.
0
f
)
green
:(
118
.
0
f
/
255
.
0
f
)
blue
:
(
118
.
0
f
/
255
.
0
f
)
alpha
:
1
.
0
f
];
textLabel
.
backgroundColor
=
[
UIColor
clearColor
];
[
headerView
addSubview
:
textLabel
];
UIView
*
topLine
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
.
0
f
,
0
.
0
f
,
[
UIScreen
mainScreen
].
bounds
.
size
.
height
,
1
.
0
f
)];
topLine
.
backgroundColor
=
[
UIColor
colorWithRed
:(
95
.
0
f
/
255
.
0
f
)
green
:(
95
.
0
f
/
255
.
0
f
)
blue
:
(
95
.
0
f
/
255
.
0
f
)
alpha
:
1
.
0
f
];
[
headerView
addSubview
:
topLine
];
UIView
*
bottomLine
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
.
0
f
,
21
.
0
f
,
[
UIScreen
mainScreen
].
bounds
.
size
.
height
,
1
.
0
f
)];
bottomLine
.
backgroundColor
=
[
UIColor
colorWithRed
:(
16
.
0
f
/
255
.
0
f
)
green
:(
16
.
0
f
/
255
.
0
f
)
blue
:
(
16
.
0
f
/
255
.
0
f
)
alpha
:
1
.
0
f
];
[
headerView
addSubview
:
bottomLine
];
}
return
headerView
;
}
#pragma mark - menu implementation
...
...
@@ -357,29 +363,33 @@
_revealController
.
contentViewController
=
navCon
;
}
[
_revealController
toggleSidebar
:
NO
duration
:
kGHRevealSidebarDefaultAnimationDuration
];
[
_revealController
toggleSidebar
:
NO
duration
:
kGHRevealSidebarDefaultAnimationDuration
];
}
-
(
void
)
tableView
:(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:(
NSIndexPath
*
)
indexPath
{
[
self
_revealItem
:
indexPath
.
row
inSection
:
indexPath
.
section
];
-
(
void
)
tableView
:(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:(
NSIndexPath
*
)
indexPath
{
[
self
_revealItem
:
indexPath
.
row
inSection
:
indexPath
.
section
];
}
#pragma mark Public Methods
-
(
void
)
selectRowAtIndexPath
:(
NSIndexPath
*
)
indexPath
animated
:(
BOOL
)
animated
scrollPosition
:(
UITableViewScrollPosition
)
scrollPosition
{
[
self
.
tableView
selectRowAtIndexPath
:
indexPath
animated
:
animated
scrollPosition
:
scrollPosition
];
if
(
scrollPosition
==
UITableViewScrollPositionNone
)
[
self
.
tableView
scrollToRowAtIndexPath
:
indexPath
atScrollPosition
:
scrollPosition
animated
:
animated
];
-
(
void
)
selectRowAtIndexPath
:(
NSIndexPath
*
)
indexPath
animated
:(
BOOL
)
animated
scrollPosition
:(
UITableViewScrollPosition
)
scrollPosition
{
[
self
.
tableView
selectRowAtIndexPath
:
indexPath
animated
:
animated
scrollPosition
:
scrollPosition
];
if
(
scrollPosition
==
UITableViewScrollPositionNone
)
[
self
.
tableView
scrollToRowAtIndexPath
:
indexPath
atScrollPosition
:
scrollPosition
animated
:
animated
];
[
self
_revealItem
:
indexPath
.
row
inSection
:
indexPath
.
section
];
}
#pragma mark - shake to support
-
(
BOOL
)
canBecomeFirstResponder
{
-
(
BOOL
)
canBecomeFirstResponder
{
return
YES
;
}
-
(
void
)
motionEnded
:(
UIEventSubtype
)
motion
withEvent
:(
UIEvent
*
)
event
{
-
(
void
)
motionEnded
:(
UIEventSubtype
)
motion
withEvent
:(
UIEvent
*
)
event
{
if
(
motion
==
UIEventSubtypeMotionShake
)
[[
VLCBugreporter
sharedInstance
]
handleBugreportRequest
];
}
...
...
Sources/VLCMovieViewController.m
View file @
8e57c4e3
...
...
@@ -975,7 +975,8 @@
[
_subtitleActionSheet
showInView
:(
UIButton
*
)
sender
];
}
-
(
void
)
actionSheet
:(
UIActionSheet
*
)
actionSheet
clickedButtonAtIndex
:(
NSInteger
)
buttonIndex
{
-
(
void
)
actionSheet
:(
UIActionSheet
*
)
actionSheet
clickedButtonAtIndex
:(
NSInteger
)
buttonIndex
{
if
(
buttonIndex
==
[
actionSheet
cancelButtonIndex
])
return
;
...
...
@@ -1360,7 +1361,8 @@
||
toInterfaceOrientation
!=
UIInterfaceOrientationPortraitUpsideDown
;
}
-
(
void
)
willRotateToInterfaceOrientation
:(
UIInterfaceOrientation
)
toInterfaceOrientation
duration
:(
NSTimeInterval
)
duration
{
-
(
void
)
willRotateToInterfaceOrientation
:(
UIInterfaceOrientation
)
toInterfaceOrientation
duration
:(
NSTimeInterval
)
duration
{
[
super
willRotateToInterfaceOrientation
:
toInterfaceOrientation
duration
:
duration
];
if
(
UI_USER_INTERFACE_IDIOM
()
==
UIUserInterfaceIdiomPhone
)
{
...
...
Sources/VLCNetworkLoginViewController.m
View file @
8e57c4e3
...
...
@@ -156,24 +156,18 @@
}
#pragma mark - text view delegate
-
(
BOOL
)
textFieldShouldReturn
:(
UITextField
*
)
textField
{
if
([
self
.
serverAddressField
isFirstResponder
])
{
-
(
BOOL
)
textFieldShouldReturn
:(
UITextField
*
)
textField
{
if
([
self
.
serverAddressField
isFirstResponder
])
{
[
self
.
serverAddressField
resignFirstResponder
];
[
self
.
usernameField
becomeFirstResponder
];
}
else
if
([
self
.
usernameField
isFirstResponder
])
{
}
else
if
([
self
.
usernameField
isFirstResponder
])
{
[
self
.
usernameField
resignFirstResponder
];
[
self
.
passwordField
becomeFirstResponder
];
}
else
if
([
self
.
passwordField
isFirstResponder
])
{
}
else
if
([
self
.
passwordField
isFirstResponder
])
{
[
self
.
passwordField
resignFirstResponder
];
//[self connectToServer:nil];
}
return
NO
;
}
...
...
Sources/VLCOpenNetworkStreamViewController.m
View file @
8e57c4e3
...
...
@@ -182,7 +182,8 @@
}
#pragma mark - text view delegate
-
(
BOOL
)
textFieldShouldReturn
:(
UITextField
*
)
textField
{
-
(
BOOL
)
textFieldShouldReturn
:(
UITextField
*
)
textField
{
[
self
.
urlField
resignFirstResponder
];
return
NO
;
}
...
...
Sources/VLCPlaylistViewController.m
View file @
8e57c4e3
...
...
@@ -59,7 +59,8 @@ static NSString *kDisplayedFirstSteps = @"Did we display the first steps tutoria
[
defaults
registerDefaults
:@{
kDisplayedFirstSteps
:
[
NSNumber
numberWithBool
:
NO
]}];
}
-
(
void
)
loadView
{
-
(
void
)
loadView
{
if
(
UI_USER_INTERFACE_IDIOM
()
==
UIUserInterfaceIdiomPhone
)
{
_tableView
=
[[
UITableView
alloc
]
initWithFrame
:[
UIScreen
mainScreen
].
bounds
style
:
UITableViewStylePlain
];
_tableView
.
backgroundColor
=
[
UIColor
colorWithWhite
:.
122
alpha
:
1
.];
...
...
@@ -749,7 +750,8 @@ static NSString *kDisplayedFirstSteps = @"Did we display the first steps tutoria
// RootController is responsible for supporting interface orientation(iOS6.0+), i.e. navigation controller
// so this will not work as intended without "voodoo magic"(UINavigationController category, subclassing, etc)
/* introduced in iOS 6 */
-
(
NSUInteger
)
supportedInterfaceOrientations
{
-
(
NSUInteger
)
supportedInterfaceOrientations
{
if
(
UI_USER_INTERFACE_IDIOM
()
==
UIUserInterfaceIdiomPad
)
return
UIInterfaceOrientationMaskAll
;
...
...
@@ -758,11 +760,13 @@ static NSString *kDisplayedFirstSteps = @"Did we display the first steps tutoria
}
/* introduced in iOS 6 */
-
(
BOOL
)
shouldAutorotate
{
-
(
BOOL
)
shouldAutorotate
{
return
(
UI_USER_INTERFACE_IDIOM
()
==
UIUserInterfaceIdiomPad
)
||
(
_foundMedia
.
count
>
0
);
}
-
(
void
)
willRotateToInterfaceOrientation
:(
UIInterfaceOrientation
)
toInterfaceOrientation
duration
:(
NSTimeInterval
)
duration
{
-
(
void
)
willRotateToInterfaceOrientation
:(
UIInterfaceOrientation
)
toInterfaceOrientation
duration
:(
NSTimeInterval
)
duration
{
[
super
willRotateToInterfaceOrientation
:
toInterfaceOrientation
duration
:
duration
];
if
(
UI_USER_INTERFACE_IDIOM
()
==
UIUserInterfaceIdiomPad
)
...
...
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