Move TableView Cells in Swift 5 (Xcode 11) | 2020

  Рет қаралды 12,585

iOS Academy

iOS Academy

Күн бұрын

Пікірлер: 39
@zainex007
@zainex007 3 жыл бұрын
Great video! But I think using the swap method in moveRowAt is wrong. For example, you move first row after fourth row and the rows will be: second, third, fourth, first. But the array will be: fourth, second, third, first. Try to print the array in the console every time rows are moved. I would do something like this: let removedElement = models.remove(at: sourceIndexPath.row) models.insert(removedElement, at: destinationIndexPath.row)
@tonyren.tr5
@tonyren.tr5 2 жыл бұрын
I have the same issue when I did this implementation. I think you're right
@shanq7373
@shanq7373 2 жыл бұрын
Saved my homework, thanks a lot
@iOSAcademy
@iOSAcademy 2 жыл бұрын
Youre welcome
@alifarhadi5704
@alifarhadi5704 4 жыл бұрын
That's great. keep going man, I like the style of your video.
@iOSAcademy
@iOSAcademy 4 жыл бұрын
Thanks! I appreciate it :)
@nileshjdarji
@nileshjdarji 3 жыл бұрын
This is great but when you come back to the app again the new order is not saved. Do you have a video to show the saving part? Thanks
@iOSAcademy
@iOSAcademy 3 жыл бұрын
Youll need to persist in db or user defaults
@senwhich
@senwhich 2 жыл бұрын
Hi, appreciate how clear way of explanation you are using. Would like to ask you two question. 1. in case I have to views - table and collection, after reordering the table cells how can I reflect the reordered array also in collection view? 2. how can I keep the reordered array/table cells also after adding a new item/table cell in the array?
@Oisinkelly308
@Oisinkelly308 2 жыл бұрын
This implementation changes the core array. So if you want it to reflect on the collectionview do collectionView.reloadData(). 2. Just do array.append and this will add to the end of the array, keeping the reordered items in their reordered spots
@parneetk03
@parneetk03 2 жыл бұрын
Great video! How can we delete the items? I can swap them, but when I click on the minus icon on the left of the sort, nothing happens. Please explain.
@수학쌤우리소쌤
@수학쌤우리소쌤 3 жыл бұрын
It’s wondering video^^ Please show me only program without storybord. I tried it but can’t
@bala_animeti
@bala_animeti 3 жыл бұрын
Is it possible to change the default reorder icon while editing?
@АлинаЩиголева-и6ц
@АлинаЩиголева-и6ц 3 жыл бұрын
Thank you a lot!
@iOSAcademy
@iOSAcademy 3 жыл бұрын
Youre welcome!
@akhtarabbas5760
@akhtarabbas5760 2 жыл бұрын
thank you :)
@iOSAcademy
@iOSAcademy 2 жыл бұрын
Youre welcome
@gunter-s1x
@gunter-s1x 3 жыл бұрын
Would it be different for a table created in another view controller?
@iOSAcademy
@iOSAcademy 3 жыл бұрын
Nope
@fiazhussain1645
@fiazhussain1645 3 жыл бұрын
Good Job Sir
@iOSAcademy
@iOSAcademy 3 жыл бұрын
Thanks
@fiazhussain1645
@fiazhussain1645 3 жыл бұрын
@@iOSAcademy sir where from you???? i want to study from you live(face to face)
@allaboutnaturesound6033
@allaboutnaturesound6033 4 жыл бұрын
nice video
@iOSAcademy
@iOSAcademy 4 жыл бұрын
Thanks!
@gandalfgrey91
@gandalfgrey91 3 жыл бұрын
how do you swap the index of core data entities?
@bitsurfer0101
@bitsurfer0101 3 жыл бұрын
can you change the name of the bar button (ex. done ) while it is being edited and then change it back to sort when it is done?
@oleh3375
@oleh3375 3 жыл бұрын
Use method setEditing and in this method, u'll write editButtonItem.title = "Done" and change name
@vladwinter3246
@vladwinter3246 3 жыл бұрын
@@oleh3375, don't know why but it doesn't work for me. The title stays the same(
@markme7092
@markme7092 4 жыл бұрын
Hey Please make a video to Save & display time & date in UITableView Cell Core Data?
@iOSAcademy
@iOSAcademy 4 жыл бұрын
On my list :) stay tuned
@vladwinter3246
@vladwinter3246 3 жыл бұрын
Nice video, but how can I make my table delete elements? I mean we have the edit button with red minuses once it is pressed, but when I swipe the element left and click "delete" - nothing happens please help)
@vladimirpazdera4907
@vladimirpazdera4907 2 жыл бұрын
You need to define leadingSwipeActionsConfigurationForRowAt or trailingSwipeActionsConfigurationForRowAt method and after then it will work.
@nelvinleivagarcia
@nelvinleivagarcia 4 жыл бұрын
Excelente video!
@iOSAcademy
@iOSAcademy 4 жыл бұрын
Thank you!
@haroonmazhar5212
@haroonmazhar5212 4 жыл бұрын
best
@iOSAcademy
@iOSAcademy 4 жыл бұрын
Thanks!
@ggmouseproapp
@ggmouseproapp 2 жыл бұрын
Inside didTapSort: table.isEditing = !table.isEditing;
@iOSAcademy
@iOSAcademy 2 жыл бұрын
Yep
Custom Cell TableView in Swift Multiple Cells - Xcode 11 (2020)
13:24
TableView Controller in Swift 5 (Xcode 11) 2020
14:52
iOS Academy
Рет қаралды 19 М.
REAL 3D brush can draw grass Life Hack #shorts #lifehacks
00:42
MrMaximus
Рет қаралды 11 МЛН
How to whistle ?? 😱😱
00:31
Tibo InShape
Рет қаралды 16 МЛН
Will A Basketball Boat Hold My Weight?
00:30
MrBeast
Рет қаралды 93 МЛН
Custom Table View Cells in Swift 5 & Xcode 12 (2022)
23:35
iOS Academy
Рет қаралды 39 М.
Self Sizing Table View Cells
15:17
Code Pro
Рет қаралды 12 М.
What is JSON - JSON Parsing in Swift
24:15
CodeWithChris
Рет қаралды 74 М.
Swift: Multiple Custom Cells TableView (Swift 5, Xcode 11, iOS)
20:15
If __name__ == "__main__" for Python Developers
8:47
Python Simplified
Рет қаралды 408 М.