G'day guys,
I currently have a really weird bug with touches being responded to in my UIImageView. I have a gallery pane in my iPad app, which is just a background imageview, and then a series of six UIImageViews that the user can touch to change the background view, organised like:
1 2
3 4
5 6
On the right side of the app. The buttons on the left side are responding to touches fine, but the buttons on the right initially only respond to touches on the say top left quarter of the imageview. If I move to another view and then return, they respond to touches at any point in their imageview.
EDIT: adding in UIImageView code
_gal1 = [[GalleryImageView alloc] initWithFrame:CGRectMake(405,15,292,207)];
[_gal1 setImageName:@"1"];
_gal1.image = [UIImage imageNamed:@"iPad_thumb1.png"];
[_gal1 setUserInteractionEnabled:YES];
[_gal1 setDelegate:self];
[_gal1 setOpaque:YES];
[_gal1 setBackgroundColor:[[UIColor blackColor] colorWithAlphaComponent:1.0]];
//Background view is the view controller's main view
[_backgroundView addSubview:_gal1];
The code for the custom UIImageView just overrides the touches event and pings the delegate. The touches event is never fired upon the initial load.
The entire view is drawn up programatically, and I've done touch detection in the UIImageView subclass I'm using, to no avail.
Any idea what this quirk is or what I can do to fix it?