objective c - UitextField resignFirstResponder does not work in scroll view -
i have 2 functions resignfirstresponder neither of them works when textfields in scrollview my functions: -(bool)textfieldshouldreturn:(uitextfield *)thetextfield { if (thetextfield == textfield1) { [textfield1 resignfirstresponder]; } if (thetextfield == textfield2) { [textfield2 resignfirstresponder]; } if (thetextfield == textfield3) { [textfield3 resignfirstresponder]; } return yes; } - (void)touchesbegan:(nsset *)touches withevent:(uievent *)event { uitouch *touch = [[event alltouches] anyobject]; [textfield1 resignfirstresponder]; [textfield2 resignfirstresponder]; [textfield3 resignfirstresponder]; } i have linked scroll view in ib, can not find out why not works there when click outside of scrollview.so responds view, why?i thougth [[event alltouches] anyobject] respond alltouches @ anyobjects thanks help wouldn't bit more elegant add transparent view inherits uicontrol s...