Check Mobile App
Read now
Start a Project

How To Create Self Delegate Method In Swift 3.0

Save

Delegate

Sometimes we require to call methods from one viewController1 to another viewcontroller2 and also get data from viewcontroller2 to viewcontroller1

for this, we need to make the link between two viewcontroller so that can communicate when another viewcontroller completes their work.

here I will show two class where the first class name “Home.swift” and all delegate method declare in “Global.swift” class .

1: first we need to define “Global.swift” class its Parent is NSObject

 

2: here I have defined two delegate method (write as the comment) . this method we have to define in Home.swift

3: Now I will show Home.swift class . To call , To receive message

4: Now you can use this technique in any classes .

 

 

 

 

 

 

iOS
. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


Be the first to comment.

css.php

The support is fast and do everything in their power to make it perfect. If you need customization it's also done right away. I had massive research to select Mobikul and now I'm sure it was the right one.

Igor Souza

Igor Souza

Talk to Sales

Global

Live Chat
Start a Project

    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home