: , , . - , , . :
let view = UINib(nibName: "ABCView", bundle: nil).instantiateWithOwner(nil, options: nil)[0] as! UIView
view.translatesAutoresizingMaskIntoConstraints = false
, intrinsicContentSize / nib, "", , , , (.. ) / .
Xcode ( Xcode 6 Xcode 7.1).
:
- : , ,
translatesAutoresizingMaskIntoConstraints YES. - : ,
translatesAutoresizingMaskIntoConstraints NO.
...
.xib :
<view contentMode="scaleToFill" id="bU6-qJ-x7d" userLabel="STATIC">
<rect key="frame" x="0.0" y="0.0" width="320" height="439"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<nil key="simulatedStatusBarMetrics"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<point key="canvasLocation" x="687" y="37.5"/>
</view>
:
<UIView: 0x7fec19ccb1b0; frame = (0 0; 320 439); autoresize = W+H; layer = <CALayer: 0x7fec19ccae80>>- translatesAutoresizingMaskIntoConstraints:
- Interface Builder.
.xib :
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="0G6-nE-8IZ" userLabel="CONSTRAINABLE">
<rect key="frame" x="0.0" y="0.0" width="320" height="439"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<nil key="simulatedStatusBarMetrics"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<point key="canvasLocation" x="687" y="-455.5"/>
</view>
:
<UIView: 0x7f9503eb2ba0; frame = (0 0; 320 439); autoresize = RM+BM; layer = <CALayer: 0x7f9503e9dc80>>- translatesAutoresizingMaskIntoConstraints:
- Interface Builder.
:
<autoresizingMask ....- UIView .
- UIView Constrainable view ( - ).
:
- UIView , subview. ( , ).
- , (, ).
- Interface Builder.
- , .
:
: