以下のコードはSwift 2ではエラーとなります。
example1.swift
let view = UIView()
view.autoresizingMask = .FlexibleTopMargin | .FlexibleBottomMargin
Type of expression is ambiguous without more context
これはSwift 1.2ではRawOptionSetType
だったものがSwift 2.0でOptionSetType
に変わったためです。
RawOptionSetType
ではビット演算が可能です。
Swift Standard Library Reference OptionSetType Protocol Reference
Swift 2では以下のように記述します。
example2.swift
let view = UIView()
view.autoresizingMask = [.FlexibleTopMargin, .FlexibleBottomMargin]