I want to have a button on a screen with this image. this image is transparent from its corners as you can see here.
UIButton *btn=[UIButton buttonWithType:UIButtonTypeCustom];
[btn setFrame:CGRectMake(xCo, yCo, kImageSizeWidth, kImageSizeHeight)];
[btn setImage:[UIImage imageNamed:@"aboveImg.png"] forState:UIControlStateNormal];
[btn addTarget:self action:@selector(btnTapped:) forControlEvents:UIControlEventTouchDown];
But the button tap is recognized out side image & i don't want that kind of functionality.
I mean tap must be recognized only when it is tapped within image not outside image.
How is that possible ?
Thanks in advance for sharing your great knowledge.
Sagar.