Hi.
I have a test to put a UIButton on EAGLView.
However, I will not be able to tap the button located on the right side.
We are testing the correct value of the sample as follows: ImageTargets.
====================
@implementation EAGLView
- (id)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self)
{
// create list of textures we want loading - ARViewController will do this for us
int nTextures = sizeof(textureFilenames) / sizeof(textureFilenames[0]);
for (int i = 0; i < nTextures; ++i)
[textureList addObject: [NSString stringWithUTF8String:textureFilenames[i]]];
UIButton *btnBtn1 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[btnBtn1 setTitle:@"foo" forState:UIControlStateNormal];
[btnBtn1 setTitle:@"Touch!" forState:UIControlStateHighlighted];
btnBtn1.frame = CGRectMake(5, 5, 100, 40);
[self addSubview:btnBtn1];
btnBtn1 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[btnBtn1 setTitle:@"bar" forState:UIControlStateNormal];
[btnBtn1 setTitle:@"Touch!" forState:UIControlStateHighlighted];
btnBtn1.frame = CGRectMake(480 - 100 -5, 5, 100, 40);
[self addSubview:btnBtn1];
btnBtn1 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[btnBtn1 setTitle:@"foo2" forState:UIControlStateNormal];
[btnBtn1 setTitle:@"Touch!" forState:UIControlStateHighlighted];
btnBtn1.frame = CGRectMake(5, 320 - 40 - 5, 100, 40);
[self addSubview:btnBtn1];
btnBtn1 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[btnBtn1 setTitle:@"bar2" forState:UIControlStateNormal];
[btnBtn1 setTitle:@"Touch!" forState:UIControlStateHighlighted];
btnBtn1.frame = CGRectMake(480 - 100 -5, 320 - 40 - 5, 100, 40);
[self addSubview:btnBtn1];
btnBtn1 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[btnBtn1 setTitle:@"center" forState:UIControlStateNormal];
[btnBtn1 setTitle:@"Touch!" forState:UIControlStateHighlighted];
btnBtn1.frame = CGRectMake(0, 0, 100, 40);
btnBtn1.center = CGPointMake(480 / 2, 320 / 2);
[self addSubview:btnBtn1];
}
return self;
}
====================
You can tap the button foo, foo2 button, center button, however, bar buttons, bar2 button can not be tapped.
My environment is as follows.
MacOS version:10.6.8
Xcode version:4.2 build 4C199
Device model:iPhone4S[iOS:5.0.1(9A406))]
Since we are using machine translation, sorry was hard to read.
Nevermind. I found what you were referring to in the Vuforia SDK samples folder.