0
저는 ar보기를 가로 모드로 설정하는 방법을 알고 싶습니다. ARToolkit, 가로 모드에서보기를 설정하는 방법
NSLog(@"bound %@",NSStringFromCGRect([self.view bounds]));
NSLog(@"bound %@",NSStringFromCGRect([[UIScreen mainScreen] bounds]));
glView = [[ARView alloc] initWithFrame:[[self view] bounds] pixelFormat:kEAGLColorFormatRGBA8 depthFormat:GL_DEPTH_COMPONENT16_OES stencilFormat:0 preserveBackbuffer:NO];
glView.arViewController = self;
self.view = glView;
UIToolbar *toolbar = [[UIToolbar alloc] init];
toolbar.frame = CGRectMake(0, 255, 480, 44);
toolbar.barStyle = UIBarStyleBlack;
NSMutableArray *items = [[NSMutableArray alloc] init];
[items addObject:[[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self action:@selector(stopAR:)] autorelease]];
[toolbar setItems:items animated:NO];
[items release];
[self.view addSubview:toolbar];
[toolbar release];
는이 작업을 수행 할 이유가 궁금이 있지만 효과
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
[super shouldAutorotateToInterfaceOrientation:interfaceOrientation];
return UIInterfaceOrientationIsLandscape(interfaceOrientation);
}
오버레이보기를 추가하는 방법을 알려주세요. – Desmond
ARView에 하위보기를 추가하여 오버레이보기를 추가하십시오. – Mark