selectgroup = [UIButton buttonWithType:UIButtonTypeCustom];
selectgroup.frame = CGRectMake(screenWidth/4-23/2, 158, 23, 23) ;
selectgroup.hidden = NO;
UIImage *selectgroupimg = [UIImage imageNamed:@"groupicon2.png"];
[selectgroup setBackgroundImage:selectgroupimg forState:UIControlStateNormal];
//[selectgroup setcontentEdgeInsets : UIEdgeInsetsMake(0, 150, screenWidht/2, 30)];
[selectgroup addTarget:self action:@selector(selectgroup:) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:selectgroup];
I want to increase the clickable area of the button to (0,150,screenwidth/2,30)
.
I have try to set contentEdgeInsets
and imageEdgeinsets
but both doesn't work.
How can I do that?