migrate a project KEEPING 2.3 compatibility

Summary:

I did migrate a project KEEPING 2.3 compatibility.

I got some syntax errors:



in XCode 7.3 APIs:


public protocol UIViewControllerContextTransitioning : NSObjectProtocol {

// The view in which the animated transition should take place.

@available(iOS 2.0, *)

public func containerView() -> UIView?


in Xcode 8 APIs is


public func containerView() -> UIView


so no more "?"



Steps to Reproduce:

- open Xcode

- use

let v = transitionContext.containerView()

v!.addSubview(fromView)

v!.addSubview(toView)



- move to XCode 8 and migrate to 2.3



let v = transitionContext.containerView()

v.addSubview(fromView)

v.addSubview(toView)

Xcode will suggest to remove "!"