I have unbutton as below,
taskBtn=[[PNTButton alloc]initWithFrame:CGRectMake(0,0,app.screenwidth,app.screenheight/2)];
[taskBtn setBackgroundColor:[UIColor clearColor]];
[taskBtn addTarget:self action:@selector(taskBtnClicked:) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:taskBtn];
i have drawn a triangle using beizerpath on task button ,when user clicks on triangle i need to change change the background color of triangle but i was unable to change background color.its giving error as:
CGContextSetFillColorWithColor
: invalid context 0x0. This is a serious error. This application, or a library it uses, is using an invalid context and is thereby contributing to an overall degradation of system stability and reliability. This notice is a courtesy: please fix this problem. It will become a fatal error in an upcoming update.
can anyone help me how to change background color of beizerpath triangle when user clicks on it.
Aucun commentaire:
Enregistrer un commentaire