0
.xib로 모달 UIView를 만들고 버튼을 클릭하면이 UIView가 표시됩니다. 그러나 presentViewController 오류가 있습니다 : 'UIViewController'호환되지 않는 형식의 매개 변수에 'void'보내기. 귀하의 답변에 감사드립니다.'UIViewController'호환되지 않는 유형의 매개 변수에 'void'보내기
- (void)modal {
modalViewController *mvc = [[modalViewController alloc] initWithNibName:@"modalViewController" bundle:nil];
UIView * modal = [[UIView alloc] initWithFrame:CGRectMake(self.view.center.x/2, self.view.center.y/2, 240, 320)];
modal.backgroundColor = [UIColor whiteColor];
[modal addSubview:mvc.view];
[self.view addSubview:modal];
}
- (IBAction)showBTN:(id)sender {
[self presentViewController:[self modal] animated:YES completion:nil];
}