Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- protocol VCFinalDelegate {
- func finishPassing()
- }
- class ViewController1: UIViewController, VCFinalDelegate{
- //......
- var param: NQTSearchParam!
- var uid = String()
- private func loadDoctorFromServer(param: NQTSearchParam?){
- progressHub.show(animated: true)
- let request = EVRequestDoctor.shared
- request.delegate = self
- request.findDoctorWithClinicID(clinicID: param?.clinicID, specialtyID: param?.specializationID)
- uid = (param?.clinicID)!
- }
- func finishPassing(){
- let id = uid
- }
- //......
- }
- class ViewController3: UIViewController{
- //......
- var delegate: VCFinalDelegate?
- private func updateDoctorUI() {
- delegate?.finishPassing()
- print("id: (delegate?.finishPassing())") //nil
- }
- //......
- }
Add Comment
Please, Sign In to add comment