-(void) mymethod{
UIButton *refreshbutton=[UIButton buttonWithType:UIButtonTypeCustom];
[refreshbutton setFrame:CGRectMake(15.0f, 330.0f, 150.0f, 32.0f)];
NSString *myvalue=[[NSString alloc]initWithString😡"YES IT IS OKy |"];
[refreshbutton setTitle😡"Refresh" forState:UIControlStateNormal];
[refreshbutton addTarget:self action😡selector(showvalue: myvalue) forControlEvents:UIControlEventTouchUpInside];
[self.window addSubview:refreshbutton];
}
-(void) showvalue🙁id)sender{
// here how to displs the value of "myvalue" ? myvalue is define in mymethod . i mean first method..
}
pls rectify the error in this code...
UIButton *refreshbutton=[UIButton buttonWithType:UIButtonTypeCustom];
[refreshbutton setFrame:CGRectMake(15.0f, 330.0f, 150.0f, 32.0f)];
NSString *myvalue=[[NSString alloc]initWithString😡"YES IT IS OKy |"];
[refreshbutton setTitle😡"Refresh" forState:UIControlStateNormal];
[refreshbutton addTarget:self action😡selector(showvalue: myvalue) forControlEvents:UIControlEventTouchUpInside];
[self.window addSubview:refreshbutton];
}
-(void) showvalue🙁id)sender{
// here how to displs the value of "myvalue" ? myvalue is define in mymethod . i mean first method..
}
pls rectify the error in this code...