ios - How to reload self ViewController with few changes in swift? -


i have customvc nib view in tableview items displaying url .now on clicking button here need reload same viewcontroller other request sent api . data again reloading , response coming tableview data not changing based on response. old data still loading...

class customaddonvc: uiviewcontroller,uitableviewdatasource,uitableviewdelegate {  var myaddonurl = "http://\(platform).eposapi.co.uk/?app_id=\(apiid)&app_key=\(apikey)&request=addon&aid=\(passaddon!)"   @ibaction func continuebtn(sender: anyobject){     if checkcount == 0{         print("please select 1 item")      }else{           if addonnext != 0           {             //here changing request  url              passaddon = string(addonnext!)             print(passaddon)              let customvc = customaddonvc()             customvc.modalpresentationstyle = .overcurrentcontext             presentviewcontroller(customvc, animated: true, completion: nil)               dismissviewcontrolleranimated(false, completion: nil)               }         } 

my screen shots

enter image description here


Comments