ios - creating UIView prevents IBAction being sent -
i trying draw uiview screen while simultaneously moving other ui elements out of it's way. both events triggered same uiswitch. when don't draw uiview ui elements move should, when call action draw uiview, ui elements don't move should. have no idea why happening, appreciated.
here function adds , removes view:
- (ibaction)showhidemynewview:(uiswitch *)sender { if (_myswitch.on) { [self.view addsubview:mynewview]; } else { [mynewview removefromsuperview]; }
here function moves other ui elements make room uiview:
- (ibaction)moveuielementsforpainintensityview:(id)sender { _myswitch = (uiswitch *)sender; if (_myswitch.on) { [_labelone moveto:cgpointmake(50, 350) duration:0.5 option:0]; [_labeltwo moveto:cgpointmake(50, 400) duration:0.5 option:0]; [_labelthree moveto:cgpointmake(50, 450) duration:0.5 option:0]; [_labelfour moveto:cgpointmake(50, 500) duration:0.5 option:0]; } else { [_labelone moveto:cgpointmake(50, 150) duration:0.5 option:0]; [_labeltwo moveto:cgpointmake(50, 200) duration:0.5 option:0]; [_labelthree moveto:cgpointmake(50, 250) duration:0.5 option:0]; [_labelfour moveto:cgpointmake(50, 300) duration:0.5 option:0]; }}
Comments
Post a Comment