Skip to content
This repository was archived by the owner on Sep 15, 2025. It is now read-only.

Commit a365ad0

Browse files
committed
small note
1 parent 225082c commit a365ad0

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

ListaCoreData/ListaCoreDataFunctions.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ class ListaCoreDataFunctions: UIViewController {
5858
/// :param: tableView Referencia do Outlet da TableView
5959
/// :param: nome Nome do item para adicionar no coreData
6060
///
61+
/// AVISO: Esse exemplo eu passo a referencia da TableView, só pra servir como exemplo, teoricamente seria melhor não fazer isso.
6162
func adicionaItem(tableView: UITableView, nome: String) {
6263
// chama uma função da classe "Itens" que já faz o processo de criar o novo objeto do CoreData
6364
var novoItem = Itens.criaNovoObjeto(coreDataDB, nome: nome)
@@ -70,9 +71,6 @@ class ListaCoreDataFunctions: UIViewController {
7071

7172
// recarrega os itens, se deixar descomentado essa linha aqui, ele vai adicionar o item na tableView na ordem alfabetica
7273
self.carregaDadosCoreData()
73-
74-
// recarrega a TableView
75-
tableView.reloadData()
7674
}
7775

7876
/// Função para editar o nome do Item

0 commit comments

Comments
 (0)