ios - Is there a way To call a Child UIViewController method from Parent UIViewController? -


i'm new in objective-c , problem in (xcode) parent uiviewcontroller monitoring ibeacon's , when user go child uiviewcontroller monitoring still running , need call child vc method parent. if actual closest beacon changed, want alert user "hey! moved! etc.". there proper way it? (sorry bad english , if i'm not specific)

there several ways it.

  1. your parentviewcontroller keep pointer childviewcontroller , call function, write in childviewcontroller, showuseralert. once fired, can show alert.

  2. have parentviewcontroller fire nsnotification nsnotificationcenter. child should listen , act accordingly.

  3. the child should implement delegate , parentviewcontroller should set delegate.

i go first one.


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -