Philographer

In your main view controller:

func showModal() {
    let modalViewController = ModalViewController()
    modalViewController.modalPresentationStyle = .OverCurrentContext
    presentViewController(modalViewController, animated: true, completion: nil)
}

In your modal view controller:

class ModalViewController: UIViewController {
    override func viewDidLoad() {
        view.backgroundColor = UIColor.clearColor()
        view.opaque = false
    }
}

If you are working with a storyboard:

//In storyBoard
Background = Clear Color
Drawing = Uncheck the Opaque checkbox
Presentation = Over Current Context

Alpha가 view에 지정되었을 때는, view 계층 아래에 속한 자식을 모두에게 alpha가 적용된다.

'IOS > Layout' 카테고리의 다른 글

IOS, iPhone 사이즈  (0) 2016.06.30
Scrollview Autolayout Bug  (0) 2016.06.28
no index path for table cell being reused  (2) 2016.06.27
ScrollView Auto Layout  (0) 2016.06.26
Auto Resize UITextView in Cell  (0) 2016.04.21
댓글 로드 중…

트랙백을 확인할 수 있습니다

URL을 배껴둬서 트랙백을 보낼 수 있습니다