Circle containing 9 buttons and rotate on button press, iOS? -


i working on project need show 9 buttons on circle , press of button circle should rotate indicator shows button pressed. how achieve in ios?

your suggestions appreciated. please advise.

lets try this

uibutton *button;  button = [uibutton buttonwithtype:uibuttontyperoundedrect]; [button addtarget:self action:@selector(buttonpressed:) forcontrolevents:uicontroleventtouchupinside]; [button settitle:@"show view" forstate:uicontrolstatenormal]; button.frame = cgrectmake(80.0, 210.0, 160.0, 40.0); [self.view addsubview:button];  cabasicanimation *halfturn; halfturn = [cabasicanimation animationwithkeypath:@"transform.rotation"]; halfturn.fromvalue = [nsnumber numberwithfloat:0]; halfturn.tovalue = [nsnumber numberwithfloat:((360*m_pi)/180)]; halfturn.duration = 0.5; halfturn.repeatcount = huge_valf; [[button layer] addanimation:halfturn forkey:@"180"]; 

Comments

Popular posts from this blog

c# - Operator '==' incompatible with operand types 'Guid' and 'Guid' using DynamicExpression.ParseLambda<T, bool> -