Guest User

Untitled

a guest
Aug 15th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. protocol VCFinalDelegate {
  2.  
  3. func finishPassing()
  4.  
  5. }
  6.  
  7. class ViewController1: UIViewController, VCFinalDelegate{
  8.  
  9. //......
  10. var param: NQTSearchParam!
  11. var uid = String()
  12.  
  13. private func loadDoctorFromServer(param: NQTSearchParam?){
  14. progressHub.show(animated: true)
  15. let request = EVRequestDoctor.shared
  16. request.delegate = self
  17. request.findDoctorWithClinicID(clinicID: param?.clinicID, specialtyID: param?.specializationID)
  18.  
  19. uid = (param?.clinicID)!
  20. }
  21.  
  22.  
  23.  
  24. func finishPassing(){
  25. let id = uid
  26. }
  27.  
  28. //......
  29. }
  30.  
  31. class ViewController3: UIViewController{
  32.  
  33. //......
  34.  
  35. var delegate: VCFinalDelegate?
  36.  
  37. private func updateDoctorUI() {
  38.  
  39. delegate?.finishPassing()
  40. print("id: (delegate?.finishPassing())") //nil
  41.  
  42. }
  43.  
  44. //......
  45. }
Add Comment
Please, Sign In to add comment