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
6e29f815
Commit
6e29f815
authored
Aug 08, 2018
by
Soomin Lee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
VLCEditController: Create resetCellat helper
parent
a5921e53
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
Sources/VLCEditController.swift
Sources/VLCEditController.swift
+12
-4
No files found.
Sources/VLCEditController.swift
View file @
6e29f815
...
...
@@ -36,6 +36,17 @@ class VLCEditController: NSObject {
}
}
// MARK: - Helpers
private
extension
VLCEditController
{
private
func
resetCell
(
at
indexPath
:
IndexPath
)
{
if
let
cell
=
collectionView
.
cellForItem
(
at
:
indexPath
)
as?
VLCMediaViewEditCell
{
cell
.
checkView
.
isEnabled
=
false
}
collectionView
.
reloadData
()
}
}
extension
VLCEditController
:
VLCEditControllerDataSource
{
func
toolbarNeedsUpdate
(
editing
:
Bool
)
{
editToolbar
.
isHidden
=
!
editing
...
...
@@ -77,10 +88,7 @@ extension VLCEditController: VLCEditToolbarDelegate {
guard
let
alertController
=
alertController
,
let
textField
=
alertController
.
textFields
?
.
first
else
{
return
}
media
.
updateTitle
(
textField
.
text
)
if
let
cell
=
self
?
.
collectionView
.
cellForItem
(
at
:
indexPath
)
as?
VLCMediaViewEditCell
{
cell
.
checkView
.
isEnabled
=
false
}
self
?
.
collectionView
.
reloadData
()
self
?
.
resetCell
(
at
:
indexPath
)
}
alertController
.
addAction
(
cancelButton
)
...
...
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