Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class tv: UIViewController {
- var itemsName : [NSManagedObject] = []
- override func viewDidAppear(_ animated: Bool) {
- super.viewDidAppear(animated)
- let appD = UIApplication.shared.delegate as! AppDelegate
- let context = appD.persistentContainer.viewContext
- let FetchRequest = NSFetchRequest<NSManagedObject>(entityName: "Team")
- do {
- itemsName = try context.fetch(FetchRequest)
- }catch {
- print("Ashley Tisdale")
- }
- geroge.text = String(itemsName.count)
- view.backgroundColor = UIColor.brown
- }
- @IBOutlet var geroge: UILabel!
Add Comment
Please, Sign In to add comment