0
투명한 배경을 가진 모달 뷰 컨트롤러를 만들고 싶었지만 배경의 알파를 0.5로 설정하면 뷰가 완전히 뒤틀어졌습니다. 이는 전환 후 배경보기가 제거되기 때문입니다. 투명한 배경을 가진 Objective-C 모달 뷰 컨트롤러
self.view.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.5];
[self setModalPresentationStyle:UIModalPresentationFullScreen];
[self setDefinesPresentationContext:YES];
그런 다음보기를 변경하려면
firstViewController
에서 버튼의 행동이 코드를 시도 링크
image/linke.gif
[iOS - 반투명 모달보기 컨트롤러] 가능한 복제본 (http://stackoverflow.com/questions/18902059/ios-semi-transparent-modal-view-controller) –
정확한 @JamesP .. – vaibhav