swift - deinit function not called while leaving the controller -


in app, launch page rootviewcontroller , goes page called offers-list , there goes offer-detailed page. while returning offer-detailed page offers-list page deinit works (which use post log data db). instead while returning offers-list page launch page same deinit not called (which used same purpose before). tried methods dismissed, toparent, fromparent etc. nothing seems work. offer-detailed page offers-list page come using button of navigation. offers-list page launch page use boom button go launch page. can please suggest way resolve issue?

here properties declared in offerviewcontroller:

class offerviewcontroller: basetableviewcontroller {      var rid:string?     var userlocaldata: userlocaldata?     var imagescalepresenttransition: imagescaletransitiondelegate? = nil     var offerid:string?     var offersvisible = [string]() 

and deinit method

deinit {     var delegate = constant.instancecreate()     var offlistid = screennameskeys.offersdetails      let data = constant.getcampaignarraylogdata(offersvisible, "offer")     constant.sharedinstance.logdata(group: groupname.navigation, page: screennameskeys.offersdetails, type: "click", data: data)      if let indexof = delegate.pagearray.index(of: offlistid) {         if delegate.pagearray.indices.contains(indexof) {             delegate.pagearray.remove(at: indexof)         }     }     } 


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -