ios - Change First Responder -


is there way change first responder halfway through touch event?

i have popover should dismiss , resignfirstresponder if recognizes uipangesture. however, still keeps firstresponder until second later after has started dismissing.

my goal "drag" uiimageview out of popover mainviewcontroller. when user drags uiimageview in popover, popover should dismiss , new uiimageview should created in maincontrollerview can dragged around.

maincontrollerview.m

-(ibaction)pangesture:(uipangesturerecognizer*)sender {     if (showpiecespopover.ispopovervisible) {         [self.view removegesturerecognizer:pangesturerecognizer];          pangesturerecognizer = [((popovercreatenewboardviewcontroller*)showpiecespopover.contentviewcontroller) pangesturerecognizer];         pangesturerecognizer.delegate = self;         [self.view addgesturerecognizer:pangesturerecognizer];          [showpiecespopover dismisspopoveranimated:yes];     }     if (movingpiece) {         [selectedpieceimageview setcenter:[sender locationinview:self.view]];     } } 

popover.m

-(void)viewwillappear:(bool)animated {     pangesturerecognizer = [[uipangesturerecognizer alloc] initwithtarget:creatorviewcontroller action:@selector(pangesture:)];     [self.view addgesturerecognizer:pangesturerecognizer]; } 

with code uipangesturerecognizer called, second due popover being dismissed firstresponder. how change firstresponder mainviewcontroller's view?

on unrelated note, uipangesturerecognizer not recognize pan if user not move fingers second moves fingers. turning recognizing simultaneous gestures on did not change anything


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -