0
我已經做了UIImagePicker添加視圖上的UIViewController
UIImagePickerController *picker = [[UIImagePickerController alloc] init];
picker.delegate = self;
picker.allowsEditing = YES;
picker.sourceType = UIImagePickerControllerSourceTypeCamera;
picker.cameraDevice = UIImagePickerControllerCameraDeviceFront;
picker.mediaTypes = [[NSArray alloc] initWithObjects: (NSString *) kUTTypeMovie, nil];
而且我想添加一個半圈,以讓我做到這一點,
CGContextRef gc = UIGraphicsGetCurrentContext();
CGContextBeginPath(gc);
CGContextAddArc(gc, 100, 100, 50, -M_PI_2, M_PI_2, 1);
CGContextClosePath(gc); // could be omitted
CGContextSetFillColorWithColor(gc, [UIColor cyanColor].CGColor);
CGContextFillPath(gc);
UIView *someView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 400, 400)];
[someView.layer renderInContext:gc];
[picker setCameraOverlayView:someView];
但後來當我告訴像這樣的選擇器
[self presentViewController:picker animated:YES completion:NULL];
我沒有看到半圓?這是爲什麼發生?
謝謝
的鏈接斷開 – iqueqiorio
遺憾。現在檢查.. –
好吧謝謝,我只是有點困惑什麼DrawCircleView是什麼? – iqueqiorio