iphone - Ios app icon class -
is there ui class corresponds app icons on home screen?
or kind of button similar , has method wobble effect?
short answer, no.
it's developer recreate these effects using sdk. it's simple enough make custom uibutton image (app icon). it's matter of adding in appropriate long press gesture handling activate editable status of button , start wiggling.
-(void)viewdidload { // make uibutton uibutton *mywigglebutton = [uibutton buttonwithtype:uibuttontypecustom]; // set image button [mywigglebutton setimage:[uiimage imagenamed:@"my_app_image.png"] forstate:uicontrolstatenormal]; // add action , target button [mywigglebutton addtarget:self action:@selector(mybuttontapped:) forcontrolevents:uicontroleventtouchupinside]; // add long touch gesture recognizer uilongpressgesturerecognizer *longpressgesture = [[[uilongpressgesturerecognizer alloc] initwithtarget:self action:@selector(startwigglemode:)] autorelease]; [mywigglebutton addgesturerecognizer:longpressgesture]; } -(void)startwigglemode:(uigesturerecognizer*)recognizer { // start wiggling animation button. // add uibutton 'x' on top of wiggling button } -(void)mybuttontapped:(id)sender { // handle button tap case here. }
Comments
Post a Comment