0
drawrect 메서드를 사용하고 CGRect UIColor의 알파 값을 조정하여 투명/반투명 오버레이 뷰를 UIImagePickerController에 추가 할 수 있다는 것을 알고 있습니다. 하지만 반투명 효과 대신 흐릿한 효과를 얻을 수 있습니까? 나는 충분히 명확하다 희망한다. 고마워!UIImagePickerController가 흐릿한 오버레이 뷰입니까?
편집 나는 흐린보기를 달성하기 위해이 프레임 워크를 사용
- (void)drawRect:(CGRect)rect{
CGFloat toolbarSize = UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad ? 0 : 80;
CGFloat width = CGRectGetWidth(self.frame);
CGFloat height = CGRectGetHeight(self.frame) - toolbarSize;
CGFloat heightSpan = floor(height/2 - self.cropSize.height/2);
CGFloat widthSpan = floor(width/2 - self.cropSize.width/2);
//fill outer rect
[[UIColor colorWithRed:0. green:0. blue:0. alpha:0.5] set];
UIRectFill(self.bounds);
//fill inner border
[[UIColor colorWithRed:1. green:1. blue:1. alpha:0.5] set];
UIRectFrame(CGRectMake(widthSpan - 1, heightSpan - 1, self.cropSize.width + 2, self.cropSize.height + 2));
//fill inner rect
[[UIColor clearColor] set];
UIRectFill(CGRectMake(widthSpan, heightSpan, self.cropSize.width, self.cropSize.height));
}
}