ios - shouldSelectViewController not getting called -
i trying call shouldselectviewcontroller delegate function. doesnt seem work.
i did following, still function doesnt called
.h
@interface myappdelegate : uiresponder <uiapplicationdelegate, uitabbarcontrollerdelegate> @property (strong, nonatomic) uiwindow *window; @end
.m
@implementation takefivecameraappdelegate @synthesize window; - (bool)application:(uiapplication *)application didfinishlaunchingwithoptions:(nsdictionary *)launchoptions { uitabbarcontroller *tabbarcontroller = (uitabbarcontroller *)self.window.rootviewcontroller; tabbarcontroller.delegate = (id)self; return yes; } - (bool)tabbarcontroller:(uitabbarcontroller *)tabbarcontroller shouldselectviewcontroller:(uiviewcontroller *)viewcontroller { nslog(@"test"); return yes; } @end
i not sure missing here.
Comments
Post a Comment