一直在尋找這幾天..爲什麼我的UIButton不能顯示我的cameraOverlayView?
- (void)viewDidAppear:(BOOL)animated {
#if !TARGET_IPHONE_SIMULATOR
UIButton *returnButton = [UIButton buttonWithType:UIButtonTypeRoundedRect];
returnButton.frame = CGRectMake(0, 0, 100, 100);
[returnButton setTitle:@"Tap here to return" forState:UIControlStateNormal];
[returnButton addTarget:self action:@selector(buttonClicked:) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:returnButton];
[self.view bringSubviewToFront:returnButton];
[[self cameraController] setCameraOverlayView:[self view]];
[self presentModalViewController:[self cameraController] animated:YES];
[[self view] setFrame:[[[self cameraController] view] bounds]];
#endif
[super viewDidAppear:animated];
}