Q:

"Refreshing" an App After an HTTP Post Request in Swift?

I'm creating an app that parses an SQL database of student information and returns the data in JSON format. It has a TableView of student names, and when you tap on a name, it takes you to another ViewController with more information. Once I have the data, I want to user to be able to edit it within the app, and this is done with an HTTP Post request. 
Once the Post request succeeds, however, I can't figure out how to "refresh" or reload the app so that the new/updated data is shown. As of right now, I have to restart the app in order for the changes to show up in the TableView and in the "more information" ViewController (e.g. if I change a student's name from "Bob" to "Joe", it'll still say "Bob" until the next time I run the app). I have a lot of code, so I'll try to only post the vital parts:
HandleData.swift (where the JSON parsing etc. occurs)
func downloadItems() {
    let url:URL = URL(string: urlAddress)!
    var urlSession:Foundation.URLSession!
    let config = URLSessionConfiguration.default

    urlSession = Foundation.URLSession(configuration: config, delegate: self, delegateQueue: nil)
    let task = urlSession.dataTask(with: url)
    task.resume()
}

func URLSession(_ session: Foundation.URLSession, dataTask: URLSessionDataTask, didReceiveData data: Data) {
    self.data.append(data);
}

func URLSession(_ session: Foundation.URLSession, task: URLSessionTask, didCompleteWithError error: NSError?) {
    if error != nil {
        print("Download of data failed.")
    }
    else {
        print("Data downloaded successfully!")
        self.parseJSON()
    }
}

func parseJSON() {
    var jsonResult:NSMutableArray = NSMutableArray()
    do {
        jsonResult = try JSONSerialization.jsonObject(with: self.data as Data, options: JSONSerialization.ReadingOptions.mutableContainers) as! NSMutableArray
    }
    catch let error as NSError {
        print(error)
    }

    var jsonElement:NSDictionary = NSDictionary()
    let locations:NSMutableArray = NSMutableArray()

    for i in 0 ..< jsonResult.count {
        jsonElement = jsonResult[i] as! NSDictionary
        let location = StoreData()

        let studentID = jsonElement["StudentId"] as? String
            let lastName = jsonElement["LastName"] as? String
            let firstName = jsonElement["FirstName"] as? String
            let major = jsonElement["Major"] as? String
            let year = jsonElement["Year"] as? String
            let gpa = jsonElement["GPA"] as? Double
            location.studentID = studentID
            location.lastName = lastName
            location.firstName = firstName
            location.major = major
            location.year = year
            location.gpa = gpa

        locations.add(location)
    }
    DispatchQueue.main.async(execute: { () -> Void in
        self.delegate.itemsDownloaded(locations)
    })
}

DetailViewController.swift (the "more info" screen)
func editData() {
    var request = URLRequest(url: URL(string: "http://csmadison.dhcp.bsu.edu/~vjtanksale/cs320/updatestudents.php")!)
    request.httpMethod = "POST"
    let postString = "StudentId=\(idTB.text!)&FirstName=\(nameTB.text!)&LastName=\(lastNameTB.text!)&Major=\(majorTB.text!)&Year=\(yearTB.text!)&GPA=\(gpaTB.text!)"
    request.httpBody = postString.data(using: .utf8)
    let task = URLSession.shared.dataTask(with: request) { data, response, error in
        guard let data = data, error == nil else {
            print("Error = \(error)")
            return
        }

        if let httpStatus = response as? HTTPURLResponse, httpStatus.statusCode != 200 {
            print("The status code is \(httpStatus.statusCode)")
            print("Response = \(response)")
        }

        let responseString = String(data: data, encoding: .utf8)
        print("Response String = \(responseString!)")
    }
    task.resume()
}

//Below is the function for the "Done" button that the user taps when they're finished editing a particular student's information

@IBAction func donePressed(_ sender: Any) {
    editData()
}

ViewController.swift
import UIKit

class ViewController: UIViewController, UITableViewDataSource, UITableViewDelegate, HandleDataProtocol {
var studentItems:NSArray = NSArray()
var storeData:StoreData = StoreData()
var handleData = HandleData()
@IBOutlet var studentsTable: UITableView!

override func viewDidLoad() {
    super.viewDidLoad()
    self.studentsTable.delegate = self
    self.studentsTable.dataSource = self
    handleData = HandleData()
    handleData.delegate = self
    handleData.downloadItems()
}
override func didReceiveMemoryWarning() {
    super.didReceiveMemoryWarning()
}

func itemsDownloaded(_ items: NSArray) {
    studentItems = items
    self.studentsTable.reloadData()
}

func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
    return studentItems.count
}

A:

You can reload the entire UITableView or just the cells you want using reloadRowsAtIndexPaths. 
As far I saw in you code, you're using the delegate pattern to notify when the request is finished, remember you can use closures to achieve this too. You need to be careful with the use of delegates and retain cycles if you're not declaring your delegate references as weak. 
As @Tj3n point out in his comment the normal process should be save the data from the API in some persistence layer you have using CoreData, Realm, Firebase, MySQL or another you want(NSUserDefaults is not for that kind of storage).a Once you have the data saved in your persistence layer when you make the another request to change the data, you need to notify to everybody is using your model about the change an reload the data.
If you don't want to use any of the libraries I put above to notify about changes in the model you can use delegates, KVO or the observer pattern using NSNotificationCenter. Nevertheless Firebase and Realm implement very well the notifications about changes in the model for you easily.
These two articles from LinkedIn and Pinterest show a very good explanation of how to handle it using immutable models.

Managing Consistency of Immutable Models
Immutable models and data consistency in our iOS App

Another thing I strongly recommend you is isolate your requests in some services removing the dependency in the your DetailViewController. This make your code more difficult to test.
My explanation lacks of sample code, but I think you will find a lot of samples of how to use CoreData, Realm, Firebase in the web and here in SO.
I hope this help you.

