UIAlertController
(
UIAlertControllerStyleActionSheet
)를 제시 할 때 내
UITableView
(
UITableViewController
돌며을) 흐리게 할
을 jQuery과 흐리게하려고하지만, 그냥 차단합니다. 시뮬레이터와 장치 모두에서 발생합니다.가있는 UITableViewController
- (void)showAlert {
UIBlurEffect *blurEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleLight];
UIVisualEffectView *visualEffectView = [[UIVisualEffectView alloc] initWithEffect:blurEffect];
visualEffectView.frame = CGRectMake(0, self.tableView.contentOffset.y, self.view.frame.size.width, self.view.frame.size.height);
[self.view addSubview:visualEffectView];
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"Alert Title" message:@"Alert Message" preferredStyle:UIAlertControllerStyleActionSheet];
[alert addAction:[UIAlertAction actionWithTitle:@"Action 1" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
// handle choice...
[visualEffectView removeFromSuperview];
}]];
[alert addAction:[UIAlertAction actionWithTitle:@"Action 2" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
// handle choice...
[visualEffectView removeFromSuperview];
}]];
[self presentViewController:alert animated:YES completion:nil];
}
스크린 샷 : 해야지 액션 시트 뒤에 테이블보기에서 텍스트 내용, 예를 들어, 같은 흐리게 게재 될 수는
있다 이 이미지처럼 :
당신은 visualEffectView.frame = self.view.bounds 시도 할 수있다; ? – HMHero
이미 시도했습니다. 차이를 만들지 마십시오 – shim
테스트 한 결과가 나오고 어쨌든 'UIBlurEffect'가 텍스트와 잘 맞지 않는 것으로 보입니다. – shim