ios - Detecting shake gesture by multiple view controllers -
i need detect shake gesture in ios. have done usual stuff , works fine. thing have multiple view controllers in uitabbarcontroller
, wish each of them detect shake gesture.
when shaking in of view controller , switched particular tab. problem if shake in 1 view controller , try shake in other controller gesture not detected unless action performed in controller.
i know need set becomefirstresponder
need know how can property set current tab of uitabbarcontroller
shake gesture recognised tabs.
write code detection (usually via notification observer shake) in base view controller , and controller subclass this. can write code move particular tab in base controller.
problem solved.
Comments
Post a Comment