custom delegate getting nil in swift , not getting call back [on hold]

I am trying to create a custom delegate using TLPhotoControllerDelegate in swift. However the doSomething method is not being called through callback. It seems that delegate?. TLPhotoControllerDelegate() does not fire to the class B TLPhotoControllerDelegate method. Thanks in advance!

Class A:     protocol TLPhotoControllerDelegate {         func addimageCollectionView(image:UIImage)     }     class TLPhotoController  {     var delegate:TLPhotoControllerDelegate?       @IBAction func capturePhoto(sender: TLButton) {         self.delegate.addimageCollectionView(image)         }     } Class B: TLPatientAlbumCollectionViewController:TLPhotoControllerDelegate {         var photoController:TLPhotoController?         override func viewDidLoad() {                 photoController?.delegate = self          super.viewDidLoad()             loadData()           }                func addimageCollectionView(image: UIImage) {             }     } 


Category: objective c Time: 2016-08-02 Views: 104

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development


Front-end development


development tools

Open Platform

Javascript development

.NET development

cloud computing


Copyright (C), All Rights Reserved.

processed in 0.210 (s). 12 q(s)