Search: SegmentedViewController: Added a customisable background image

This commit is contained in:
manuroe 2015-12-07 15:08:17 +01:00
parent d39a7f7ebe
commit d410f18aa5
2 changed files with 20 additions and 3 deletions

View file

@ -27,8 +27,9 @@ limitations under the License.
#pragma mark - Class methods
@property (weak, nonatomic) IBOutlet UIView *selectionContainer;
@property (weak, nonatomic) IBOutlet UIView *viewControllerContainer;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *selectionContainerTopConstraint;
@property (weak, nonatomic) IBOutlet UIView *viewControllerContainer;
@property (weak, nonatomic) IBOutlet UIImageView *backgroundImageView;
/**
The view controller that currently has the focus.

View file

@ -1,12 +1,13 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="8191" systemVersion="14F27" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9060" systemVersion="15B42" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8191"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9051"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="SegmentedViewController">
<connections>
<outlet property="backgroundImageView" destination="KfM-OD-fTP" id="AXh-ac-GWQ"/>
<outlet property="selectionContainer" destination="ynH-uD-aQj" id="taa-CW-XgW"/>
<outlet property="selectionContainerTopConstraint" destination="eLe-5q-IfV" id="UhZ-9k-P1r"/>
<outlet property="view" destination="1TG-Rn-axS" id="WxL-e2-rVK"/>
@ -20,15 +21,30 @@
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ynH-uD-aQj" userLabel="Selection Container">
<rect key="frame" x="0.0" y="0.0" width="600" height="44"/>
<animations/>
<constraints>
<constraint firstAttribute="height" constant="44" id="fZ1-SQ-nxS"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Hbe-uP-aJY" userLabel="Selected UITableView Container">
<rect key="frame" x="0.0" y="44" width="600" height="556"/>
<subviews>
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleAspectFit" translatesAutoresizingMaskIntoConstraints="NO" id="KfM-OD-fTP">
<rect key="frame" x="0.0" y="0.0" width="600" height="556"/>
<animations/>
</imageView>
</subviews>
<animations/>
<color key="tintColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="KfM-OD-fTP" firstAttribute="height" secondItem="Hbe-uP-aJY" secondAttribute="height" id="GBi-kq-bMR"/>
<constraint firstItem="KfM-OD-fTP" firstAttribute="leading" secondItem="Hbe-uP-aJY" secondAttribute="leading" id="cmW-5l-b7z"/>
<constraint firstItem="KfM-OD-fTP" firstAttribute="width" secondItem="Hbe-uP-aJY" secondAttribute="width" id="hVX-eX-wxE"/>
<constraint firstItem="KfM-OD-fTP" firstAttribute="top" secondItem="Hbe-uP-aJY" secondAttribute="top" id="snt-Kj-GGz"/>
</constraints>
</view>
</subviews>
<animations/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="bottom" secondItem="Hbe-uP-aJY" secondAttribute="bottom" id="GHr-ci-L7A"/>