我有一个customVC nib视图,其中tableview项目从url显示。现在点击这里的按钮我需要重新加载相同的viewcontroller,其他一些请求被发送到api。我的数据再次重新加载,响应即将到来,但只有tableview数据不会根据响应而改变。旧数据仍在加载......
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 one Item")
}else{
if addOnNext != 0
{
//here i am changing my request for url
PASSADDON = String(addOnNext!)
print(PASSADDON)
let customVC = CustomAddOnVC()
customVC.modalPresentationStyle = .OverCurrentContext
presentViewController(customVC, animated: true, completion: nil)
dismissViewControllerAnimated(false, completion: nil)
}
}
我的屏幕截图