ios - UIKeyboard notification handler triggered 3 times -


my code:

-(void)viewwillappear:(bool)animated {     [[nsnotificationcenter defaultcenter] addobserver:self selector:@selector(handlekeyboard:) name:uikeyboardwillchangeframenotification object:nil]; }  -(void)viewwilldisappear:(bool)animated {     [[nsnotificationcenter defaultcenter] removeobserver:self]; }  -(void)handlekeyboard:(nsnotification*)notification {   nslog(@"triggered"); } 

see:

enter image description here

the disappearing handler triggered once normal, 3 times when appears. ios bug?

possibly not helpful problem need calling [super viewwill… overrides.

-(void)viewwillappear:(bool)animated

-(void)viewwilldisappear:(bool)animated

from docs.

if override method, must call super @ point in implementation.


Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -