UIButton *myButton = [UIButton buttonWithType:UIButtonTypeRoundedRect];
myButton.frame = CGRectMake(40,60, 50, 50);
[myButton setTitle:[NSString stringWithFormat: @"%d",value] forState:UIControlStateNormal];
myButton.tag =6;
[myButton addTarget:self action:@selector(buttonClicked:) forControlEvents:UIControlEventTouchUpInside];