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) {             }     } 

Replay

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

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development

search

Front-end development

Database

development tools

Open Platform

Javascript development

.NET development

cloud computing

server

Copyright (C) avrocks.com, All Rights Reserved.

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