ios - how to get a new JSON response without closing and reloading the app -
i started building app uses rest api, testing json response in console. i have 2 uitextfields jobkeyword & location user enter, json shows in console upon clicking "search" button. but can't new search without closing re-running app. how update field , new response without leaving app? i'm new in ios development. here viewcontroller.swift: import uikit import alamofire class viewcontroller: uiviewcontroller { let headers = ["host":"data.usajobs.gov", "user-agent":"dezbill@icloud.com", "authorization-key":"********************" ] @iboutlet weak var jobkeywordtxt: uitextfield! @iboutlet var locationtxt: uitextfield! @iboutlet weak var locationstate: uitextfield! override func viewdidload() { super.viewdidload() } override func viewdidappear(animated: bool) { super.viewdidappear(true) } @ibaction func searchbtn(sender: uibutton) { ...