Compare commits
55 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| bd2a64b881 | |||
| 403a63ec1f | |||
| 4d3d916b07 | |||
| 6ef46a6026 | |||
| 5f376c5e85 | |||
| 0ca45c77c4 | |||
| 2c3c6f6089 | |||
| 31ecb76df2 | |||
| e98e09c8c6 | |||
| 82c6bf29e1 | |||
| 772ab0c53e | |||
| 6aba1f17ed | |||
| 970c64620d | |||
| ccffa8600b | |||
| cb01471cdc | |||
| 103e71e508 | |||
| 77b119d4d5 | |||
| f2d5882614 | |||
| ac0d5991e0 | |||
| 33715f3154 | |||
| cd506db478 | |||
| 9a89d1bd5c | |||
| 8495a150ed | |||
| 8c4ecfb86b | |||
| 3661646d54 | |||
| 3f1bb84308 | |||
| 8c12875aa2 | |||
| fa203c250e | |||
| f60922b38a | |||
| d18edfbae2 | |||
| 1347ce56ee | |||
| 9dc985bf3b | |||
| 764e3f9bc6 | |||
| a4fc47d5b0 | |||
| 38ef82c4df | |||
| 53f60c3287 | |||
| 95fe4f2cbc | |||
| 19e286bee9 | |||
| 0f83bf6e1b | |||
| 9d20dbbf42 | |||
| 7a602ab61b | |||
| 1904ca3e10 | |||
| f521bce859 | |||
| f2d4146782 | |||
| 06fd66c537 | |||
| 61430b0194 | |||
| ab8b4c979e | |||
| dbe81fe484 | |||
| 08eaf70f62 | |||
| 134e764100 | |||
| f2be2d3c29 | |||
| e196fc711b | |||
| 368501511d | |||
| d88235b028 | |||
| 23b93a1a70 |
+1
-1
@@ -1,5 +1,5 @@
|
||||
language: objective-c
|
||||
osx_image: xcode6.4
|
||||
osx_image: xcode7.2
|
||||
before_install:
|
||||
- gem install cocoapods --no-rdoc --no-ri --no-document --quiet
|
||||
- gem install xcpretty --no-rdoc --no-ri --no-document --quiet
|
||||
|
||||
+2
-4
@@ -31,7 +31,6 @@
|
||||
|
||||
NSString * const XLFormRowDescriptorTypeFloatLabeledTextField = @"XLFormRowDescriptorTypeFloatLabeledTextField";
|
||||
|
||||
const static CGFloat kHMargin = 15.0f;
|
||||
const static CGFloat kVMargin = 8.0f;
|
||||
const static CGFloat kFloatingLabelFontSize = 11.0f;
|
||||
|
||||
@@ -155,10 +154,9 @@ const static CGFloat kFloatingLabelFontSize = 11.0f;
|
||||
NSMutableArray * result = [[NSMutableArray alloc] init];
|
||||
|
||||
NSDictionary * views = @{@"floatLabeledTextField": self.floatLabeledTextField};
|
||||
NSDictionary *metrics = @{@"hMargin":@(kHMargin),
|
||||
@"vMargin":@(kVMargin)};
|
||||
NSDictionary *metrics = @{@"vMargin":@(kVMargin)};
|
||||
|
||||
[result addObjectsFromArray:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-(hMargin)-[floatLabeledTextField]-(hMargin)-|"
|
||||
[result addObjectsFromArray:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-[floatLabeledTextField]-|"
|
||||
options:0
|
||||
metrics:metrics
|
||||
views:views]];
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6250" systemVersion="14A389" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="8191" systemVersion="14F27" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6244"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8154"/>
|
||||
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
@@ -10,11 +11,12 @@
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="OGo-4x-YLf" customClass="XLFormRatingCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="478" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="OGo-4x-YLf" id="hV6-xt-6pq">
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" tableViewCell="OGo-4x-YLf" id="hV6-xt-6pq">
|
||||
<rect key="frame" x="0.0" y="0.0" width="478" height="43"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="yhI-dj-sRk" customClass="XLRatingView">
|
||||
<rect key="frame" x="353" y="11" width="115" height="22"/>
|
||||
<rect key="frame" x="355" y="11" width="115" height="22"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="22" id="85e-Ov-qM7"/>
|
||||
@@ -22,28 +24,21 @@
|
||||
</constraints>
|
||||
</view>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Rate" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Vxp-gw-YTt">
|
||||
<rect key="frame" x="15" y="11" width="338" height="21"/>
|
||||
<rect key="frame" x="8" y="11" width="347" height="21"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="21" id="IK4-8e-SFs"/>
|
||||
<constraint firstAttribute="width" constant="150" id="hNG-F9-1wj"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
<variation key="default">
|
||||
<mask key="constraints">
|
||||
<exclude reference="hNG-F9-1wj"/>
|
||||
</mask>
|
||||
</variation>
|
||||
</label>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottom" secondItem="Vxp-gw-YTt" secondAttribute="bottom" constant="11" id="0Qz-iR-Tzb"/>
|
||||
<constraint firstAttribute="centerY" secondItem="Vxp-gw-YTt" secondAttribute="centerY" id="4Vh-2e-m2p"/>
|
||||
<constraint firstAttribute="trailing" secondItem="yhI-dj-sRk" secondAttribute="trailing" constant="10" id="NPC-r7-JFl"/>
|
||||
<constraint firstAttribute="centerY" secondItem="yhI-dj-sRk" secondAttribute="centerY" id="Vw4-h8-wId"/>
|
||||
<constraint firstItem="Vxp-gw-YTt" firstAttribute="leading" secondItem="hV6-xt-6pq" secondAttribute="leading" constant="15" id="Xgq-Cy-zLQ"/>
|
||||
<constraint firstAttribute="trailingMargin" secondItem="yhI-dj-sRk" secondAttribute="trailing" id="W8E-PI-peE"/>
|
||||
<constraint firstItem="Vxp-gw-YTt" firstAttribute="top" secondItem="hV6-xt-6pq" secondAttribute="top" constant="11" id="bgO-t8-Rjz"/>
|
||||
<constraint firstItem="Vxp-gw-YTt" firstAttribute="leading" secondItem="hV6-xt-6pq" secondAttribute="leadingMargin" id="mVS-0p-p0O"/>
|
||||
<constraint firstItem="yhI-dj-sRk" firstAttribute="leading" secondItem="Vxp-gw-YTt" secondAttribute="trailing" id="n0B-tg-Pik"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6250" systemVersion="14A389" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="8191" systemVersion="14F27" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6244"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8154"/>
|
||||
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
@@ -10,11 +11,12 @@
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" rowHeight="60" id="piA-L5-eiN" customClass="XLFormWeekDaysCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="382" height="50"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="piA-L5-eiN" id="Yr6-3E-keb">
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" tableViewCell="piA-L5-eiN" id="Yr6-3E-keb">
|
||||
<rect key="frame" x="0.0" y="0.0" width="382" height="49"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ZAg-Me-yKR">
|
||||
<rect key="frame" x="5" y="0.0" width="53" height="49"/>
|
||||
<rect key="frame" x="8" y="0.0" width="52" height="49"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="16"/>
|
||||
<state key="normal" title="S">
|
||||
<color key="titleColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
@@ -28,14 +30,14 @@
|
||||
</connections>
|
||||
</button>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="UjQ-Cw-7wH" userLabel="separator 1">
|
||||
<rect key="frame" x="58" y="10" width="1" height="29"/>
|
||||
<rect key="frame" x="60" y="10" width="1" height="29"/>
|
||||
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="1" id="K3N-3h-MZr"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="N3w-qP-kRZ">
|
||||
<rect key="frame" x="58" y="0.0" width="53" height="49"/>
|
||||
<rect key="frame" x="60" y="0.0" width="53" height="49"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="16"/>
|
||||
<state key="normal" title="M">
|
||||
<color key="titleColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
@@ -46,14 +48,14 @@
|
||||
</connections>
|
||||
</button>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="kwc-0w-V51" userLabel="separator 2">
|
||||
<rect key="frame" x="111" y="10" width="1" height="29"/>
|
||||
<rect key="frame" x="113" y="10" width="1" height="29"/>
|
||||
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="1" id="3mE-sT-ql1"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="cPl-47-rS8">
|
||||
<rect key="frame" x="111" y="0.0" width="53" height="49"/>
|
||||
<rect key="frame" x="113" y="0.0" width="52" height="49"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="16"/>
|
||||
<state key="normal" title="T">
|
||||
<color key="titleColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
@@ -64,14 +66,14 @@
|
||||
</connections>
|
||||
</button>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="EiN-2p-Oig" userLabel="separator 3">
|
||||
<rect key="frame" x="164" y="10" width="1" height="29"/>
|
||||
<rect key="frame" x="165" y="10" width="1" height="29"/>
|
||||
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="1" id="JyW-GC-0A7"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="6iC-Cl-RyI">
|
||||
<rect key="frame" x="164" y="0.0" width="54" height="49"/>
|
||||
<rect key="frame" x="165" y="0.0" width="52" height="49"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="16"/>
|
||||
<state key="normal" title="W">
|
||||
<color key="titleColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
@@ -82,14 +84,14 @@
|
||||
</connections>
|
||||
</button>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="bRc-5e-QAH" userLabel="separator 4">
|
||||
<rect key="frame" x="218" y="10" width="1" height="29"/>
|
||||
<rect key="frame" x="217" y="10" width="1" height="29"/>
|
||||
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="1" id="W9F-iR-Leh"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="eTo-Ip-reh">
|
||||
<rect key="frame" x="218" y="0.0" width="53" height="49"/>
|
||||
<rect key="frame" x="217" y="0.0" width="52" height="49"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="16"/>
|
||||
<state key="normal" title="T">
|
||||
<color key="titleColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
@@ -100,14 +102,14 @@
|
||||
</connections>
|
||||
</button>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="dHj-rj-mjh" userLabel="separator 5">
|
||||
<rect key="frame" x="271" y="10" width="1" height="29"/>
|
||||
<rect key="frame" x="269" y="10" width="1" height="29"/>
|
||||
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="1" id="h5U-x0-9nJ"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Wjb-tu-QEo">
|
||||
<rect key="frame" x="271" y="0.0" width="53" height="49"/>
|
||||
<rect key="frame" x="269" y="0.0" width="53" height="49"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="16"/>
|
||||
<state key="normal" title="F">
|
||||
<color key="titleColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
@@ -118,14 +120,14 @@
|
||||
</connections>
|
||||
</button>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="L7g-lu-boa" userLabel="separator 6">
|
||||
<rect key="frame" x="324" y="10" width="1" height="29"/>
|
||||
<rect key="frame" x="322" y="10" width="1" height="29"/>
|
||||
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="1" id="81t-Xh-wZT"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="LNf-b4-GYP">
|
||||
<rect key="frame" x="324" y="0.0" width="53" height="49"/>
|
||||
<rect key="frame" x="322" y="0.0" width="52" height="49"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="16"/>
|
||||
<state key="normal" title="S">
|
||||
<color key="titleColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
@@ -137,15 +139,9 @@
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="ZAg-Me-yKR" firstAttribute="leading" secondItem="Yr6-3E-keb" secondAttribute="leading" constant="5" id="0EB-cP-ogn"/>
|
||||
<constraint firstItem="6iC-Cl-RyI" firstAttribute="width" secondItem="cPl-47-rS8" secondAttribute="width" id="1ZI-HN-9ew"/>
|
||||
<constraint firstItem="cPl-47-rS8" firstAttribute="leading" secondItem="N3w-qP-kRZ" secondAttribute="trailing" id="1pQ-h0-SEG"/>
|
||||
<constraint firstItem="eTo-Ip-reh" firstAttribute="leading" secondItem="6iC-Cl-RyI" secondAttribute="trailing" constant="1" id="2UA-Ao-KZF"/>
|
||||
<constraint firstItem="dHj-rj-mjh" firstAttribute="height" secondItem="L7g-lu-boa" secondAttribute="height" id="4dj-Xx-ksP"/>
|
||||
<constraint firstAttribute="bottom" secondItem="EiN-2p-Oig" secondAttribute="bottom" constant="10" id="5eK-Bu-wpU"/>
|
||||
<constraint firstItem="N3w-qP-kRZ" firstAttribute="leading" secondItem="ZAg-Me-yKR" secondAttribute="trailing" id="67F-sV-r6W"/>
|
||||
<constraint firstItem="Wjb-tu-QEo" firstAttribute="leading" secondItem="dHj-rj-mjh" secondAttribute="trailing" id="6ZX-Ub-2vw"/>
|
||||
<constraint firstItem="EiN-2p-Oig" firstAttribute="height" secondItem="bRc-5e-QAH" secondAttribute="height" id="7Um-cV-f7p"/>
|
||||
<constraint firstItem="LNf-b4-GYP" firstAttribute="trailing" secondItem="Yr6-3E-keb" secondAttribute="trailingMargin" id="7Kc-RO-8KK"/>
|
||||
<constraint firstItem="LNf-b4-GYP" firstAttribute="top" secondItem="Yr6-3E-keb" secondAttribute="top" id="7YT-x4-m88"/>
|
||||
<constraint firstItem="6iC-Cl-RyI" firstAttribute="trailing" secondItem="bRc-5e-QAH" secondAttribute="leading" id="ABd-MQ-9sp"/>
|
||||
<constraint firstAttribute="bottom" secondItem="UjQ-Cw-7wH" secondAttribute="bottom" constant="10" id="ASC-xR-Yxa"/>
|
||||
@@ -153,87 +149,43 @@
|
||||
<constraint firstItem="6iC-Cl-RyI" firstAttribute="top" secondItem="Yr6-3E-keb" secondAttribute="top" id="Aac-10-vTs"/>
|
||||
<constraint firstItem="eTo-Ip-reh" firstAttribute="leading" secondItem="6iC-Cl-RyI" secondAttribute="trailing" id="BL5-PL-pac"/>
|
||||
<constraint firstAttribute="bottom" secondItem="ZAg-Me-yKR" secondAttribute="bottom" id="BeZ-ar-qMN"/>
|
||||
<constraint firstItem="dHj-rj-mjh" firstAttribute="height" secondItem="bRc-5e-QAH" secondAttribute="height" id="DYn-Cd-g5H"/>
|
||||
<constraint firstAttribute="bottom" secondItem="kwc-0w-V51" secondAttribute="bottom" constant="10" id="EXu-BP-ftM"/>
|
||||
<constraint firstAttribute="bottom" secondItem="LNf-b4-GYP" secondAttribute="bottom" id="EYe-ne-rqO"/>
|
||||
<constraint firstItem="cPl-47-rS8" firstAttribute="leading" secondItem="N3w-qP-kRZ" secondAttribute="trailing" id="Fo8-Tp-bkn"/>
|
||||
<constraint firstItem="dHj-rj-mjh" firstAttribute="top" secondItem="Yr6-3E-keb" secondAttribute="top" constant="10" id="GYq-pf-vR0"/>
|
||||
<constraint firstItem="cPl-47-rS8" firstAttribute="leading" secondItem="UjQ-Cw-7wH" secondAttribute="trailing" constant="72" id="HQ2-jA-X9g"/>
|
||||
<constraint firstItem="Wjb-tu-QEo" firstAttribute="leading" secondItem="eTo-Ip-reh" secondAttribute="trailing" id="I0s-Ze-pwV"/>
|
||||
<constraint firstAttribute="bottom" secondItem="bRc-5e-QAH" secondAttribute="bottom" constant="10" id="InL-Hk-twg"/>
|
||||
<constraint firstItem="UjQ-Cw-7wH" firstAttribute="leading" secondItem="ZAg-Me-yKR" secondAttribute="trailing" id="Jj4-jg-rdr"/>
|
||||
<constraint firstItem="6iC-Cl-RyI" firstAttribute="leading" secondItem="cPl-47-rS8" secondAttribute="trailing" id="KQe-Ei-8jY"/>
|
||||
<constraint firstItem="cPl-47-rS8" firstAttribute="top" secondItem="Yr6-3E-keb" secondAttribute="top" id="Kw5-3R-qXs"/>
|
||||
<constraint firstItem="bRc-5e-QAH" firstAttribute="top" secondItem="Yr6-3E-keb" secondAttribute="top" constant="10" id="MXG-vB-U8F"/>
|
||||
<constraint firstItem="ZAg-Me-yKR" firstAttribute="width" secondItem="N3w-qP-kRZ" secondAttribute="width" id="Mem-UJ-5Js"/>
|
||||
<constraint firstItem="L7g-lu-boa" firstAttribute="top" secondItem="Yr6-3E-keb" secondAttribute="top" constant="10" id="OVT-GJ-zq8"/>
|
||||
<constraint firstItem="kwc-0w-V51" firstAttribute="leading" secondItem="cPl-47-rS8" secondAttribute="trailing" constant="25" id="OYQ-8o-3j8"/>
|
||||
<constraint firstItem="N3w-qP-kRZ" firstAttribute="width" secondItem="cPl-47-rS8" secondAttribute="width" id="Pl6-Xd-Krq"/>
|
||||
<constraint firstItem="Wjb-tu-QEo" firstAttribute="width" secondItem="LNf-b4-GYP" secondAttribute="width" id="Pro-fg-wBA"/>
|
||||
<constraint firstAttribute="bottom" secondItem="6iC-Cl-RyI" secondAttribute="bottom" id="Q5M-8N-hIh"/>
|
||||
<constraint firstItem="UjQ-Cw-7wH" firstAttribute="top" secondItem="Yr6-3E-keb" secondAttribute="top" constant="10" id="RGn-ja-FRD"/>
|
||||
<constraint firstAttribute="trailing" secondItem="LNf-b4-GYP" secondAttribute="trailing" constant="5" id="RlS-d5-rIx"/>
|
||||
<constraint firstItem="kwc-0w-V51" firstAttribute="trailing" secondItem="cPl-47-rS8" secondAttribute="leading" id="Rs4-Pl-R8X"/>
|
||||
<constraint firstItem="eTo-Ip-reh" firstAttribute="leading" secondItem="bRc-5e-QAH" secondAttribute="trailing" id="SO9-U6-cVO"/>
|
||||
<constraint firstAttribute="bottom" secondItem="N3w-qP-kRZ" secondAttribute="bottom" id="STf-aE-Y2E"/>
|
||||
<constraint firstAttribute="bottom" secondItem="kwc-0w-V51" secondAttribute="bottom" constant="10" id="SWG-oy-aZJ"/>
|
||||
<constraint firstItem="kwc-0w-V51" firstAttribute="top" secondItem="Yr6-3E-keb" secondAttribute="top" constant="10" id="TAb-IV-m7A"/>
|
||||
<constraint firstAttribute="bottom" secondItem="cPl-47-rS8" secondAttribute="bottom" id="Tmp-md-564"/>
|
||||
<constraint firstItem="kwc-0w-V51" firstAttribute="height" secondItem="UjQ-Cw-7wH" secondAttribute="height" id="Uli-Qb-6Om"/>
|
||||
<constraint firstItem="6iC-Cl-RyI" firstAttribute="leading" secondItem="cPl-47-rS8" secondAttribute="trailing" id="VcV-kz-XBb"/>
|
||||
<constraint firstItem="eTo-Ip-reh" firstAttribute="width" secondItem="6iC-Cl-RyI" secondAttribute="width" id="X0k-jG-o63"/>
|
||||
<constraint firstItem="Wjb-tu-QEo" firstAttribute="leading" secondItem="eTo-Ip-reh" secondAttribute="trailing" id="cOc-P1-ZhU"/>
|
||||
<constraint firstItem="LNf-b4-GYP" firstAttribute="leading" secondItem="Wjb-tu-QEo" secondAttribute="trailing" id="dSr-cr-ebR"/>
|
||||
<constraint firstItem="EiN-2p-Oig" firstAttribute="top" secondItem="Yr6-3E-keb" secondAttribute="top" constant="10" id="fgT-6k-CaP"/>
|
||||
<constraint firstItem="LNf-b4-GYP" firstAttribute="leading" secondItem="Wjb-tu-QEo" secondAttribute="trailing" id="gNl-wJ-ujY"/>
|
||||
<constraint firstItem="ZAg-Me-yKR" firstAttribute="top" secondItem="Yr6-3E-keb" secondAttribute="top" id="glN-lT-q1z"/>
|
||||
<constraint firstItem="eTo-Ip-reh" firstAttribute="width" secondItem="Wjb-tu-QEo" secondAttribute="width" id="hEH-9C-pGZ"/>
|
||||
<constraint firstItem="EiN-2p-Oig" firstAttribute="height" secondItem="kwc-0w-V51" secondAttribute="height" id="hOI-fd-H7m"/>
|
||||
<constraint firstItem="eTo-Ip-reh" firstAttribute="top" secondItem="Yr6-3E-keb" secondAttribute="top" id="i5C-wG-rRN"/>
|
||||
<constraint firstItem="eTo-Ip-reh" firstAttribute="trailing" secondItem="dHj-rj-mjh" secondAttribute="leading" id="jsw-H6-2gQ"/>
|
||||
<constraint firstItem="kwc-0w-V51" firstAttribute="leading" secondItem="cPl-47-rS8" secondAttribute="trailing" id="lQE-r9-9JT"/>
|
||||
<constraint firstAttribute="bottom" secondItem="L7g-lu-boa" secondAttribute="bottom" constant="10" id="lv1-xB-0zR"/>
|
||||
<constraint firstItem="kwc-0w-V51" firstAttribute="leading" secondItem="N3w-qP-kRZ" secondAttribute="trailing" id="oQe-Qf-9ZO"/>
|
||||
<constraint firstItem="Wjb-tu-QEo" firstAttribute="top" secondItem="Yr6-3E-keb" secondAttribute="top" id="pn7-s8-fDj"/>
|
||||
<constraint firstItem="EiN-2p-Oig" firstAttribute="leading" secondItem="cPl-47-rS8" secondAttribute="trailing" id="qIf-aB-2ZY"/>
|
||||
<constraint firstItem="6iC-Cl-RyI" firstAttribute="leading" secondItem="EiN-2p-Oig" secondAttribute="trailing" id="sAE-Nl-Puc"/>
|
||||
<constraint firstItem="LNf-b4-GYP" firstAttribute="leading" secondItem="L7g-lu-boa" secondAttribute="trailing" id="t1q-Nc-vbg"/>
|
||||
<constraint firstItem="kwc-0w-V51" firstAttribute="top" secondItem="Yr6-3E-keb" secondAttribute="top" constant="10" id="tVL-uj-6Ma"/>
|
||||
<constraint firstItem="Wjb-tu-QEo" firstAttribute="trailing" secondItem="L7g-lu-boa" secondAttribute="leading" id="u3Q-pF-E3A"/>
|
||||
<constraint firstAttribute="bottom" secondItem="Wjb-tu-QEo" secondAttribute="bottom" id="uh4-LM-Ieo"/>
|
||||
<constraint firstItem="kwc-0w-V51" firstAttribute="leading" secondItem="cPl-47-rS8" secondAttribute="trailing" constant="25" id="vrx-0B-GOB"/>
|
||||
<constraint firstItem="ZAg-Me-yKR" firstAttribute="leading" secondItem="Yr6-3E-keb" secondAttribute="leadingMargin" id="w9K-VP-JpE"/>
|
||||
<constraint firstAttribute="bottom" secondItem="eTo-Ip-reh" secondAttribute="bottom" id="xIu-Vy-Nff"/>
|
||||
<constraint firstItem="N3w-qP-kRZ" firstAttribute="leading" secondItem="UjQ-Cw-7wH" secondAttribute="trailing" id="xWy-Uf-QEm"/>
|
||||
<constraint firstItem="N3w-qP-kRZ" firstAttribute="leading" secondItem="ZAg-Me-yKR" secondAttribute="trailing" id="xsx-BM-yQ5"/>
|
||||
<constraint firstItem="N3w-qP-kRZ" firstAttribute="top" secondItem="Yr6-3E-keb" secondAttribute="top" id="yEX-Wv-CZQ"/>
|
||||
</constraints>
|
||||
<variation key="default">
|
||||
<mask key="constraints">
|
||||
<exclude reference="67F-sV-r6W"/>
|
||||
<exclude reference="xWy-Uf-QEm"/>
|
||||
<exclude reference="1pQ-h0-SEG"/>
|
||||
<exclude reference="HQ2-jA-X9g"/>
|
||||
<exclude reference="OYQ-8o-3j8"/>
|
||||
<exclude reference="Rs4-Pl-R8X"/>
|
||||
<exclude reference="SWG-oy-aZJ"/>
|
||||
<exclude reference="TAb-IV-m7A"/>
|
||||
<exclude reference="Uli-Qb-6Om"/>
|
||||
<exclude reference="lQE-r9-9JT"/>
|
||||
<exclude reference="vrx-0B-GOB"/>
|
||||
<exclude reference="KQe-Ei-8jY"/>
|
||||
<exclude reference="sAE-Nl-Puc"/>
|
||||
<exclude reference="7Um-cV-f7p"/>
|
||||
<exclude reference="hOI-fd-H7m"/>
|
||||
<exclude reference="2UA-Ao-KZF"/>
|
||||
<exclude reference="SO9-U6-cVO"/>
|
||||
<exclude reference="6ZX-Ub-2vw"/>
|
||||
<exclude reference="cOc-P1-ZhU"/>
|
||||
<exclude reference="4dj-Xx-ksP"/>
|
||||
<exclude reference="DYn-Cd-g5H"/>
|
||||
<exclude reference="dSr-cr-ebR"/>
|
||||
<exclude reference="t1q-Nc-vbg"/>
|
||||
</mask>
|
||||
</variation>
|
||||
</tableViewCellContentView>
|
||||
<connections>
|
||||
<outlet property="fridayButton" destination="Wjb-tu-QEo" id="AcP-Qg-i9P"/>
|
||||
@@ -244,7 +196,7 @@
|
||||
<outlet property="tuesdayButton" destination="cPl-47-rS8" id="wIn-mO-cUx"/>
|
||||
<outlet property="wednesdayButton" destination="6iC-Cl-RyI" id="GQe-Oy-pcd"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="296" y="222"/>
|
||||
<point key="canvasLocation" x="443" y="197"/>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
</document>
|
||||
|
||||
@@ -89,7 +89,7 @@ NSString * const kValidations= @"Validations";
|
||||
|
||||
// NativeEventFormViewController
|
||||
row = [XLFormRowDescriptor formRowDescriptorWithTag:@"realExamples" rowType:XLFormRowDescriptorTypeButton title:@"iOS Calendar Event Form"];
|
||||
row.action.formSegueIdenfifier = @"NativeEventNavigationViewControllerSegue";
|
||||
row.action.formSegueIdentifier = @"NativeEventNavigationViewControllerSegue";
|
||||
[section addFormRow:row];
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@ NSString * const kValidations= @"Validations";
|
||||
|
||||
// Selectors
|
||||
row = [XLFormRowDescriptor formRowDescriptorWithTag:kSelectors rowType:XLFormRowDescriptorTypeButton title:@"Selectors"];
|
||||
row.action.formSegueIdenfifier = @"SelectorsFormViewControllerSegue";
|
||||
row.action.formSegueIdentifier = @"SelectorsFormViewControllerSegue";
|
||||
[section addFormRow:row];
|
||||
|
||||
// Dates
|
||||
@@ -115,7 +115,7 @@ NSString * const kValidations= @"Validations";
|
||||
|
||||
// Others
|
||||
row = [XLFormRowDescriptor formRowDescriptorWithTag:kOthes rowType:XLFormRowDescriptorTypeButton title:@"Other Rows"];
|
||||
row.action.formSegueIdenfifier = @"OthersFormViewControllerSegue";
|
||||
row.action.formSegueIdentifier = @"OthersFormViewControllerSegue";
|
||||
[section addFormRow:row];
|
||||
|
||||
section = [XLFormSectionDescriptor formSectionWithTitle:@"Multivalued example"];
|
||||
@@ -166,22 +166,22 @@ NSString * const kValidations= @"Validations";
|
||||
[form addFormSection:section];
|
||||
|
||||
row = [XLFormRowDescriptor formRowDescriptorWithTag:kValidations rowType:XLFormRowDescriptorTypeButton title:@"Validation Examples"];
|
||||
row.action.formSegueIdenfifier = @"ValidationExamplesFormViewControllerSegue";
|
||||
row.action.formSegueIdentifier = @"ValidationExamplesFormViewControllerSegue";
|
||||
[section addFormRow:row];
|
||||
|
||||
section = [XLFormSectionDescriptor formSectionWithTitle:@"Using Predicates"];
|
||||
[form addFormSection:section];
|
||||
|
||||
row = [XLFormRowDescriptor formRowDescriptorWithTag:kPredicates rowType:XLFormRowDescriptorTypeButton title:@"Very basic predicates"];
|
||||
row.action.formSegueIdenfifier = @"BasicPredicateViewControllerSegue";
|
||||
row.action.formSegueIdentifier = @"BasicPredicateViewControllerSegue";
|
||||
[section addFormRow:row];
|
||||
|
||||
row = [XLFormRowDescriptor formRowDescriptorWithTag:kPredicates rowType:XLFormRowDescriptorTypeButton title:@"Blog Example Hide predicates"];
|
||||
row.action.formSegueIdenfifier = @"BlogExampleViewSegue";
|
||||
row.action.formSegueIdentifier = @"BlogExampleViewSegue";
|
||||
[section addFormRow:row];
|
||||
|
||||
row = [XLFormRowDescriptor formRowDescriptorWithTag:kPredicates rowType:XLFormRowDescriptorTypeButton title:@"Another example"];
|
||||
row.action.formSegueIdenfifier = @"PredicateFormViewControllerSegue";
|
||||
row.action.formSegueIdentifier = @"PredicateFormViewControllerSegue";
|
||||
[section addFormRow:row];
|
||||
|
||||
self.form = form;
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
NSString *const kName = @"name";
|
||||
NSString *const kEmail = @"email";
|
||||
NSString *const kTwitter = @"twitter";
|
||||
NSString *const kZipCode = @"zipCode";
|
||||
NSString *const kNumber = @"number";
|
||||
NSString *const kInteger = @"integer";
|
||||
NSString *const kDecimal = @"decimal";
|
||||
@@ -72,6 +73,10 @@ NSString *const kNotes = @"notes";
|
||||
row.value = @"@no_editable";
|
||||
[section addFormRow:row];
|
||||
|
||||
// Zip Code
|
||||
row = [XLFormRowDescriptor formRowDescriptorWithTag:kZipCode rowType:XLFormRowDescriptorTypeZipCode title:@"Zip Code"];
|
||||
[section addFormRow:row];
|
||||
|
||||
// Number
|
||||
row = [XLFormRowDescriptor formRowDescriptorWithTag:kNumber rowType:XLFormRowDescriptorTypeNumber title:@"Number"];
|
||||
[section addFormRow:row];
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
#if __IPHONE_OS_VERSION_MAX_ALLOWED < 80000
|
||||
UIActionSheet * actionSheet = [[UIActionSheet alloc] initWithTitle:nil
|
||||
delegate:self
|
||||
cancelButtonTitle:@"Cancel"
|
||||
cancelButtonTitle:NSLocalizedString(@"Cancel")
|
||||
destructiveButtonTitle:@"Remove Last Section"
|
||||
otherButtonTitles:@"Add a section at the end", self.form.isDisabled ? @"Enable Form" : @"Disable Form", nil];
|
||||
[actionSheet showInView:self.view];
|
||||
@@ -97,7 +97,7 @@
|
||||
UIAlertController * alertController = [UIAlertController alertControllerWithTitle:nil
|
||||
message:nil
|
||||
preferredStyle:UIAlertControllerStyleActionSheet];
|
||||
[alertController addAction:[UIAlertAction actionWithTitle:@"Cancel"
|
||||
[alertController addAction:[UIAlertAction actionWithTitle:NSLocalizedString(@"Cancel", nil)
|
||||
style:UIAlertActionStyleCancel
|
||||
handler:nil]];
|
||||
__weak __typeof(self)weakSelf = self;
|
||||
@@ -135,7 +135,7 @@
|
||||
else{
|
||||
UIActionSheet * actionSheet = [[UIActionSheet alloc] initWithTitle:nil
|
||||
delegate:self
|
||||
cancelButtonTitle:@"Cancel"
|
||||
cancelButtonTitle:NSLocalizedString(@"Cancel", nil)
|
||||
destructiveButtonTitle:@"Remove Last Section"
|
||||
otherButtonTitles:@"Add a section at the end", self.form.isDisabled ? @"Enable Form" : @"Disable Form", nil];
|
||||
[actionSheet showInView:self.view];
|
||||
@@ -165,7 +165,7 @@
|
||||
[newSection addFormRow:newRow];
|
||||
[self.form addFormSection:newSection];
|
||||
}
|
||||
else if (![[actionSheet buttonTitleAtIndex:buttonIndex] isEqualToString:@"Cancel"]){
|
||||
else if (![[actionSheet buttonTitleAtIndex:buttonIndex] isEqualToString:NSLocalizedString(@"Cancel")]){
|
||||
self.form.disabled = !self.form.disabled;
|
||||
[self.tableView endEditing:YES];
|
||||
[self.tableView reloadData];
|
||||
|
||||
@@ -105,7 +105,7 @@ NSString *const kFormImageSelectorCellImageRequest = @"imageRequest";
|
||||
UIAlertController * alertController = [UIAlertController alertControllerWithTitle:self.rowDescriptor.selectorTitle
|
||||
message:nil
|
||||
preferredStyle:UIAlertControllerStyleActionSheet];
|
||||
[alertController addAction:[UIAlertAction actionWithTitle:@"Cancel"
|
||||
[alertController addAction:[UIAlertAction actionWithTitle:NSLocalizedString(@"Cancel", nil)
|
||||
style:UIAlertActionStyleCancel
|
||||
handler:nil]];
|
||||
__weak __typeof(self)weakSelf = self;
|
||||
@@ -154,7 +154,7 @@ NSString *const kFormImageSelectorCellImageRequest = @"imageRequest";
|
||||
|
||||
NSDictionary *metrics = @{@"margin":@5.0};
|
||||
|
||||
[self.contentView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-(margin)-[text]" options:0 metrics:metrics views:uiComponents]];
|
||||
[self.contentView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-[text]" options:0 metrics:metrics views:uiComponents]];
|
||||
[self.contentView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|-(margin)-[text]" options:0 metrics:metrics views:uiComponents]];
|
||||
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@ NSString *const kSegmentedControl = @"segmentedControl";
|
||||
NSString *const kCustom = @"custom";
|
||||
NSString *const kInfo = @"info";
|
||||
NSString *const kButton = @"button";
|
||||
NSString *const kImage = @"image";
|
||||
NSString *const kButtonLeftAligned = @"buttonLeftAligned";
|
||||
NSString *const kButtonWithSegueId = @"buttonWithSegueId";
|
||||
NSString *const kButtonWithSegueClass = @"buttonWithSegueClass";
|
||||
@@ -102,6 +103,10 @@ NSString *const kButtonWithStoryboardId = @"buttonWithStoryboardId";
|
||||
[row.cellConfigAtConfigure setObject:@(4) forKey:@"steps"];
|
||||
[section addFormRow:row];
|
||||
|
||||
// Image
|
||||
row = [XLFormRowDescriptor formRowDescriptorWithTag:kImage rowType:XLFormRowDescriptorTypeImage title:@"Image"];
|
||||
row.value = [UIImage imageNamed:@"default_avatar"];
|
||||
[section addFormRow:row];
|
||||
|
||||
// Info cell
|
||||
XLFormRowDescriptor *infoRowDescriptor = [XLFormRowDescriptor formRowDescriptorWithTag:kInfo rowType:XLFormRowDescriptorTypeInfo];
|
||||
@@ -122,7 +127,7 @@ NSString *const kButtonWithStoryboardId = @"buttonWithStoryboardId";
|
||||
|
||||
// Left Button
|
||||
XLFormRowDescriptor * buttonLeftAlignedRow = [XLFormRowDescriptor formRowDescriptorWithTag:kButtonLeftAligned rowType:XLFormRowDescriptorTypeButton title:@"Button with Block"];
|
||||
[buttonLeftAlignedRow.cellConfig setObject:@(NSTextAlignmentLeft) forKey:@"textLabel.textAlignment"];
|
||||
[buttonLeftAlignedRow.cellConfig setObject:@(NSTextAlignmentNatural) forKey:@"textLabel.textAlignment"];
|
||||
[buttonLeftAlignedRow.cellConfig setObject:@(UITableViewCellAccessoryDisclosureIndicator) forKey:@"accessoryType"];
|
||||
|
||||
__typeof(self) __weak weakSelf = self;
|
||||
@@ -168,7 +173,7 @@ NSString *const kButtonWithStoryboardId = @"buttonWithStoryboardId";
|
||||
|
||||
// Button with SegueId
|
||||
XLFormRowDescriptor * buttonWithSegueId = [XLFormRowDescriptor formRowDescriptorWithTag:kButtonWithSegueClass rowType:XLFormRowDescriptorTypeButton title:@"Button with Segue Idenfifier"];
|
||||
buttonWithSegueId.action.formSegueIdenfifier = @"MapViewControllerSegue";
|
||||
buttonWithSegueId.action.formSegueIdentifier = @"MapViewControllerSegue";
|
||||
[section addFormRow:buttonWithSegueId];
|
||||
|
||||
|
||||
|
||||
@@ -106,7 +106,7 @@ NSString *const kPredDep2 = @"preddep2";
|
||||
typeof(self) __weak weakself = self;
|
||||
row.onChangeBlock = ^(id oldValue, id newValue, XLFormRowDescriptor* __unused rowDescriptor){
|
||||
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"Account Field changed" message:[NSString stringWithFormat:@"Old value: %@\nNew value: %@", oldValue, newValue ] preferredStyle:UIAlertControllerStyleActionSheet];
|
||||
[alert addAction:[UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:nil]];
|
||||
[alert addAction:[UIAlertAction actionWithTitle:NSLocalizedString(@"Cancel", nil) style:UIAlertActionStyleCancel handler:nil]];
|
||||
[weakself.navigationController presentViewController:alert animated:YES completion:nil];
|
||||
};
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
NSDictionary *metrics = @{@"imgSize":@50.0,
|
||||
@"margin" :@12.0};
|
||||
|
||||
[result addObjectsFromArray:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-(margin)-[image(imgSize)]-[name]"
|
||||
[result addObjectsFromArray:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-[image(imgSize)]-[name]"
|
||||
options:NSLayoutFormatAlignAllTop
|
||||
metrics:metrics
|
||||
views:views]];
|
||||
|
||||
@@ -332,8 +332,8 @@ NSString *const kSelectorWithStoryboardId = @"selectorWithStoryboardId";
|
||||
[section addFormRow:row];
|
||||
|
||||
// selector with SegueId
|
||||
row = [XLFormRowDescriptor formRowDescriptorWithTag:kSelectorWithSegueId rowType:XLFormRowDescriptorTypeSelectorPush title:@"Selector with Segue Idenfifier"];
|
||||
row.action.formSegueIdenfifier = @"MapViewControllerSegue";
|
||||
row = [XLFormRowDescriptor formRowDescriptorWithTag:kSelectorWithSegueId rowType:XLFormRowDescriptorTypeSelectorPush title:@"Selector with Segue Identifier"];
|
||||
row.action.formSegueIdentifier = @"MapViewControllerSegue";
|
||||
row.valueTransformer = [CLLocationValueTrasformer class];
|
||||
row.value = [[CLLocation alloc] initWithLatitude:-33 longitude:-56];
|
||||
[section addFormRow:row];
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="7706" systemVersion="14E46" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="p4n-1v-pzo">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="9059" systemVersion="15B42" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="p4n-1v-pzo">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9049"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--Navigation Controller-->
|
||||
@@ -13,6 +13,7 @@
|
||||
<navigationBar key="navigationBar" contentMode="scaleToFill" id="SNt-hk-N3V">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<animations/>
|
||||
</navigationBar>
|
||||
<nil name="viewControllers"/>
|
||||
<connections>
|
||||
@@ -34,6 +35,7 @@
|
||||
<view key="view" contentMode="scaleToFill" id="wpr-wE-9nj">
|
||||
<rect key="frame" x="0.0" y="64" width="320" height="504"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<animations/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
<extendedEdge key="edgesForExtendedLayout" bottom="YES"/>
|
||||
@@ -60,9 +62,11 @@
|
||||
<subviews>
|
||||
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="10" sectionFooterHeight="10" translatesAutoresizingMaskIntoConstraints="NO" id="JY7-WL-SnH">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
|
||||
<animations/>
|
||||
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
|
||||
</tableView>
|
||||
</subviews>
|
||||
<animations/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstItem="JY7-WL-SnH" firstAttribute="leading" secondItem="tun-QW-CGC" secondAttribute="leading" id="bSe-SV-rx6"/>
|
||||
@@ -94,9 +98,11 @@
|
||||
<subviews>
|
||||
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="10" sectionFooterHeight="10" translatesAutoresizingMaskIntoConstraints="NO" id="Lxj-Sb-kC6">
|
||||
<rect key="frame" x="0.0" y="64" width="320" height="504"/>
|
||||
<animations/>
|
||||
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
|
||||
</tableView>
|
||||
</subviews>
|
||||
<animations/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstItem="Lxj-Sb-kC6" firstAttribute="top" secondItem="kOR-67-djF" secondAttribute="bottom" id="PT1-Xo-3Ql"/>
|
||||
@@ -132,6 +138,7 @@
|
||||
<view key="view" contentMode="scaleToFill" id="hrV-fb-58s">
|
||||
<rect key="frame" x="0.0" y="64" width="320" height="504"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<animations/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
<extendedEdge key="edgesForExtendedLayout" bottom="YES"/>
|
||||
@@ -155,9 +162,11 @@
|
||||
<subviews>
|
||||
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="10" sectionFooterHeight="10" translatesAutoresizingMaskIntoConstraints="NO" id="Fty-3j-BeF">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
|
||||
<animations/>
|
||||
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
|
||||
</tableView>
|
||||
</subviews>
|
||||
<animations/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstItem="xtJ-Wo-mhU" firstAttribute="top" secondItem="Fty-3j-BeF" secondAttribute="bottom" id="CbV-4f-RzP"/>
|
||||
@@ -188,6 +197,7 @@
|
||||
<view key="view" contentMode="scaleToFill" id="6EZ-O7-FjX">
|
||||
<rect key="frame" x="0.0" y="64" width="320" height="504"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<animations/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
<extendedEdge key="edgesForExtendedLayout" bottom="YES"/>
|
||||
@@ -208,6 +218,7 @@
|
||||
<view key="view" contentMode="scaleToFill" id="bNj-SD-83w">
|
||||
<rect key="frame" x="0.0" y="64" width="320" height="504"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<animations/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
<extendedEdge key="edgesForExtendedLayout" bottom="YES"/>
|
||||
@@ -231,6 +242,7 @@
|
||||
<view key="view" contentMode="scaleToFill" id="JjC-E5-SyY">
|
||||
<rect key="frame" x="0.0" y="64" width="320" height="504"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<animations/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
<extendedEdge key="edgesForExtendedLayout" bottom="YES"/>
|
||||
@@ -248,6 +260,7 @@
|
||||
<navigationBar key="navigationBar" contentMode="scaleToFill" id="fO3-V7-XXu">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<animations/>
|
||||
</navigationBar>
|
||||
<nil name="viewControllers"/>
|
||||
<connections>
|
||||
@@ -269,6 +282,7 @@
|
||||
<view key="view" contentMode="scaleToFill" id="NZg-t1-g19">
|
||||
<rect key="frame" x="0.0" y="64" width="320" height="504"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<animations/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
<extendedEdge key="edgesForExtendedLayout" bottom="YES"/>
|
||||
@@ -292,9 +306,11 @@
|
||||
<subviews>
|
||||
<tableView autoresizesSubviews="NO" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="10" sectionFooterHeight="10" translatesAutoresizingMaskIntoConstraints="NO" id="fLo-Gu-rqr">
|
||||
<rect key="frame" x="0.0" y="20" width="320" height="548"/>
|
||||
<animations/>
|
||||
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
|
||||
</tableView>
|
||||
</subviews>
|
||||
<animations/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstItem="uVG-bI-IMr" firstAttribute="top" secondItem="fLo-Gu-rqr" secondAttribute="bottom" id="25A-HG-wek"/>
|
||||
@@ -313,11 +329,6 @@
|
||||
<point key="canvasLocation" x="1346" y="1178"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
<simulatedMetricsContainer key="defaultSimulatedMetrics">
|
||||
<simulatedStatusBarMetrics key="statusBar"/>
|
||||
<simulatedOrientationMetrics key="orientation"/>
|
||||
<simulatedScreenMetrics key="destination" type="retina4"/>
|
||||
</simulatedMetricsContainer>
|
||||
<inferredMetricsTieBreakers>
|
||||
<segue reference="Mtw-x2-E0b"/>
|
||||
</inferredMetricsTieBreakers>
|
||||
|
||||
@@ -36,7 +36,6 @@
|
||||
2CA9A3FC06E94345A2FDE415 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F6DF43B7BBF44F72A4493E8E /* libPods.a */; };
|
||||
3C0357F01AB0D82300200C8A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 3C0357EF1AB0D82300200C8A /* Images.xcassets */; };
|
||||
3C3B01D51AB741EF0027CD45 /* XLFormRatingCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 3C3B01D31AB741EF0027CD45 /* XLFormRatingCell.m */; };
|
||||
3C3B01D61AB741EF0027CD45 /* XLFormRatingCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3C3B01D41AB741EF0027CD45 /* XLFormRatingCell.xib */; };
|
||||
3C3B01DA1AB7497D0027CD45 /* XLFormWeekDaysCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 3C3B01D81AB7497D0027CD45 /* XLFormWeekDaysCell.m */; };
|
||||
3C3B01DB1AB7497D0027CD45 /* XLFormWeekDaysCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3C3B01D91AB7497D0027CD45 /* XLFormWeekDaysCell.xib */; };
|
||||
3C3B01E21AB7499A0027CD45 /* XLRatingView.m in Sources */ = {isa = PBXBuildFile; fileRef = 3C3B01E01AB7499A0027CD45 /* XLRatingView.m */; };
|
||||
@@ -45,6 +44,7 @@
|
||||
66B6266E1AE0055100007886 /* DateAndTimeValueTrasformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B6266D1AE0055100007886 /* DateAndTimeValueTrasformer.m */; };
|
||||
BF9DB1D51AE0436600B985E7 /* BlogExampleViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BF9DB1D21AE0436600B985E7 /* BlogExampleViewController.m */; };
|
||||
BF9DB1D61AE0436600B985E7 /* PredicateFormViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BF9DB1D41AE0436600B985E7 /* PredicateFormViewController.m */; };
|
||||
BFA5F4B11BB48F8E00D045BD /* XLFormRatingCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3C3B01D41AB741EF0027CD45 /* XLFormRatingCell.xib */; };
|
||||
BFE91AFB1AE159B200DE5231 /* BasicPredicateViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BFE91AFA1AE159B200DE5231 /* BasicPredicateViewController.m */; };
|
||||
D51B8B2C19126664008C0478 /* XLFormCustomCell.m in Sources */ = {isa = PBXBuildFile; fileRef = D51B8B2B19126664008C0478 /* XLFormCustomCell.m */; };
|
||||
DEA6EF911B57D6CC000F4893 /* HTTPSessionManager.m in Sources */ = {isa = PBXBuildFile; fileRef = DEA6EF901B57D6CC000F4893 /* HTTPSessionManager.m */; };
|
||||
@@ -460,6 +460,7 @@
|
||||
2850C5F518D0F706002B7D0A /* Frameworks */,
|
||||
2850C5F618D0F706002B7D0A /* Resources */,
|
||||
CFE72E068B5F4D9BB45FB757 /* Copy Pods Resources */,
|
||||
734CC62A7A974D37CC982576 /* Embed Pods Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
@@ -476,7 +477,7 @@
|
||||
2850C5F018D0F706002B7D0A /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 0510;
|
||||
LastUpgradeCheck = 0700;
|
||||
ORGANIZATIONNAME = Xmartlabs;
|
||||
};
|
||||
buildConfigurationList = 2850C5F318D0F706002B7D0A /* Build configuration list for PBXProject "XLForm" */;
|
||||
@@ -503,10 +504,10 @@
|
||||
files = (
|
||||
28468EA718EF594900DBB015 /* Localizable.strings in Resources */,
|
||||
2850C60618D0F706002B7D0A /* InfoPlist.strings in Resources */,
|
||||
BFA5F4B11BB48F8E00D045BD /* XLFormRatingCell.xib in Resources */,
|
||||
28815E2E1A8589F600B674D2 /* MapViewController.xib in Resources */,
|
||||
3C0357F01AB0D82300200C8A /* Images.xcassets in Resources */,
|
||||
3C3B01DB1AB7497D0027CD45 /* XLFormWeekDaysCell.xib in Resources */,
|
||||
3C3B01D61AB741EF0027CD45 /* XLFormRatingCell.xib in Resources */,
|
||||
28A8083E190D9083009D77F8 /* iPhoneStoryboard.storyboard in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
@@ -529,6 +530,21 @@
|
||||
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
734CC62A7A974D37CC982576 /* Embed Pods Frameworks */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "Embed Pods Frameworks";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-frameworks.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
CFE72E068B5F4D9BB45FB757 /* Copy Pods Resources */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
@@ -623,6 +639,7 @@
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
@@ -685,6 +702,7 @@
|
||||
GCC_PREFIX_HEADER = "XLForm/XLForm-Prefix.pch";
|
||||
INFOPLIST_FILE = "XLForm/XLForm-Info.plist";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.xmartlabs.$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
WRAPPER_EXTENSION = app;
|
||||
@@ -701,6 +719,7 @@
|
||||
GCC_PREFIX_HEADER = "XLForm/XLForm-Prefix.pch";
|
||||
INFOPLIST_FILE = "XLForm/XLForm-Info.plist";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.xmartlabs.$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
WRAPPER_EXTENSION = app;
|
||||
|
||||
@@ -2,6 +2,11 @@
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>NSAppTransportSecurity</key>
|
||||
<dict>
|
||||
<key>NSAllowsArbitraryLoads</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
@@ -9,7 +14,7 @@
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.xmartlabs.$(PRODUCT_NAME:rfc1034identifier)</string>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
|
||||
@@ -24,12 +24,12 @@
|
||||
|
||||
class CustomRowsViewController : XLFormViewController {
|
||||
|
||||
private enum Tags : String {
|
||||
case CustomRowFirstRatingTag = "CustomRowFirstRatingTag"
|
||||
case CustomRowSecondRatingTag = "CustomRowSecondRatingTag"
|
||||
case CustomRowFloatLabeledTextFieldTag = "CustomRowFloatLabeledTextFieldTag"
|
||||
case CustomRowWeekdays = "CustomRowWeekdays"
|
||||
case CustomRowText = "CustomText"
|
||||
private struct Tags {
|
||||
static let CustomRowFirstRatingTag = "CustomRowFirstRatingTag"
|
||||
static let CustomRowSecondRatingTag = "CustomRowSecondRatingTag"
|
||||
static let CustomRowFloatLabeledTextFieldTag = "CustomRowFloatLabeledTextFieldTag"
|
||||
static let CustomRowWeekdays = "CustomRowWeekdays"
|
||||
static let CustomRowText = "CustomText"
|
||||
}
|
||||
|
||||
override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: NSBundle?) {
|
||||
@@ -37,7 +37,7 @@ class CustomRowsViewController : XLFormViewController {
|
||||
self.initializeForm()
|
||||
}
|
||||
|
||||
required init(coder aDecoder: NSCoder) {
|
||||
required init?(coder aDecoder: NSCoder) {
|
||||
super.init(coder: aDecoder)
|
||||
self.initializeForm()
|
||||
}
|
||||
@@ -54,11 +54,11 @@ class CustomRowsViewController : XLFormViewController {
|
||||
section.title = "Ratings"
|
||||
form.addFormSection(section)
|
||||
|
||||
row = XLFormRowDescriptor(tag: Tags.CustomRowFirstRatingTag.rawValue, rowType: XLFormRowDescriptorTypeRate, title: "First Rating")
|
||||
row = XLFormRowDescriptor(tag: Tags.CustomRowFirstRatingTag, rowType: XLFormRowDescriptorTypeRate, title: "First Rating")
|
||||
row.value = 3
|
||||
section.addFormRow(row)
|
||||
|
||||
row = XLFormRowDescriptor(tag: Tags.CustomRowSecondRatingTag.rawValue, rowType: XLFormRowDescriptorTypeRate, title: "First Rating")
|
||||
row = XLFormRowDescriptor(tag: Tags.CustomRowSecondRatingTag, rowType: XLFormRowDescriptorTypeRate, title: "First Rating")
|
||||
row.value = 1
|
||||
section.addFormRow(row)
|
||||
|
||||
@@ -66,13 +66,13 @@ class CustomRowsViewController : XLFormViewController {
|
||||
section = XLFormSectionDescriptor.formSectionWithTitle("Float Labeled Text Field")
|
||||
form.addFormSection(section)
|
||||
|
||||
row = XLFormRowDescriptor(tag: Tags.CustomRowFloatLabeledTextFieldTag.rawValue, rowType: XLFormRowDescriptorTypeFloatLabeledTextField, title: "Title")
|
||||
row = XLFormRowDescriptor(tag: Tags.CustomRowFloatLabeledTextFieldTag, rowType: XLFormRowDescriptorTypeFloatLabeledTextField, title: "Title")
|
||||
section.addFormRow(row)
|
||||
|
||||
row = XLFormRowDescriptor(tag: Tags.CustomRowFloatLabeledTextFieldTag.rawValue, rowType: XLFormRowDescriptorTypeFloatLabeledTextField, title: "First Name")
|
||||
row = XLFormRowDescriptor(tag: Tags.CustomRowFloatLabeledTextFieldTag, rowType: XLFormRowDescriptorTypeFloatLabeledTextField, title: "First Name")
|
||||
section.addFormRow(row)
|
||||
|
||||
row = XLFormRowDescriptor(tag: Tags.CustomRowFloatLabeledTextFieldTag.rawValue, rowType: XLFormRowDescriptorTypeFloatLabeledTextField, title: "Last Name")
|
||||
row = XLFormRowDescriptor(tag: Tags.CustomRowFloatLabeledTextFieldTag, rowType: XLFormRowDescriptorTypeFloatLabeledTextField, title: "Last Name")
|
||||
section.addFormRow(row)
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ class CustomRowsViewController : XLFormViewController {
|
||||
form.addFormSection(section)
|
||||
|
||||
// WeekDays
|
||||
row = XLFormRowDescriptor(tag: Tags.CustomRowWeekdays.rawValue, rowType: XLFormRowDescriptorTypeWeekDays)
|
||||
row = XLFormRowDescriptor(tag: Tags.CustomRowWeekdays, rowType: XLFormRowDescriptorTypeWeekDays)
|
||||
row.value = [
|
||||
XLFormWeekDaysCell.kWeekDay.Sunday.description(): false,
|
||||
XLFormWeekDaysCell.kWeekDay.Monday.description(): true,
|
||||
@@ -97,7 +97,7 @@ class CustomRowsViewController : XLFormViewController {
|
||||
form.addFormSection(section)
|
||||
|
||||
|
||||
row = XLFormRowDescriptor(tag: Tags.CustomRowText.rawValue, rowType: XLFormRowDescriptorTypeCustom)
|
||||
row = XLFormRowDescriptor(tag: Tags.CustomRowText, rowType: XLFormRowDescriptorTypeCustom)
|
||||
// Must set custom cell or add custom cell to cellClassesForRowDescriptorTypes dictionary before XLFormViewController loaded
|
||||
row.cellClass = XLFormCustomCell.self
|
||||
section.addFormRow(row)
|
||||
|
||||
+31
-31
@@ -33,11 +33,11 @@ class FloatLabeledTextFieldCell : XLFormBaseCell, UITextFieldDelegate {
|
||||
|
||||
|
||||
lazy var floatLabeledTextField: JVFloatLabeledTextField = {
|
||||
let result = JVFloatLabeledTextField(frame: CGRect.zeroRect)
|
||||
result.setTranslatesAutoresizingMaskIntoConstraints(false)
|
||||
let result = JVFloatLabeledTextField(frame: CGRect.zero)
|
||||
result.translatesAutoresizingMaskIntoConstraints = false
|
||||
result.font = UIFont.systemFontOfSize(kFontSize)
|
||||
result.floatingLabel.font = UIFont.boldSystemFontOfSize(kFontSize)
|
||||
result.clearButtonMode = UITextFieldViewMode.WhileEditing
|
||||
result.floatingLabel.font = .boldSystemFontOfSize(kFontSize)
|
||||
result.clearButtonMode = .WhileEditing
|
||||
return result
|
||||
}()
|
||||
|
||||
@@ -45,29 +45,30 @@ class FloatLabeledTextFieldCell : XLFormBaseCell, UITextFieldDelegate {
|
||||
|
||||
override func configure() {
|
||||
super.configure()
|
||||
self.selectionStyle = UITableViewCellSelectionStyle.None
|
||||
self.contentView.addSubview(self.floatLabeledTextField)
|
||||
self.floatLabeledTextField.delegate = self
|
||||
self.contentView.addConstraints(self.layoutConstraints())
|
||||
selectionStyle = .None
|
||||
contentView.addSubview(self.floatLabeledTextField)
|
||||
floatLabeledTextField.delegate = self
|
||||
contentView.addConstraints(layoutConstraints())
|
||||
}
|
||||
|
||||
override func update() {
|
||||
super.update()
|
||||
self.floatLabeledTextField.attributedPlaceholder = NSAttributedString(string: self.rowDescriptor.title ?? "" , attributes: [NSForegroundColorAttributeName: UIColor.lightGrayColor()])
|
||||
|
||||
if let value: AnyObject = self.rowDescriptor.value {
|
||||
self.floatLabeledTextField.text = value.displayText()
|
||||
if let rowDescriptor = rowDescriptor {
|
||||
floatLabeledTextField.attributedPlaceholder = NSAttributedString(string: rowDescriptor.title ?? "" , attributes: [NSForegroundColorAttributeName: UIColor.lightGrayColor()])
|
||||
if let value = rowDescriptor.value {
|
||||
floatLabeledTextField.text = value.displayText()
|
||||
}
|
||||
else {
|
||||
floatLabeledTextField.text = rowDescriptor.noValueDisplayText
|
||||
}
|
||||
floatLabeledTextField.enabled = !rowDescriptor.isDisabled()
|
||||
floatLabeledTextField.floatingLabelTextColor = .lightGrayColor()
|
||||
floatLabeledTextField.alpha = rowDescriptor.isDisabled() ? 0.6 : 1.0
|
||||
}
|
||||
else {
|
||||
self.floatLabeledTextField.text = self.rowDescriptor.noValueDisplayText
|
||||
}
|
||||
self.floatLabeledTextField.enabled = !self.rowDescriptor.isDisabled()
|
||||
self.floatLabeledTextField.floatingLabelTextColor = UIColor.lightGrayColor()
|
||||
self.floatLabeledTextField.alpha = self.rowDescriptor.isDisabled() ? 0.6 : 1.0
|
||||
}
|
||||
|
||||
override func formDescriptorCellCanBecomeFirstResponder() -> Bool {
|
||||
return !self.rowDescriptor.isDisabled()
|
||||
return rowDescriptor?.isDisabled() == false
|
||||
}
|
||||
|
||||
|
||||
@@ -82,23 +83,22 @@ class FloatLabeledTextFieldCell : XLFormBaseCell, UITextFieldDelegate {
|
||||
|
||||
//MARK: Helpers
|
||||
|
||||
func layoutConstraints() -> [AnyObject]{
|
||||
let views = ["floatLabeledTextField" : self.floatLabeledTextField]
|
||||
func layoutConstraints() -> [NSLayoutConstraint]{
|
||||
let views = ["floatLabeledTextField" : floatLabeledTextField]
|
||||
let metrics = ["hMargin": 15.0, "vMargin": 8.0]
|
||||
var result = NSLayoutConstraint.constraintsWithVisualFormat("H:|-(hMargin)-[floatLabeledTextField]-(hMargin)-|", options:NSLayoutFormatOptions.AlignAllCenterY, metrics:metrics, views:views)
|
||||
result += NSLayoutConstraint.constraintsWithVisualFormat("V:|-(vMargin)-[floatLabeledTextField]-(vMargin)-|", options:NSLayoutFormatOptions.AlignAllCenterX, metrics:metrics, views:views)
|
||||
var result = NSLayoutConstraint.constraintsWithVisualFormat("H:|-(hMargin)-[floatLabeledTextField]-(hMargin)-|", options:.AlignAllCenterY, metrics:metrics, views:views)
|
||||
result += NSLayoutConstraint.constraintsWithVisualFormat("V:|-(vMargin)-[floatLabeledTextField]-(vMargin)-|", options:.AlignAllCenterX, metrics:metrics, views:views)
|
||||
return result
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
func textFieldDidChange(textField : UITextField) {
|
||||
if self.floatLabeledTextField == textField {
|
||||
if self.floatLabeledTextField.text.isEmpty == false {
|
||||
self.rowDescriptor.value = self.floatLabeledTextField.text
|
||||
} else {
|
||||
self.rowDescriptor.value = nil
|
||||
if floatLabeledTextField == textField {
|
||||
if let rowDescriptor = rowDescriptor, let text = self.floatLabeledTextField.text {
|
||||
if text.isEmpty == false {
|
||||
rowDescriptor.value = self.floatLabeledTextField.text
|
||||
} else {
|
||||
rowDescriptor.value = nil
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,12 +27,12 @@ class XLRatingView : AXRatingView {
|
||||
|
||||
override init(frame: CGRect) {
|
||||
super.init(frame: frame)
|
||||
setTranslatesAutoresizingMaskIntoConstraints(false)
|
||||
translatesAutoresizingMaskIntoConstraints = false
|
||||
}
|
||||
|
||||
required init(coder aDecoder: NSCoder) {
|
||||
required init?(coder aDecoder: NSCoder) {
|
||||
super.init(coder: aDecoder)
|
||||
setTranslatesAutoresizingMaskIntoConstraints(false)
|
||||
translatesAutoresizingMaskIntoConstraints = false
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
let XLFormRowDescriptorTypeRate = "XLFormRowDescriptorTypeRate"
|
||||
|
||||
@objc
|
||||
|
||||
class XLFormRatingCell : XLFormBaseCell {
|
||||
|
||||
@IBOutlet weak var rateTitle: UILabel!
|
||||
@@ -34,23 +34,23 @@ class XLFormRatingCell : XLFormBaseCell {
|
||||
|
||||
override func configure() {
|
||||
super.configure()
|
||||
self.selectionStyle = UITableViewCellSelectionStyle.None
|
||||
self.ratingView.addTarget(self, action: "rateChanged:", forControlEvents:UIControlEvents.ValueChanged)
|
||||
selectionStyle = .None
|
||||
ratingView.addTarget(self, action: "rateChanged:", forControlEvents:.ValueChanged)
|
||||
}
|
||||
|
||||
|
||||
override func update() {
|
||||
super.update()
|
||||
self.ratingView.value = self.rowDescriptor!.value!.floatValue
|
||||
self.rateTitle.text = self.rowDescriptor!.title
|
||||
self.ratingView.alpha = self.rowDescriptor!.isDisabled() ? 0.6 : 1
|
||||
self.rateTitle.alpha = self.rowDescriptor!.isDisabled() ? 0.6 : 1
|
||||
ratingView.value = rowDescriptor!.value!.floatValue
|
||||
rateTitle.text = rowDescriptor!.title
|
||||
ratingView.alpha = rowDescriptor!.isDisabled() ? 0.6 : 1
|
||||
rateTitle.alpha = rowDescriptor!.isDisabled() ? 0.6 : 1
|
||||
}
|
||||
|
||||
//MARK: Events
|
||||
|
||||
func rateChanged(ratingView : XLRatingView){
|
||||
self.rowDescriptor!.value = ratingView.value
|
||||
rowDescriptor!.value = ratingView.value
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7531" systemVersion="14D136" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="8191" systemVersion="15A279b" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7520"/>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8154"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
@@ -10,10 +11,12 @@
|
||||
<rect key="frame" x="0.0" y="0.0" width="478" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="OGo-4x-YLf" id="hV6-xt-6pq">
|
||||
<rect key="frame" x="0.0" y="0.0" width="478" height="43.5"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="yhI-dj-sRk" customClass="XLRatingView" customModule="SwiftExample" customModuleProvider="target">
|
||||
<rect key="frame" x="353" y="11" width="115" height="22"/>
|
||||
<animations/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="22" id="85e-Ov-qM7"/>
|
||||
@@ -22,6 +25,7 @@
|
||||
</view>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Rate" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Vxp-gw-YTt">
|
||||
<rect key="frame" x="15" y="11" width="338" height="21"/>
|
||||
<animations/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="21" id="IK4-8e-SFs"/>
|
||||
<constraint firstAttribute="width" constant="150" id="hNG-F9-1wj"/>
|
||||
@@ -36,6 +40,7 @@
|
||||
</variation>
|
||||
</label>
|
||||
</subviews>
|
||||
<animations/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottom" secondItem="Vxp-gw-YTt" secondAttribute="bottom" constant="11" id="0Qz-iR-Tzb"/>
|
||||
<constraint firstAttribute="centerY" secondItem="Vxp-gw-YTt" secondAttribute="centerY" id="4Vh-2e-m2p"/>
|
||||
@@ -46,6 +51,7 @@
|
||||
<constraint firstItem="yhI-dj-sRk" firstAttribute="leading" secondItem="Vxp-gw-YTt" secondAttribute="trailing" id="n0B-tg-Pik"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<animations/>
|
||||
<connections>
|
||||
<outlet property="rateTitle" destination="Vxp-gw-YTt" id="0Qh-NC-yq5"/>
|
||||
<outlet property="ratingView" destination="yhI-dj-sRk" id="BKM-pX-m9F"/>
|
||||
|
||||
@@ -81,7 +81,7 @@ class XLFormWeekDaysCell : XLFormBaseCell {
|
||||
|
||||
override func configure() {
|
||||
super.configure()
|
||||
selectionStyle = UITableViewCellSelectionStyle.None
|
||||
selectionStyle = .None
|
||||
configureButtons()
|
||||
}
|
||||
|
||||
@@ -109,9 +109,9 @@ class XLFormWeekDaysCell : XLFormBaseCell {
|
||||
|
||||
func configureButtons() {
|
||||
for subview in contentView.subviews {
|
||||
if let button : UIButton = subview as? UIButton {
|
||||
button.setImage(UIImage(named: "uncheckedDay"), forState: UIControlState.Normal)
|
||||
button.setImage(UIImage(named: "checkedDay"), forState: UIControlState.Selected)
|
||||
if let button = subview as? UIButton {
|
||||
button.setImage(UIImage(named: "uncheckedDay"), forState: .Normal)
|
||||
button.setImage(UIImage(named: "checkedDay"), forState: .Selected)
|
||||
button.adjustsImageWhenHighlighted = false
|
||||
imageTopTitleBottom(button)
|
||||
}
|
||||
@@ -122,13 +122,13 @@ class XLFormWeekDaysCell : XLFormBaseCell {
|
||||
func updateButtons() {
|
||||
var value = rowDescriptor!.value as! Dictionary<String, Bool>
|
||||
|
||||
sundayButton.selected = value[XLFormWeekDaysCell.kWeekDay.Sunday.description()]!
|
||||
mondayButton.selected = value[XLFormWeekDaysCell.kWeekDay.Monday.description()]!
|
||||
tuesdayButton.selected = value[XLFormWeekDaysCell.kWeekDay.Tuesday.description()]!
|
||||
wednesdayButton.selected = value[XLFormWeekDaysCell.kWeekDay.Wednesday.description()]!
|
||||
thursdayButton.selected = value[XLFormWeekDaysCell.kWeekDay.Thursday.description()]!
|
||||
fridayButton.selected = value[XLFormWeekDaysCell.kWeekDay.Friday.description()]!
|
||||
saturdayButton.selected = value[XLFormWeekDaysCell.kWeekDay.Saturday.description()]!
|
||||
sundayButton.selected = value[kWeekDay.Sunday.description()]!
|
||||
mondayButton.selected = value[kWeekDay.Monday.description()]!
|
||||
tuesdayButton.selected = value[kWeekDay.Tuesday.description()]!
|
||||
wednesdayButton.selected = value[kWeekDay.Wednesday.description()]!
|
||||
thursdayButton.selected = value[kWeekDay.Thursday.description()]!
|
||||
fridayButton.selected = value[kWeekDay.Friday.description()]!
|
||||
saturdayButton.selected = value[kWeekDay.Saturday.description()]!
|
||||
|
||||
sundayButton.alpha = rowDescriptor!.isDisabled() ? 0.6 : 1
|
||||
mondayButton.alpha = mondayButton.alpha
|
||||
@@ -157,19 +157,19 @@ class XLFormWeekDaysCell : XLFormBaseCell {
|
||||
func getDayFormButton(button: UIButton) -> String {
|
||||
switch button {
|
||||
case sundayButton:
|
||||
return XLFormWeekDaysCell.kWeekDay.Sunday.description()
|
||||
return kWeekDay.Sunday.description()
|
||||
case mondayButton:
|
||||
return XLFormWeekDaysCell.kWeekDay.Monday.description()
|
||||
return kWeekDay.Monday.description()
|
||||
case tuesdayButton:
|
||||
return XLFormWeekDaysCell.kWeekDay.Tuesday.description()
|
||||
return kWeekDay.Tuesday.description()
|
||||
case wednesdayButton:
|
||||
return XLFormWeekDaysCell.kWeekDay.Wednesday.description()
|
||||
return kWeekDay.Wednesday.description()
|
||||
case thursdayButton:
|
||||
return XLFormWeekDaysCell.kWeekDay.Thursday.description()
|
||||
return kWeekDay.Thursday.description()
|
||||
case fridayButton:
|
||||
return XLFormWeekDaysCell.kWeekDay.Friday.description()
|
||||
return kWeekDay.Friday.description()
|
||||
default:
|
||||
return XLFormWeekDaysCell.kWeekDay.Saturday.description()
|
||||
return kWeekDay.Saturday.description()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -23,8 +23,6 @@
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
|
||||
|
||||
class DateValueTrasformer : NSValueTransformer {
|
||||
|
||||
override class func transformedValueClass() -> AnyClass {
|
||||
@@ -36,22 +34,17 @@ class DateValueTrasformer : NSValueTransformer {
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
override func transformedValue(value: AnyObject?) -> AnyObject? {
|
||||
if let valueData: AnyObject = value {
|
||||
if valueData.isKindOfClass(NSDate) {
|
||||
let date = valueData as! NSDate
|
||||
let dateFormatter = NSDateFormatter()
|
||||
dateFormatter.dateStyle = NSDateFormatterStyle.FullStyle
|
||||
dateFormatter.timeStyle = NSDateFormatterStyle.NoStyle
|
||||
return dateFormatter.stringFromDate(date)
|
||||
}
|
||||
if let date = value as? NSDate {
|
||||
let dateFormatter = NSDateFormatter()
|
||||
dateFormatter.dateStyle = .FullStyle
|
||||
dateFormatter.timeStyle = .NoStyle
|
||||
return dateFormatter.stringFromDate(date)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class DateTimeValueTrasformer: NSValueTransformer {
|
||||
|
||||
override class func transformedValueClass() -> AnyClass {
|
||||
@@ -64,14 +57,11 @@ class DateTimeValueTrasformer: NSValueTransformer {
|
||||
}
|
||||
|
||||
override func transformedValue(value: AnyObject?) -> AnyObject? {
|
||||
if let valueData: AnyObject = value {
|
||||
if valueData.isKindOfClass(NSDate) {
|
||||
let date = valueData as! NSDate
|
||||
let dateFormatter = NSDateFormatter()
|
||||
dateFormatter.dateStyle = NSDateFormatterStyle.MediumStyle
|
||||
dateFormatter.timeStyle = NSDateFormatterStyle.ShortStyle
|
||||
return dateFormatter.stringFromDate(date)
|
||||
}
|
||||
if let date = value as? NSDate {
|
||||
let dateFormatter = NSDateFormatter()
|
||||
dateFormatter.dateStyle = .MediumStyle
|
||||
dateFormatter.timeStyle = .ShortStyle
|
||||
return dateFormatter.stringFromDate(date)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// DatesFormViewController.swift
|
||||
// XLForm ( https://github.com/xmartlabs/XLForm )
|
||||
//
|
||||
// Copyright (c) 2014 Xmartlabs ( http://xmartlabs.com )
|
||||
// Copyright (c) 2014-2015 Xmartlabs ( http://xmartlabs.com )
|
||||
//
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
@@ -26,42 +26,41 @@
|
||||
|
||||
class DatesFormViewController: XLFormViewController {
|
||||
|
||||
private enum Tags : String {
|
||||
case DateInline = "dateInline"
|
||||
case TimeInline = "timeInline"
|
||||
case DateTimeInline = "dateTimeInline"
|
||||
case CountDownTimerInline = "countDownTimerInline"
|
||||
case DatePicker = "datePicker"
|
||||
case Date = "date"
|
||||
case Time = "time"
|
||||
case DateTime = "dateTime"
|
||||
case CountDownTimer = "countDownTimer"
|
||||
private struct Tags {
|
||||
static let DateInline = "dateInline"
|
||||
static let TimeInline = "timeInline"
|
||||
static let DateTimeInline = "dateTimeInline"
|
||||
static let CountDownTimerInline = "countDownTimerInline"
|
||||
static let DatePicker = "datePicker"
|
||||
static let Date = "date"
|
||||
static let Time = "time"
|
||||
static let DateTime = "dateTime"
|
||||
static let CountDownTimer = "countDownTimer"
|
||||
}
|
||||
|
||||
override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: NSBundle?) {
|
||||
super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil)
|
||||
self.initializeForm()
|
||||
initializeForm()
|
||||
}
|
||||
|
||||
required init(coder aDecoder: NSCoder) {
|
||||
required init?(coder aDecoder: NSCoder) {
|
||||
super.init(coder: aDecoder)
|
||||
self.initializeForm()
|
||||
initializeForm()
|
||||
}
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
let barButton = UIBarButtonItem(title: "Disable", style: UIBarButtonItemStyle.Plain, target: self, action: "disableEnable:")
|
||||
let barButton = UIBarButtonItem(title: "Disable", style: .Plain, target: self, action: "disableEnable:")
|
||||
barButton.possibleTitles = Set(["Disable", "Enable"])
|
||||
self.navigationItem.rightBarButtonItem = barButton
|
||||
navigationItem.rightBarButtonItem = barButton
|
||||
}
|
||||
|
||||
|
||||
func disableEnable(button : UIBarButtonItem)
|
||||
{
|
||||
self.form.disabled = !self.form.disabled
|
||||
button.title = self.form.disabled ? "Enable" : "Disable"
|
||||
self.tableView.endEditing(true)
|
||||
self.tableView.reloadData()
|
||||
func disableEnable(button : UIBarButtonItem){
|
||||
form.disabled = !form.disabled
|
||||
button.title = form.disabled ? "Enable" : "Disable"
|
||||
tableView.endEditing(true)
|
||||
tableView.reloadData()
|
||||
}
|
||||
|
||||
func initializeForm() {
|
||||
@@ -75,22 +74,22 @@ class DatesFormViewController: XLFormViewController {
|
||||
form.addFormSection(section)
|
||||
|
||||
// Date
|
||||
row = XLFormRowDescriptor(tag: Tags.DateInline.rawValue, rowType: XLFormRowDescriptorTypeDateInline, title:"Date")
|
||||
row = XLFormRowDescriptor(tag: Tags.DateInline, rowType: XLFormRowDescriptorTypeDateInline, title:"Date")
|
||||
row.value = NSDate()
|
||||
section.addFormRow(row)
|
||||
|
||||
// Time
|
||||
row = XLFormRowDescriptor(tag: Tags.TimeInline.rawValue, rowType: XLFormRowDescriptorTypeTimeInline, title: "Time")
|
||||
row = XLFormRowDescriptor(tag: Tags.TimeInline, rowType: XLFormRowDescriptorTypeTimeInline, title: "Time")
|
||||
row.value = NSDate()
|
||||
section.addFormRow(row)
|
||||
|
||||
// DateTime
|
||||
row = XLFormRowDescriptor(tag: Tags.DateTimeInline.rawValue, rowType: XLFormRowDescriptorTypeDateTimeInline, title: "Date Time")
|
||||
row = XLFormRowDescriptor(tag: Tags.DateTimeInline, rowType: XLFormRowDescriptorTypeDateTimeInline, title: "Date Time")
|
||||
row.value = NSDate()
|
||||
section.addFormRow(row)
|
||||
|
||||
// CountDownTimer
|
||||
row = XLFormRowDescriptor(tag: Tags.CountDownTimerInline.rawValue, rowType:XLFormRowDescriptorTypeCountDownTimerInline, title:"Countdown Timer")
|
||||
row = XLFormRowDescriptor(tag: Tags.CountDownTimerInline, rowType:XLFormRowDescriptorTypeCountDownTimerInline, title:"Countdown Timer")
|
||||
row.value = NSDate()
|
||||
section.addFormRow(row)
|
||||
|
||||
@@ -100,25 +99,25 @@ class DatesFormViewController: XLFormViewController {
|
||||
|
||||
|
||||
// Date
|
||||
row = XLFormRowDescriptor(tag: Tags.Date.rawValue, rowType:XLFormRowDescriptorTypeDate, title:"Date")
|
||||
row = XLFormRowDescriptor(tag: Tags.Date, rowType:XLFormRowDescriptorTypeDate, title:"Date")
|
||||
row.value = NSDate()
|
||||
row.cellConfigAtConfigure["minimumDate"] = NSDate()
|
||||
row.cellConfigAtConfigure["maximumDate"] = NSDate(timeIntervalSinceNow: 60*60*24*3)
|
||||
section.addFormRow(row)
|
||||
|
||||
// Time
|
||||
row = XLFormRowDescriptor(tag: Tags.Time.rawValue, rowType: XLFormRowDescriptorTypeTime, title: "Time")
|
||||
row = XLFormRowDescriptor(tag: Tags.Time, rowType: XLFormRowDescriptorTypeTime, title: "Time")
|
||||
row.cellConfigAtConfigure["minuteInterval"] = 10
|
||||
row.value = NSDate()
|
||||
section.addFormRow(row)
|
||||
|
||||
// DateTime
|
||||
row = XLFormRowDescriptor(tag: Tags.DateTime.rawValue, rowType: XLFormRowDescriptorTypeDateTime, title: "Date Time")
|
||||
row = XLFormRowDescriptor(tag: Tags.DateTime, rowType: XLFormRowDescriptorTypeDateTime, title: "Date Time")
|
||||
row.value = NSDate()
|
||||
section.addFormRow(row)
|
||||
|
||||
// CountDownTimer
|
||||
row = XLFormRowDescriptor(tag: Tags.CountDownTimer.rawValue, rowType: XLFormRowDescriptorTypeCountDownTimer, title: "Countdown Timer")
|
||||
row = XLFormRowDescriptor(tag: Tags.CountDownTimer, rowType: XLFormRowDescriptorTypeCountDownTimer, title: "Countdown Timer")
|
||||
row.value = NSDate()
|
||||
section.addFormRow(row)
|
||||
|
||||
@@ -140,7 +139,7 @@ class DatesFormViewController: XLFormViewController {
|
||||
form.addFormSection(section)
|
||||
|
||||
// DatePicker
|
||||
row = XLFormRowDescriptor(tag: Tags.DatePicker.rawValue, rowType:XLFormRowDescriptorTypeDatePicker)
|
||||
row = XLFormRowDescriptor(tag: Tags.DatePicker, rowType:XLFormRowDescriptorTypeDatePicker)
|
||||
row.cellConfigAtConfigure["datePicker.datePickerMode"] = UIDatePickerMode.Date.rawValue
|
||||
row.value = NSDate()
|
||||
section.addFormRow(row)
|
||||
@@ -154,7 +153,7 @@ class DatesFormViewController: XLFormViewController {
|
||||
|
||||
override func formRowDescriptorValueHasChanged(formRow: XLFormRowDescriptor!, oldValue: AnyObject!, newValue: AnyObject!) {
|
||||
super.formRowDescriptorValueHasChanged(formRow, oldValue: oldValue, newValue: newValue)
|
||||
if formRow.tag == Tags.DatePicker.rawValue {
|
||||
if formRow.tag == Tags.DatePicker {
|
||||
let alertView = UIAlertView(title: "DatePicker", message: "Value Has changed!", delegate: self, cancelButtonTitle: "OK")
|
||||
alertView.show()
|
||||
}
|
||||
|
||||
@@ -26,29 +26,29 @@
|
||||
|
||||
class InputsFormViewController : XLFormViewController {
|
||||
|
||||
|
||||
private enum Tags : String {
|
||||
case Name = "name"
|
||||
case Email = "email"
|
||||
case Twitter = "twitter"
|
||||
case Number = "number"
|
||||
case Integer = "integer"
|
||||
case Decimal = "decimal"
|
||||
case Password = "password"
|
||||
case Phone = "phone"
|
||||
case Url = "url"
|
||||
case TextView = "textView"
|
||||
case Notes = "notes"
|
||||
private struct Tags {
|
||||
static let Name = "name"
|
||||
static let Email = "email"
|
||||
static let Twitter = "twitter"
|
||||
static let Number = "number"
|
||||
static let Integer = "integer"
|
||||
static let Decimal = "decimal"
|
||||
static let Password = "password"
|
||||
static let Phone = "phone"
|
||||
static let Url = "url"
|
||||
static let ZipCode = "zipCode"
|
||||
static let TextView = "textView"
|
||||
static let Notes = "notes"
|
||||
}
|
||||
|
||||
override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: NSBundle?) {
|
||||
super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil)
|
||||
self.initializeForm()
|
||||
initializeForm()
|
||||
}
|
||||
|
||||
required init(coder aDecoder: NSCoder) {
|
||||
required init?(coder aDecoder: NSCoder) {
|
||||
super.init(coder: aDecoder)
|
||||
self.initializeForm()
|
||||
initializeForm()
|
||||
}
|
||||
|
||||
func initializeForm() {
|
||||
@@ -66,44 +66,48 @@ class InputsFormViewController : XLFormViewController {
|
||||
|
||||
|
||||
// Name
|
||||
row = XLFormRowDescriptor(tag: Tags.Name.rawValue, rowType: XLFormRowDescriptorTypeText, title: "Name")
|
||||
row = XLFormRowDescriptor(tag: Tags.Name, rowType: XLFormRowDescriptorTypeText, title: "Name")
|
||||
row.required = true
|
||||
section.addFormRow(row)
|
||||
|
||||
// Email
|
||||
row = XLFormRowDescriptor(tag: Tags.Email.rawValue, rowType: XLFormRowDescriptorTypeEmail, title: "Email")
|
||||
row = XLFormRowDescriptor(tag: Tags.Email, rowType: XLFormRowDescriptorTypeEmail, title: "Email")
|
||||
// validate the email
|
||||
row.addValidator(XLFormValidator.emailValidator())
|
||||
section.addFormRow(row)
|
||||
|
||||
// Twitter
|
||||
row = XLFormRowDescriptor(tag: Tags.Name.rawValue, rowType: XLFormRowDescriptorTypeTwitter, title: "Twitter")
|
||||
row = XLFormRowDescriptor(tag: Tags.Name, rowType: XLFormRowDescriptorTypeTwitter, title: "Twitter")
|
||||
row.disabled = NSNumber(bool: true)
|
||||
row.value = "@no_editable"
|
||||
section.addFormRow(row)
|
||||
|
||||
// Zip Code
|
||||
row = XLFormRowDescriptor(tag: Tags.ZipCode, rowType: XLFormRowDescriptorTypeZipCode, title: "Zip Code")
|
||||
section.addFormRow(row)
|
||||
|
||||
// Number
|
||||
row = XLFormRowDescriptor(tag: Tags.Number.rawValue, rowType: XLFormRowDescriptorTypeNumber, title: "Number")
|
||||
row = XLFormRowDescriptor(tag: Tags.Number, rowType: XLFormRowDescriptorTypeNumber, title: "Number")
|
||||
section.addFormRow(row)
|
||||
|
||||
// Integer
|
||||
row = XLFormRowDescriptor(tag: Tags.Integer.rawValue, rowType: XLFormRowDescriptorTypeInteger, title: "Integer")
|
||||
row = XLFormRowDescriptor(tag: Tags.Integer, rowType: XLFormRowDescriptorTypeInteger, title: "Integer")
|
||||
section.addFormRow(row)
|
||||
|
||||
// Decimal
|
||||
row = XLFormRowDescriptor(tag: Tags.Decimal.rawValue, rowType: XLFormRowDescriptorTypeDecimal, title: "Decimal")
|
||||
row = XLFormRowDescriptor(tag: Tags.Decimal, rowType: XLFormRowDescriptorTypeDecimal, title: "Decimal")
|
||||
section.addFormRow(row)
|
||||
|
||||
// Password
|
||||
row = XLFormRowDescriptor(tag: Tags.Password.rawValue, rowType: XLFormRowDescriptorTypePassword, title: "Password")
|
||||
row = XLFormRowDescriptor(tag: Tags.Password, rowType: XLFormRowDescriptorTypePassword, title: "Password")
|
||||
section.addFormRow(row)
|
||||
|
||||
// Phone
|
||||
row = XLFormRowDescriptor(tag: Tags.Phone.rawValue, rowType: XLFormRowDescriptorTypePhone, title: "Phone")
|
||||
row = XLFormRowDescriptor(tag: Tags.Phone, rowType: XLFormRowDescriptorTypePhone, title: "Phone")
|
||||
section.addFormRow(row)
|
||||
|
||||
// Url
|
||||
row = XLFormRowDescriptor(tag: Tags.Url.rawValue, rowType: XLFormRowDescriptorTypeURL, title: "Url")
|
||||
row = XLFormRowDescriptor(tag: Tags.Url, rowType: XLFormRowDescriptorTypeURL, title: "Url")
|
||||
section.addFormRow(row)
|
||||
|
||||
|
||||
@@ -112,7 +116,7 @@ class InputsFormViewController : XLFormViewController {
|
||||
|
||||
|
||||
// TextView
|
||||
row = XLFormRowDescriptor(tag: Tags.TextView.rawValue, rowType: XLFormRowDescriptorTypeTextView)
|
||||
row = XLFormRowDescriptor(tag: Tags.TextView, rowType: XLFormRowDescriptorTypeTextView)
|
||||
row.cellConfigAtConfigure["textView.placeholder"] = "TEXT VIEW EXAMPLE"
|
||||
section.addFormRow(row)
|
||||
|
||||
@@ -120,7 +124,7 @@ class InputsFormViewController : XLFormViewController {
|
||||
section = XLFormSectionDescriptor.formSectionWithTitle("TextView With Label Example")
|
||||
form.addFormSection(section)
|
||||
|
||||
row = XLFormRowDescriptor(tag: Tags.Number.rawValue, rowType: XLFormRowDescriptorTypeTextView, title: "Notes")
|
||||
row = XLFormRowDescriptor(tag: Tags.Number, rowType: XLFormRowDescriptorTypeTextView, title: "Notes")
|
||||
section.addFormRow(row)
|
||||
|
||||
self.form = form
|
||||
@@ -130,7 +134,7 @@ class InputsFormViewController : XLFormViewController {
|
||||
override func viewDidLoad()
|
||||
{
|
||||
super.viewDidLoad()
|
||||
self.navigationItem.rightBarButtonItem = UIBarButtonItem(barButtonSystemItem: UIBarButtonSystemItem.Save, target: self, action: "savePressed:")
|
||||
navigationItem.rightBarButtonItem = UIBarButtonItem(barButtonSystemItem: .Save, target: self, action: "savePressed:")
|
||||
}
|
||||
|
||||
func savePressed(button: UIBarButtonItem)
|
||||
|
||||
@@ -23,27 +23,24 @@
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
|
||||
|
||||
|
||||
class BlogExampleViewController : XLFormViewController {
|
||||
|
||||
private enum Tags : String {
|
||||
case Hobbies = "hobbies"
|
||||
case Sport = "sport"
|
||||
case Film = "films1"
|
||||
case Film2 = "films2"
|
||||
case Music = "music"
|
||||
private struct Tags {
|
||||
static let Hobbies = "hobbies"
|
||||
static let Sport = "sport"
|
||||
static let Film = "films1"
|
||||
static let Film2 = "films2"
|
||||
static let Music = "music"
|
||||
}
|
||||
|
||||
override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: NSBundle?) {
|
||||
super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil)
|
||||
self.initializeForm()
|
||||
initializeForm()
|
||||
}
|
||||
|
||||
required init(coder aDecoder: NSCoder) {
|
||||
required init?(coder aDecoder: NSCoder) {
|
||||
super.init(coder: aDecoder)
|
||||
self.initializeForm()
|
||||
initializeForm()
|
||||
}
|
||||
|
||||
func initializeForm() {
|
||||
@@ -59,7 +56,7 @@ class BlogExampleViewController : XLFormViewController {
|
||||
form.addFormSection(section)
|
||||
|
||||
|
||||
row = XLFormRowDescriptor(tag: Tags.Hobbies.rawValue, rowType: XLFormRowDescriptorTypeMultipleSelector, title:"Select Hobbies")
|
||||
row = XLFormRowDescriptor(tag: Tags.Hobbies, rowType: XLFormRowDescriptorTypeMultipleSelector, title:"Select Hobbies")
|
||||
row.selectorOptions = ["Sport", "Music", "Films"]
|
||||
row.value = []
|
||||
section.addFormRow(row)
|
||||
@@ -70,20 +67,20 @@ class BlogExampleViewController : XLFormViewController {
|
||||
section.footerTitle = "BlogExampleViewController.swift"
|
||||
form.addFormSection(section)
|
||||
|
||||
row = XLFormRowDescriptor(tag: Tags.Sport.rawValue, rowType: XLFormRowDescriptorTypeTextView, title:"Your favourite sportsman?")
|
||||
row.hidden = "NOT $\(Tags.Hobbies.rawValue).value contains 'Sport'"
|
||||
row = XLFormRowDescriptor(tag: Tags.Sport, rowType: XLFormRowDescriptorTypeTextView, title:"Your favourite sportsman?")
|
||||
row.hidden = "NOT $\(Tags.Hobbies).value contains 'Sport'"
|
||||
section.addFormRow(row)
|
||||
|
||||
row = XLFormRowDescriptor(tag: Tags.Film.rawValue, rowType:XLFormRowDescriptorTypeTextView, title: "Your favourite film?")
|
||||
row.hidden = "NOT $\(Tags.Hobbies.rawValue) contains 'Films'"
|
||||
row = XLFormRowDescriptor(tag: Tags.Film, rowType:XLFormRowDescriptorTypeTextView, title: "Your favourite film?")
|
||||
row.hidden = "NOT $\(Tags.Hobbies) contains 'Films'"
|
||||
section.addFormRow(row)
|
||||
|
||||
row = XLFormRowDescriptor(tag: Tags.Film2.rawValue, rowType:XLFormRowDescriptorTypeTextView, title:"Your favourite actor?")
|
||||
row.hidden = "NOT $\(Tags.Hobbies.rawValue) contains 'Films'"
|
||||
row = XLFormRowDescriptor(tag: Tags.Film2, rowType:XLFormRowDescriptorTypeTextView, title:"Your favourite actor?")
|
||||
row.hidden = "NOT $\(Tags.Hobbies) contains 'Films'"
|
||||
section.addFormRow(row)
|
||||
|
||||
row = XLFormRowDescriptor(tag: Tags.Music.rawValue, rowType:XLFormRowDescriptorTypeTextView, title:"Your favourite singer?")
|
||||
row.hidden = "NOT $\(Tags.Hobbies.rawValue) contains 'Music'"
|
||||
row = XLFormRowDescriptor(tag: Tags.Music, rowType:XLFormRowDescriptorTypeTextView, title:"Your favourite singer?")
|
||||
row.hidden = "NOT $\(Tags.Hobbies) contains 'Music'"
|
||||
section.addFormRow(row)
|
||||
|
||||
self.form = form
|
||||
|
||||
@@ -26,22 +26,22 @@
|
||||
|
||||
class PredicateFormViewController : XLFormViewController {
|
||||
|
||||
private enum Tags : String {
|
||||
case Text = "text"
|
||||
case Integer = "integer"
|
||||
case Switch = "switch"
|
||||
case Date = "date"
|
||||
case Account = "account"
|
||||
private struct Tags {
|
||||
static let Text = "text"
|
||||
static let Integer = "integer"
|
||||
static let Switch = "switch"
|
||||
static let Date = "date"
|
||||
static let Account = "account"
|
||||
}
|
||||
|
||||
override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: NSBundle?) {
|
||||
super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil)
|
||||
self.initializeForm()
|
||||
initializeForm()
|
||||
}
|
||||
|
||||
required init(coder aDecoder: NSCoder) {
|
||||
required init?(coder aDecoder: NSCoder) {
|
||||
super.init(coder: aDecoder)
|
||||
self.initializeForm()
|
||||
initializeForm()
|
||||
}
|
||||
|
||||
func initializeForm() {
|
||||
@@ -56,15 +56,15 @@ class PredicateFormViewController : XLFormViewController {
|
||||
section.title = "Independent rows"
|
||||
form.addFormSection(section)
|
||||
|
||||
row = XLFormRowDescriptor(tag: Tags.Text.rawValue, rowType: XLFormRowDescriptorTypeAccount, title:"Text")
|
||||
row = XLFormRowDescriptor(tag: Tags.Text, rowType: XLFormRowDescriptorTypeAccount, title:"Text")
|
||||
row.cellConfigAtConfigure["textField.placeholder"] = "Type disable"
|
||||
section.addFormRow(row)
|
||||
|
||||
row = XLFormRowDescriptor(tag: Tags.Integer.rawValue, rowType: XLFormRowDescriptorTypeInteger, title:"Integer")
|
||||
row.hidden = NSPredicate(format: "$\(Tags.Switch.rawValue).value==0")
|
||||
row = XLFormRowDescriptor(tag: Tags.Integer, rowType: XLFormRowDescriptorTypeInteger, title:"Integer")
|
||||
row.hidden = NSPredicate(format: "$\(Tags.Switch).value==0")
|
||||
section.addFormRow(row)
|
||||
|
||||
row = XLFormRowDescriptor(tag: Tags.Switch.rawValue, rowType: XLFormRowDescriptorTypeBooleanSwitch, title:"Boolean")
|
||||
row = XLFormRowDescriptor(tag: Tags.Switch, rowType: XLFormRowDescriptorTypeBooleanSwitch, title:"Boolean")
|
||||
row.value = true
|
||||
section.addFormRow(row)
|
||||
|
||||
@@ -76,11 +76,11 @@ class PredicateFormViewController : XLFormViewController {
|
||||
form.addFormSection(section)
|
||||
|
||||
// Predicate Disabling
|
||||
row = XLFormRowDescriptor(tag: Tags.Date.rawValue, rowType: XLFormRowDescriptorTypeDateInline, title:"Disabled")
|
||||
row.value = NSDate.new()
|
||||
row = XLFormRowDescriptor(tag: Tags.Date, rowType: XLFormRowDescriptorTypeDateInline, title:"Disabled")
|
||||
row.value = NSDate()
|
||||
section.addFormRow(row)
|
||||
row.disabled = NSPredicate(format: "$\(Tags.Text.rawValue).value contains[c] 'disable' OR ($\(Tags.Integer.rawValue).value between {18, 60}) OR ($\(Tags.Switch.rawValue).value == 0)")
|
||||
section.hidden = NSPredicate(format: "($\(Tags.Text.rawValue).value contains[c] 'disable') AND ($\(Tags.Integer.rawValue).value between {18, 60}) AND ($\(Tags.Switch.rawValue).value == 0)")
|
||||
row.disabled = NSPredicate(format: "$\(Tags.Text).value contains[c] 'disable' OR ($\(Tags.Integer).value between {18, 60}) OR ($\(Tags.Switch).value == 0)")
|
||||
section.hidden = NSPredicate(format: "($\(Tags.Text).value contains[c] 'disable') AND ($\(Tags.Integer).value between {18, 60}) AND ($\(Tags.Switch).value == 0)")
|
||||
|
||||
|
||||
|
||||
@@ -93,16 +93,15 @@ class PredicateFormViewController : XLFormViewController {
|
||||
|
||||
row = XLFormRowDescriptor(tag: "thirds", rowType:XLFormRowDescriptorTypeAccount, title:"Account")
|
||||
section.addFormRow(row)
|
||||
row.hidden = NSPredicate(format: "$\(Tags.Date.rawValue).isDisabled == 1 AND $\(Tags.Text.rawValue).value contains[c] 'Out'")
|
||||
row.hidden = NSPredicate(format: "$\(Tags.Date).isDisabled == 1 AND $\(Tags.Text).value contains[c] 'Out'")
|
||||
|
||||
|
||||
row.onChangeBlock = {
|
||||
row.onChangeBlock = { [weak self] oldValue, newValue, _ in
|
||||
let noValue = "No Value"
|
||||
let message = "Old value: \($0 ?? noValue), New value: \($1 ?? noValue)"
|
||||
let alertView = UIAlertController(title: "Account Field changed", message: message, preferredStyle: UIAlertControllerStyle.ActionSheet)
|
||||
alertView.addAction(UIAlertAction(title: "Cancel", style: UIAlertActionStyle.Cancel, handler: nil))
|
||||
let row = $2
|
||||
self.navigationController?.presentViewController(alertView, animated: true, completion: nil)
|
||||
let message = "Old value: \(oldValue ?? noValue), New value: \(newValue ?? noValue)"
|
||||
let alertView = UIAlertController(title: "Account Field changed", message: message, preferredStyle: .ActionSheet)
|
||||
alertView.addAction(UIAlertAction(title: "Cancel", style: .Cancel, handler: nil))
|
||||
self?.navigationController?.presentViewController(alertView, animated: true, completion: nil)
|
||||
}
|
||||
|
||||
self.form = form
|
||||
|
||||
@@ -28,7 +28,7 @@ class UserCell : UITableViewCell {
|
||||
|
||||
lazy var userImage : UIImageView = {
|
||||
let tempUserImage = UIImageView()
|
||||
tempUserImage.setTranslatesAutoresizingMaskIntoConstraints(false)
|
||||
tempUserImage.translatesAutoresizingMaskIntoConstraints = false
|
||||
tempUserImage.layer.masksToBounds = true
|
||||
tempUserImage.layer.cornerRadius = 10.0
|
||||
return tempUserImage
|
||||
@@ -37,7 +37,7 @@ class UserCell : UITableViewCell {
|
||||
|
||||
lazy var userName : UILabel = {
|
||||
let tempUserName = UILabel()
|
||||
tempUserName.setTranslatesAutoresizingMaskIntoConstraints(false)
|
||||
tempUserName.translatesAutoresizingMaskIntoConstraints = false
|
||||
tempUserName.font = UIFont.systemFontOfSize(15.0)
|
||||
return tempUserName
|
||||
}()
|
||||
@@ -46,13 +46,12 @@ class UserCell : UITableViewCell {
|
||||
super.init(style: style, reuseIdentifier: reuseIdentifier)
|
||||
// Initialization code
|
||||
|
||||
self.contentView.addSubview(self.userImage)
|
||||
self.contentView.addSubview(self.userName)
|
||||
|
||||
self.contentView.addConstraints(self.layoutConstraints())
|
||||
contentView.addSubview(userImage)
|
||||
contentView.addSubview(userName)
|
||||
contentView.addConstraints(layoutConstraints())
|
||||
}
|
||||
|
||||
required init(coder aDecoder: NSCoder) {
|
||||
required init?(coder aDecoder: NSCoder) {
|
||||
fatalError("init(coder:) has not been implemented")
|
||||
}
|
||||
|
||||
@@ -63,12 +62,12 @@ class UserCell : UITableViewCell {
|
||||
|
||||
// MARK: - Layout Constraints
|
||||
|
||||
func layoutConstraints() -> [AnyObject]{
|
||||
func layoutConstraints() -> [NSLayoutConstraint]{
|
||||
let views = ["image": self.userImage, "name": self.userName ]
|
||||
let metrics = [ "imgSize": 50.0, "margin": 12.0]
|
||||
|
||||
var result = NSLayoutConstraint.constraintsWithVisualFormat("H:|-(margin)-[image(imgSize)]-[name]", options:NSLayoutFormatOptions.AlignAllTop, metrics: metrics, views: views)
|
||||
result += NSLayoutConstraint.constraintsWithVisualFormat("V:|-(margin)-[image(imgSize)]", options:NSLayoutFormatOptions.allZeros, metrics:metrics, views: views)
|
||||
var result = NSLayoutConstraint.constraintsWithVisualFormat("H:|-(margin)-[image(imgSize)]-[name]", options:.AlignAllTop, metrics: metrics, views: views)
|
||||
result += NSLayoutConstraint.constraintsWithVisualFormat("V:|-(margin)-[image(imgSize)]", options:NSLayoutFormatOptions(), metrics:metrics, views: views)
|
||||
return result
|
||||
}
|
||||
|
||||
@@ -93,7 +92,14 @@ class UsersJSONSerialization {
|
||||
"{\"id\":5,\"name\":\"Ned Flanders\",\"imageName\":\"Ned_Flanders.png\"}," +
|
||||
"{\"id\":6,\"name\":\"Otto Mann\",\"imageName\":\"Otto_Mann.png\"}]"
|
||||
let jsonData = dataString.dataUsingEncoding(NSUTF8StringEncoding, allowLossyConversion: true)
|
||||
return NSJSONSerialization.JSONObjectWithData(jsonData!, options: NSJSONReadingOptions.allZeros, error: nil) as! Array<AnyObject>?
|
||||
do {
|
||||
let result = try NSJSONSerialization.JSONObjectWithData(jsonData!, options: NSJSONReadingOptions()) as! Array<AnyObject>
|
||||
return result
|
||||
}
|
||||
catch let error as NSError {
|
||||
print("\(error)")
|
||||
}
|
||||
return nil
|
||||
}()
|
||||
|
||||
class var sharedInstance: UsersJSONSerialization {
|
||||
@@ -140,18 +146,18 @@ class UsersTableViewController : UITableViewController, XLFormRowDescriptorViewC
|
||||
super.init(style: style);
|
||||
}
|
||||
|
||||
override init!(nibName nibNameOrNil: String!, bundle nibBundleOrNil: NSBundle!) {
|
||||
override init(nibName nibNameOrNil: String!, bundle nibBundleOrNil: NSBundle!) {
|
||||
super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil)
|
||||
}
|
||||
|
||||
required init(coder aDecoder: NSCoder) {
|
||||
required init?(coder aDecoder: NSCoder) {
|
||||
super.init(coder: aDecoder)
|
||||
}
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
self.tableView.registerClass(UserCell.self, forCellReuseIdentifier: self.kUserCellIdentifier)
|
||||
self.tableView.tableFooterView = UIView(frame: CGRect.zeroRect)
|
||||
tableView.registerClass(UserCell.self, forCellReuseIdentifier: kUserCellIdentifier)
|
||||
tableView.tableFooterView = UIView(frame: CGRect.zero)
|
||||
}
|
||||
|
||||
// MARK: UITableViewDataSource
|
||||
@@ -171,8 +177,8 @@ class UsersTableViewController : UITableViewController, XLFormRowDescriptorViewC
|
||||
let userId = userData["id"] as! Int
|
||||
cell.userName.text = userData["name"] as? String
|
||||
cell.userImage.image = UIImage(named: (userData["imageName"] as? String)!)
|
||||
if self.rowDescriptor?.value != nil {
|
||||
cell.accessoryType = self.rowDescriptor!.value!.formValue().isEqual(userId) ? .Checkmark : .None
|
||||
if let value = rowDescriptor?.value {
|
||||
cell.accessoryType = value.formValue().isEqual(userId) ? .Checkmark : .None
|
||||
}
|
||||
return cell;
|
||||
|
||||
@@ -195,8 +201,8 @@ class UsersTableViewController : UITableViewController, XLFormRowDescriptorViewC
|
||||
porpOver.dismissPopoverAnimated(true)
|
||||
porpOver.delegate?.popoverControllerDidDismissPopover!(porpOver)
|
||||
}
|
||||
else if self.parentViewController is UINavigationController {
|
||||
self.navigationController?.popViewControllerAnimated(true)
|
||||
else if parentViewController is UINavigationController {
|
||||
navigationController?.popViewControllerAnimated(true)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -366,7 +366,9 @@
|
||||
2847A6961AAF2679000A2ABE /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 0620;
|
||||
LastSwiftMigration = 0700;
|
||||
LastSwiftUpdateCheck = 0700;
|
||||
LastUpgradeCheck = 0700;
|
||||
ORGANIZATIONNAME = Xmartlabs;
|
||||
TargetAttributes = {
|
||||
2847A69D1AAF2679000A2ABE = {
|
||||
@@ -497,6 +499,7 @@
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
@@ -564,6 +567,7 @@
|
||||
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
|
||||
INFOPLIST_FILE = SwiftExample/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.xmartlabs.$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "SwiftExample/SwiftExample-Bridging-Header.h";
|
||||
};
|
||||
@@ -577,6 +581,7 @@
|
||||
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
|
||||
INFOPLIST_FILE = SwiftExample/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.xmartlabs.$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "SwiftExample/SwiftExample-Bridging-Header.h";
|
||||
};
|
||||
|
||||
@@ -28,30 +28,30 @@
|
||||
class AccessoryViewFormViewController : XLFormViewController {
|
||||
|
||||
|
||||
private enum Tags : String {
|
||||
case AccessoryViewRowNavigationEnabled = "RowNavigationEnabled"
|
||||
case AccessoryViewRowNavigationShowAccessoryView = "RowNavigationShowAccessoryView"
|
||||
case AccessoryViewRowNavigationStopDisableRow = "rowNavigationStopDisableRow"
|
||||
case AccessoryViewRowNavigationSkipCanNotBecomeFirstResponderRow = "rowNavigationSkipCanNotBecomeFirstResponderRow"
|
||||
case AccessoryViewRowNavigationStopInlineRow = "rowNavigationStopInlineRow"
|
||||
case AccessoryViewName = "name"
|
||||
case AccessoryViewEmail = "email"
|
||||
case AccessoryViewTwitter = "twitter"
|
||||
case AccessoryViewUrl = "url"
|
||||
case AccessoryViewDate = "date"
|
||||
case AccessoryViewTextView = "textView"
|
||||
case AccessoryViewCheck = "check"
|
||||
case AccessoryViewNotes = "notes"
|
||||
private struct Tags {
|
||||
static let AccessoryViewRowNavigationEnabled = "RowNavigationEnabled"
|
||||
static let AccessoryViewRowNavigationShowAccessoryView = "RowNavigationShowAccessoryView"
|
||||
static let AccessoryViewRowNavigationStopDisableRow = "rowNavigationStopDisableRow"
|
||||
static let AccessoryViewRowNavigationSkipCanNotBecomeFirstResponderRow = "rowNavigationSkipCanNotBecomeFirstResponderRow"
|
||||
static let AccessoryViewRowNavigationStopInlineRow = "rowNavigationStopInlineRow"
|
||||
static let AccessoryViewName = "name"
|
||||
static let AccessoryViewEmail = "email"
|
||||
static let AccessoryViewTwitter = "twitter"
|
||||
static let AccessoryViewUrl = "url"
|
||||
static let AccessoryViewDate = "date"
|
||||
static let AccessoryViewTextView = "textView"
|
||||
static let AccessoryViewCheck = "check"
|
||||
static let AccessoryViewNotes = "notes"
|
||||
}
|
||||
|
||||
override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: NSBundle?) {
|
||||
super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil)
|
||||
self.initializeForm()
|
||||
initializeForm()
|
||||
}
|
||||
|
||||
required init(coder aDecoder: NSCoder) {
|
||||
required init?(coder aDecoder: NSCoder) {
|
||||
super.init(coder: aDecoder)
|
||||
self.initializeForm()
|
||||
initializeForm()
|
||||
}
|
||||
|
||||
func initializeForm() {
|
||||
@@ -61,7 +61,7 @@ class AccessoryViewFormViewController : XLFormViewController {
|
||||
var row : XLFormRowDescriptor
|
||||
|
||||
form = XLFormDescriptor(title: "Accessory View")
|
||||
form.rowNavigationOptions = XLFormRowNavigationOptions.Enabled
|
||||
form.rowNavigationOptions = .Enabled
|
||||
|
||||
// Configuration section
|
||||
section = XLFormSectionDescriptor()
|
||||
@@ -70,65 +70,62 @@ class AccessoryViewFormViewController : XLFormViewController {
|
||||
form.addFormSection(section)
|
||||
|
||||
// RowNavigationEnabled
|
||||
row = XLFormRowDescriptor(tag: Tags.AccessoryViewRowNavigationEnabled.rawValue, rowType: XLFormRowDescriptorTypeBooleanSwitch, title: "Row Navigation Enabled?")
|
||||
row = XLFormRowDescriptor(tag: Tags.AccessoryViewRowNavigationEnabled, rowType: XLFormRowDescriptorTypeBooleanSwitch, title: "Row Navigation Enabled?")
|
||||
row.value = true
|
||||
section.addFormRow(row)
|
||||
|
||||
// RowNavigationShowAccessoryView
|
||||
row = XLFormRowDescriptor(tag: Tags.AccessoryViewRowNavigationShowAccessoryView.rawValue, rowType:XLFormRowDescriptorTypeBooleanCheck, title:"Show input accessory row?")
|
||||
row.value = (form.rowNavigationOptions & XLFormRowNavigationOptions.Enabled) == XLFormRowNavigationOptions.Enabled
|
||||
row.hidden = "$\(Tags.AccessoryViewRowNavigationEnabled.rawValue) == 0"
|
||||
row = XLFormRowDescriptor(tag: Tags.AccessoryViewRowNavigationShowAccessoryView, rowType:XLFormRowDescriptorTypeBooleanCheck, title:"Show input accessory row?")
|
||||
row.value = form.rowNavigationOptions.contains(.Enabled)
|
||||
row.hidden = "$\(Tags.AccessoryViewRowNavigationEnabled) == 0"
|
||||
section.addFormRow(row)
|
||||
|
||||
// RowNavigationStopDisableRow
|
||||
row = XLFormRowDescriptor(tag: Tags.AccessoryViewRowNavigationStopDisableRow.rawValue, rowType: XLFormRowDescriptorTypeBooleanCheck, title:"Stop when reach disabled row?")
|
||||
row.value = (form.rowNavigationOptions & XLFormRowNavigationOptions.StopDisableRow) == XLFormRowNavigationOptions.StopDisableRow
|
||||
row.hidden = "$\(Tags.AccessoryViewRowNavigationEnabled.rawValue) == 0"
|
||||
row = XLFormRowDescriptor(tag: Tags.AccessoryViewRowNavigationStopDisableRow, rowType: XLFormRowDescriptorTypeBooleanCheck, title:"Stop when reach disabled row?")
|
||||
row.value = form.rowNavigationOptions.contains(.StopDisableRow)
|
||||
row.hidden = "$\(Tags.AccessoryViewRowNavigationEnabled) == 0"
|
||||
section.addFormRow(row)
|
||||
|
||||
// RowNavigationStopInlineRow
|
||||
row = XLFormRowDescriptor(tag: Tags.AccessoryViewRowNavigationStopInlineRow.rawValue, rowType: XLFormRowDescriptorTypeBooleanCheck, title: "Stop when reach inline row?")
|
||||
row.value = (form.rowNavigationOptions & XLFormRowNavigationOptions.StopInlineRow) == XLFormRowNavigationOptions.StopInlineRow
|
||||
row.hidden = "$\(Tags.AccessoryViewRowNavigationEnabled.rawValue) == 0"
|
||||
row = XLFormRowDescriptor(tag: Tags.AccessoryViewRowNavigationStopInlineRow, rowType: XLFormRowDescriptorTypeBooleanCheck, title: "Stop when reach inline row?")
|
||||
row.value = form.rowNavigationOptions.contains(.StopInlineRow)
|
||||
row.hidden = "$\(Tags.AccessoryViewRowNavigationEnabled) == 0"
|
||||
section.addFormRow(row)
|
||||
|
||||
// RowNavigationSkipCanNotBecomeFirstResponderRow
|
||||
row = XLFormRowDescriptor(tag: Tags.AccessoryViewRowNavigationSkipCanNotBecomeFirstResponderRow.rawValue, rowType:XLFormRowDescriptorTypeBooleanCheck, title:"Skip Can Not Become First Responder Row?")
|
||||
row.value = (form.rowNavigationOptions & XLFormRowNavigationOptions.SkipCanNotBecomeFirstResponderRow) == XLFormRowNavigationOptions.SkipCanNotBecomeFirstResponderRow
|
||||
row.hidden = "$\(Tags.AccessoryViewRowNavigationEnabled.rawValue) == 0"
|
||||
row = XLFormRowDescriptor(tag: Tags.AccessoryViewRowNavigationSkipCanNotBecomeFirstResponderRow, rowType:XLFormRowDescriptorTypeBooleanCheck, title:"Skip Can Not Become First Responder Row?")
|
||||
row.value = form.rowNavigationOptions.contains(XLFormRowNavigationOptions.SkipCanNotBecomeFirstResponderRow)
|
||||
row.hidden = "$\(Tags.AccessoryViewRowNavigationEnabled) == 0"
|
||||
section.addFormRow(row)
|
||||
|
||||
|
||||
|
||||
section = XLFormSectionDescriptor()
|
||||
form.addFormSection(section)
|
||||
|
||||
|
||||
// Name
|
||||
row = XLFormRowDescriptor(tag: Tags.AccessoryViewName.rawValue, rowType: XLFormRowDescriptorTypeText, title: "Name")
|
||||
row = XLFormRowDescriptor(tag: Tags.AccessoryViewName, rowType: XLFormRowDescriptorTypeText, title: "Name")
|
||||
row.required = true
|
||||
section.addFormRow(row)
|
||||
|
||||
// Email
|
||||
row = XLFormRowDescriptor(tag: Tags.AccessoryViewEmail.rawValue, rowType: XLFormRowDescriptorTypeEmail, title: "Email")
|
||||
row = XLFormRowDescriptor(tag: Tags.AccessoryViewEmail, rowType: XLFormRowDescriptorTypeEmail, title: "Email")
|
||||
// validate the email
|
||||
row.addValidator(XLFormValidator.emailValidator())
|
||||
section.addFormRow(row)
|
||||
|
||||
// Twitter
|
||||
row = XLFormRowDescriptor(tag: Tags.AccessoryViewTwitter.rawValue, rowType: XLFormRowDescriptorTypeTwitter, title: "Twitter")
|
||||
row = XLFormRowDescriptor(tag: Tags.AccessoryViewTwitter, rowType: XLFormRowDescriptorTypeTwitter, title: "Twitter")
|
||||
row.disabled = NSNumber(bool: true)
|
||||
row.value = "@no_editable"
|
||||
section.addFormRow(row)
|
||||
|
||||
// Url
|
||||
row = XLFormRowDescriptor(tag: Tags.AccessoryViewUrl.rawValue, rowType: XLFormRowDescriptorTypeURL, title: "Url")
|
||||
row = XLFormRowDescriptor(tag: Tags.AccessoryViewUrl, rowType: XLFormRowDescriptorTypeURL, title: "Url")
|
||||
section.addFormRow(row)
|
||||
|
||||
|
||||
// Date
|
||||
row = XLFormRowDescriptor(tag: Tags.AccessoryViewDate.rawValue, rowType:XLFormRowDescriptorTypeDateInline, title:"Date Inline")
|
||||
row.value = NSDate.new()
|
||||
row = XLFormRowDescriptor(tag: Tags.AccessoryViewDate, rowType:XLFormRowDescriptorTypeDateInline, title:"Date Inline")
|
||||
row.value = NSDate()
|
||||
section.addFormRow(row)
|
||||
|
||||
|
||||
@@ -138,17 +135,17 @@ class AccessoryViewFormViewController : XLFormViewController {
|
||||
|
||||
|
||||
|
||||
row = XLFormRowDescriptor(tag: Tags.AccessoryViewTextView.rawValue, rowType:XLFormRowDescriptorTypeTextView)
|
||||
row = XLFormRowDescriptor(tag: Tags.AccessoryViewTextView, rowType:XLFormRowDescriptorTypeTextView)
|
||||
row.cellConfigAtConfigure["textView.placeholder"] = "TEXT VIEW EXAMPLE"
|
||||
section.addFormRow(row)
|
||||
|
||||
row = XLFormRowDescriptor(tag: Tags.AccessoryViewCheck.rawValue, rowType:XLFormRowDescriptorTypeBooleanCheck, title:"Check")
|
||||
row = XLFormRowDescriptor(tag: Tags.AccessoryViewCheck, rowType:XLFormRowDescriptorTypeBooleanCheck, title:"Check")
|
||||
section.addFormRow(row)
|
||||
|
||||
section = XLFormSectionDescriptor()
|
||||
form.addFormSection(section)
|
||||
|
||||
row = XLFormRowDescriptor(tag: Tags.AccessoryViewNotes.rawValue, rowType:XLFormRowDescriptorTypeTextView, title:"Notes")
|
||||
row = XLFormRowDescriptor(tag: Tags.AccessoryViewNotes, rowType:XLFormRowDescriptorTypeTextView, title:"Notes")
|
||||
section.addFormRow(row)
|
||||
|
||||
self.form = form
|
||||
@@ -156,7 +153,7 @@ class AccessoryViewFormViewController : XLFormViewController {
|
||||
|
||||
|
||||
override func inputAccessoryViewForRowDescriptor(rowDescriptor: XLFormRowDescriptor!) -> UIView! {
|
||||
if self.form.formRowWithTag(Tags.AccessoryViewRowNavigationShowAccessoryView.rawValue)!.value!.boolValue == false {
|
||||
if form.formRowWithTag(Tags.AccessoryViewRowNavigationShowAccessoryView)!.value!.boolValue == false {
|
||||
return nil
|
||||
}
|
||||
return super.inputAccessoryViewForRowDescriptor(rowDescriptor)
|
||||
@@ -167,28 +164,32 @@ class AccessoryViewFormViewController : XLFormViewController {
|
||||
|
||||
override func formRowDescriptorValueHasChanged(formRow: XLFormRowDescriptor!, oldValue: AnyObject!, newValue: AnyObject!) {
|
||||
super.formRowDescriptorValueHasChanged(formRow, oldValue: oldValue, newValue: newValue)
|
||||
if formRow.tag == Tags.AccessoryViewRowNavigationStopDisableRow.rawValue {
|
||||
if formRow.tag == Tags.AccessoryViewRowNavigationStopDisableRow {
|
||||
if formRow.value!.boolValue == true {
|
||||
self.form.rowNavigationOptions = self.form.rowNavigationOptions | XLFormRowNavigationOptions.StopDisableRow
|
||||
form.rowNavigationOptions = form.rowNavigationOptions.union(.StopDisableRow)
|
||||
}
|
||||
else{
|
||||
self.form.rowNavigationOptions = self.form.rowNavigationOptions & (~XLFormRowNavigationOptions.StopDisableRow)
|
||||
form.rowNavigationOptions = form.rowNavigationOptions.subtract(.StopDisableRow)
|
||||
}
|
||||
}
|
||||
else if formRow.tag == Tags.AccessoryViewRowNavigationStopInlineRow.rawValue {
|
||||
else if formRow.tag == Tags.AccessoryViewRowNavigationStopInlineRow {
|
||||
if formRow.value!.boolValue == true {
|
||||
self.form.rowNavigationOptions = self.form.rowNavigationOptions | XLFormRowNavigationOptions.StopInlineRow
|
||||
form.rowNavigationOptions = form.rowNavigationOptions.union(.StopInlineRow)
|
||||
}
|
||||
else{
|
||||
self.form.rowNavigationOptions = self.form.rowNavigationOptions & (~XLFormRowNavigationOptions.StopInlineRow)
|
||||
var options = form.rowNavigationOptions
|
||||
options = options.subtract(XLFormRowNavigationOptions.StopInlineRow)
|
||||
form.rowNavigationOptions = options
|
||||
}
|
||||
}
|
||||
else if formRow.tag == Tags.AccessoryViewRowNavigationSkipCanNotBecomeFirstResponderRow.rawValue {
|
||||
else if formRow.tag == Tags.AccessoryViewRowNavigationSkipCanNotBecomeFirstResponderRow {
|
||||
if formRow.value!.boolValue == true {
|
||||
self.form.rowNavigationOptions = self.form.rowNavigationOptions | XLFormRowNavigationOptions.SkipCanNotBecomeFirstResponderRow
|
||||
form.rowNavigationOptions = form.rowNavigationOptions.union(.SkipCanNotBecomeFirstResponderRow)
|
||||
}
|
||||
else{
|
||||
self.form.rowNavigationOptions = self.form.rowNavigationOptions & (~XLFormRowNavigationOptions.SkipCanNotBecomeFirstResponderRow)
|
||||
var options = form.rowNavigationOptions
|
||||
options = options.subtract(.SkipCanNotBecomeFirstResponderRow)
|
||||
form.rowNavigationOptions = options
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -24,11 +24,11 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||
// Override point for customization after application launch.
|
||||
self.window = UIWindow.init(frame: UIScreen.mainScreen().bounds)
|
||||
// Override point for customization after application launch.
|
||||
self.window!.backgroundColor = UIColor.whiteColor()
|
||||
self.window!.backgroundColor = .whiteColor()
|
||||
|
||||
// load the initial form form Storybiard
|
||||
let storyboard = UIStoryboard.init(name:"iPhoneStoryboard", bundle:nil)
|
||||
self.window!.rootViewController = storyboard.instantiateInitialViewController() as? UIViewController
|
||||
self.window!.rootViewController = storyboard.instantiateInitialViewController()
|
||||
self.window!.makeKeyAndVisible()
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -28,19 +28,19 @@ import MapKit
|
||||
|
||||
class CustomSelectorsFormViewController : XLFormViewController {
|
||||
|
||||
private enum Tags : String {
|
||||
case SelectorMap = "selectorMap"
|
||||
case SelectorMapPopover = "selectorMapPopover"
|
||||
private struct Tags {
|
||||
static let SelectorMap = "selectorMap"
|
||||
static let SelectorMapPopover = "selectorMapPopover"
|
||||
}
|
||||
|
||||
override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: NSBundle?) {
|
||||
super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil)
|
||||
self.initializeForm()
|
||||
initializeForm()
|
||||
}
|
||||
|
||||
required init(coder aDecoder: NSCoder) {
|
||||
required init?(coder aDecoder: NSCoder) {
|
||||
super.init(coder: aDecoder)
|
||||
self.initializeForm()
|
||||
initializeForm()
|
||||
}
|
||||
|
||||
func initializeForm() {
|
||||
@@ -56,15 +56,15 @@ class CustomSelectorsFormViewController : XLFormViewController {
|
||||
form.addFormSection(section)
|
||||
|
||||
// Selector Push
|
||||
row = XLFormRowDescriptor(tag: Tags.SelectorMap.rawValue, rowType: XLFormRowDescriptorTypeSelectorPush, title: "Coordinate")
|
||||
row = XLFormRowDescriptor(tag: Tags.SelectorMap, rowType: XLFormRowDescriptorTypeSelectorPush, title: "Coordinate")
|
||||
row.action.viewControllerClass = MapViewController.self
|
||||
row.valueTransformer = CLLocationValueTrasformer.self
|
||||
row.value = CLLocation(latitude: -33, longitude: -56)
|
||||
section.addFormRow(row)
|
||||
|
||||
if UIDevice.currentDevice().userInterfaceIdiom == UIUserInterfaceIdiom.Pad {
|
||||
if UIDevice.currentDevice().userInterfaceIdiom == .Pad {
|
||||
// Selector PopOver
|
||||
row = XLFormRowDescriptor(tag: Tags.SelectorMapPopover.rawValue, rowType: XLFormRowDescriptorTypeSelectorPopover, title: "Coordinate PopOver")
|
||||
row = XLFormRowDescriptor(tag: Tags.SelectorMapPopover, rowType: XLFormRowDescriptorTypeSelectorPopover, title: "Coordinate PopOver")
|
||||
row.action.viewControllerClass = MapViewController.self
|
||||
row.valueTransformer = CLLocationValueTrasformer.self
|
||||
row.value = CLLocation(latitude: -33, longitude: -56)
|
||||
|
||||
+1
-4
@@ -37,13 +37,10 @@ class CLLocationValueTrasformer : NSValueTransformer {
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
override func transformedValue(value: AnyObject?) -> AnyObject? {
|
||||
if let valueData: AnyObject = value {
|
||||
let location = valueData as! CLLocation
|
||||
if let valueData = value, let location = valueData as? CLLocation{
|
||||
return String(format: "%0.4f, %0.4f", location.coordinate.latitude, location.coordinate.longitude)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+20
-24
@@ -31,7 +31,7 @@ class MapAnnotation : NSObject, MKAnnotation {
|
||||
@objc var coordinate : CLLocationCoordinate2D
|
||||
|
||||
override init() {
|
||||
self.coordinate = CLLocationCoordinate2D(latitude: -33.0, longitude: -56.0)
|
||||
coordinate = CLLocationCoordinate2D(latitude: -33.0, longitude: -56.0)
|
||||
super.init()
|
||||
}
|
||||
}
|
||||
@@ -40,43 +40,37 @@ class MapAnnotation : NSObject, MKAnnotation {
|
||||
class MapViewController : UIViewController, XLFormRowDescriptorViewController, MKMapViewDelegate {
|
||||
|
||||
var rowDescriptor: XLFormRowDescriptor?
|
||||
lazy var mapView : MKMapView = {
|
||||
lazy var mapView : MKMapView = { [unowned self] in
|
||||
let mapView = MKMapView(frame: self.view.frame)
|
||||
mapView.autoresizingMask = UIViewAutoresizing.FlexibleHeight | UIViewAutoresizing.FlexibleWidth
|
||||
mapView.autoresizingMask = [UIViewAutoresizing.FlexibleHeight, UIViewAutoresizing.FlexibleWidth]
|
||||
return mapView
|
||||
}()
|
||||
|
||||
override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: NSBundle?) {
|
||||
|
||||
super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil)
|
||||
}
|
||||
|
||||
required init(coder aDecoder: NSCoder) {
|
||||
|
||||
required init?(coder aDecoder: NSCoder) {
|
||||
super.init(coder: aDecoder)
|
||||
}
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
// Do any additional setup after loading the view.
|
||||
self.view.addSubview(self.mapView)
|
||||
self.mapView.delegate = self
|
||||
if let rowDesc = self.rowDescriptor {
|
||||
if rowDesc.value != nil {
|
||||
let coordinate = (self.rowDescriptor!.value as! CLLocation).coordinate
|
||||
self.mapView.setCenterCoordinate(coordinate, animated: false)
|
||||
self.title = String(format: "%0.4f, %0.4f", self.mapView.centerCoordinate.latitude, self.mapView.centerCoordinate.longitude)
|
||||
let annotation = MapAnnotation()
|
||||
annotation.coordinate = coordinate
|
||||
self.mapView.addAnnotation(annotation)
|
||||
}
|
||||
view.addSubview(mapView)
|
||||
mapView.delegate = self
|
||||
if let value = rowDescriptor?.value as? CLLocation {
|
||||
mapView.setCenterCoordinate(value.coordinate, animated: false)
|
||||
title = String(format: "%0.4f, %0.4f", mapView.centerCoordinate.latitude, mapView.centerCoordinate.longitude)
|
||||
let annotation = MapAnnotation()
|
||||
annotation.coordinate = value.coordinate
|
||||
self.mapView.addAnnotation(annotation)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//MARK - - MKMapViewDelegate
|
||||
|
||||
func mapView(mapView: MKMapView!, viewForAnnotation annotation: MKAnnotation!) -> MKAnnotationView! {
|
||||
func mapView(mapView: MKMapView, viewForAnnotation annotation: MKAnnotation) -> MKAnnotationView? {
|
||||
|
||||
let pinAnnotationView = MKPinAnnotationView(annotation: annotation, reuseIdentifier: "annotation")
|
||||
pinAnnotationView.pinColor = MKPinAnnotationColor.Red
|
||||
@@ -84,12 +78,14 @@ class MapViewController : UIViewController, XLFormRowDescriptorViewController, M
|
||||
pinAnnotationView.animatesDrop = true
|
||||
return pinAnnotationView
|
||||
}
|
||||
|
||||
|
||||
func mapView(mapView: MKMapView!, annotationView view: MKAnnotationView!, didChangeDragState newState: MKAnnotationViewDragState, fromOldState oldState: MKAnnotationViewDragState) {
|
||||
if (newState == MKAnnotationViewDragState.Ending){
|
||||
self.rowDescriptor!.value = CLLocation(latitude:view.annotation.coordinate.latitude, longitude:view.annotation.coordinate.longitude)
|
||||
self.title = String(format: "%0.4f, %0.4f", view.annotation.coordinate.latitude, view.annotation.coordinate.longitude)
|
||||
|
||||
func mapView(mapView: MKMapView, annotationView view: MKAnnotationView, didChangeDragState newState: MKAnnotationViewDragState, fromOldState oldState: MKAnnotationViewDragState) {
|
||||
if (newState == .Ending){
|
||||
if let rowDescriptor = rowDescriptor, let annotation = view.annotation {
|
||||
rowDescriptor.value = CLLocation(latitude:annotation.coordinate.latitude, longitude:annotation.coordinate.longitude)
|
||||
self.title = String(format: "%0.4f, %0.4f", annotation.coordinate.latitude, annotation.coordinate.longitude)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+4
-2
@@ -1,7 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7531" systemVersion="14D136" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="8191" systemVersion="15A279b" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7520"/>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8154"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="MapViewController" customModule="SwiftExample" customModuleProvider="target">
|
||||
@@ -13,6 +14,7 @@
|
||||
<view contentMode="scaleToFill" id="iN0-l3-epB">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<animations/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
</objects>
|
||||
|
||||
+4
-4
@@ -27,12 +27,12 @@ class DynamicSelectorsFormViewController : XLFormViewController {
|
||||
|
||||
override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: NSBundle?) {
|
||||
super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil)
|
||||
self.initializeForm()
|
||||
initializeForm()
|
||||
}
|
||||
|
||||
required init(coder aDecoder: NSCoder) {
|
||||
required init?(coder aDecoder: NSCoder) {
|
||||
super.init(coder: aDecoder)
|
||||
self.initializeForm()
|
||||
initializeForm()
|
||||
}
|
||||
|
||||
func initializeForm() {
|
||||
@@ -51,7 +51,7 @@ class DynamicSelectorsFormViewController : XLFormViewController {
|
||||
row.action.viewControllerClass = UsersTableViewController.self
|
||||
section.addFormRow(row)
|
||||
|
||||
if UIDevice.currentDevice().userInterfaceIdiom == UIUserInterfaceIdiom.Pad {
|
||||
if UIDevice.currentDevice().userInterfaceIdiom == .Pad {
|
||||
// Selector PopOver
|
||||
row = XLFormRowDescriptor(tag: "selectorUserPopover", rowType:XLFormRowDescriptorTypeSelectorPopover, title:"User Popover")
|
||||
row.action.viewControllerClass = UsersTableViewController.self
|
||||
|
||||
@@ -28,32 +28,32 @@
|
||||
|
||||
class ExamplesFormViewController : XLFormViewController {
|
||||
|
||||
private enum Tags : String {
|
||||
case RealExample = "RealExamples"
|
||||
case TextFieldAndTextView = "TextFieldAndTextView"
|
||||
case Selectors = "Selectors"
|
||||
case Othes = "Others"
|
||||
case Dates = "Dates"
|
||||
case Predicates = "BasicPredicates"
|
||||
case BlogExample = "BlogPredicates"
|
||||
case Multivalued = "Multivalued"
|
||||
case MultivaluedOnlyReorder = "MultivaluedOnlyReorder"
|
||||
case MultivaluedOnlyInsert = "MultivaluedOnlyInsert"
|
||||
case MultivaluedOnlyDelete = "MultivaluedOnlyDelete"
|
||||
case Validations = "Validations"
|
||||
case UICusomization = "Customization"
|
||||
case Custom = "Custom"
|
||||
case AccessoryView = "Accessory View"
|
||||
private struct Tags {
|
||||
static let RealExample = "RealExamples"
|
||||
static let TextFieldAndTextView = "TextFieldAndTextView"
|
||||
static let Selectors = "Selectors"
|
||||
static let Othes = "Others"
|
||||
static let Dates = "Dates"
|
||||
static let Predicates = "BasicPredicates"
|
||||
static let BlogExample = "BlogPredicates"
|
||||
static let Multivalued = "Multivalued"
|
||||
static let MultivaluedOnlyReorder = "MultivaluedOnlyReorder"
|
||||
static let MultivaluedOnlyInsert = "MultivaluedOnlyInsert"
|
||||
static let MultivaluedOnlyDelete = "MultivaluedOnlyDelete"
|
||||
static let Validations = "Validations"
|
||||
static let UICusomization = "Customization"
|
||||
static let Custom = "Custom"
|
||||
static let AccessoryView = "Accessory View"
|
||||
}
|
||||
|
||||
override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: NSBundle?) {
|
||||
super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil)
|
||||
self.initializeForm()
|
||||
initializeForm()
|
||||
}
|
||||
|
||||
required init(coder aDecoder: NSCoder) {
|
||||
required init?(coder aDecoder: NSCoder) {
|
||||
super.init(coder: aDecoder)
|
||||
self.initializeForm()
|
||||
initializeForm()
|
||||
}
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ class ExamplesFormViewController : XLFormViewController {
|
||||
form.addFormSection(section)
|
||||
|
||||
// NativeEventFormViewController
|
||||
row = XLFormRowDescriptor(tag: Tags.RealExample.rawValue, rowType: XLFormRowDescriptorTypeButton, title: "iOS Calendar Event Form")
|
||||
row = XLFormRowDescriptor(tag: Tags.RealExample, rowType: XLFormRowDescriptorTypeButton, title: "iOS Calendar Event Form")
|
||||
row.action.formSegueIdenfifier = "NativeEventNavigationViewControllerSegue"
|
||||
section.addFormRow(row)
|
||||
|
||||
@@ -80,24 +80,24 @@ class ExamplesFormViewController : XLFormViewController {
|
||||
|
||||
|
||||
// TextFieldAndTextView
|
||||
row = XLFormRowDescriptor(tag: Tags.TextFieldAndTextView.rawValue, rowType: XLFormRowDescriptorTypeButton, title: "Text Fields")
|
||||
row = XLFormRowDescriptor(tag: Tags.TextFieldAndTextView, rowType: XLFormRowDescriptorTypeButton, title: "Text Fields")
|
||||
row.action.viewControllerClass = InputsFormViewController.self
|
||||
section.addFormRow(row)
|
||||
|
||||
|
||||
// Selectors
|
||||
row = XLFormRowDescriptor(tag: Tags.Selectors.rawValue, rowType: XLFormRowDescriptorTypeButton, title: "Selectors")
|
||||
row = XLFormRowDescriptor(tag: Tags.Selectors, rowType: XLFormRowDescriptorTypeButton, title: "Selectors")
|
||||
row.action.formSegueIdenfifier = "SelectorsFormViewControllerSegue"
|
||||
section.addFormRow(row)
|
||||
|
||||
|
||||
// Dates
|
||||
row = XLFormRowDescriptor(tag: Tags.Dates.rawValue, rowType: XLFormRowDescriptorTypeButton, title: "Date & Time")
|
||||
row = XLFormRowDescriptor(tag: Tags.Dates, rowType: XLFormRowDescriptorTypeButton, title: "Date & Time")
|
||||
row.action.viewControllerClass = DatesFormViewController.self
|
||||
section.addFormRow(row)
|
||||
|
||||
// Others
|
||||
row = XLFormRowDescriptor(tag: Tags.Othes.rawValue, rowType: XLFormRowDescriptorTypeButton, title: "Other Rows")
|
||||
row = XLFormRowDescriptor(tag: Tags.Othes, rowType: XLFormRowDescriptorTypeButton, title: "Other Rows")
|
||||
row.action.formSegueIdenfifier = "OthersFormViewControllerSegue"
|
||||
section.addFormRow(row)
|
||||
|
||||
@@ -106,19 +106,19 @@ class ExamplesFormViewController : XLFormViewController {
|
||||
form.addFormSection(section)
|
||||
|
||||
|
||||
row = XLFormRowDescriptor(tag: Tags.Multivalued.rawValue, rowType: XLFormRowDescriptorTypeButton, title: "Multivalued Sections")
|
||||
row = XLFormRowDescriptor(tag: Tags.Multivalued, rowType: XLFormRowDescriptorTypeButton, title: "Multivalued Sections")
|
||||
row.action.viewControllerClass = MultivaluedFormViewController.self
|
||||
section.addFormRow(row)
|
||||
|
||||
row = XLFormRowDescriptor(tag: Tags.MultivaluedOnlyReorder.rawValue, rowType: XLFormRowDescriptorTypeButton, title: "Multivalued Only Reorder")
|
||||
row = XLFormRowDescriptor(tag: Tags.MultivaluedOnlyReorder, rowType: XLFormRowDescriptorTypeButton, title: "Multivalued Only Reorder")
|
||||
row.action.viewControllerClass = MultivaluedOnlyReorderViewController.self
|
||||
section.addFormRow(row)
|
||||
|
||||
row = XLFormRowDescriptor(tag: Tags.MultivaluedOnlyInsert.rawValue, rowType: XLFormRowDescriptorTypeButton, title: "Multivalued Only Insert")
|
||||
row = XLFormRowDescriptor(tag: Tags.MultivaluedOnlyInsert, rowType: XLFormRowDescriptorTypeButton, title: "Multivalued Only Insert")
|
||||
row.action.viewControllerClass = MultivaluedOnlyInserViewController.self
|
||||
section.addFormRow(row)
|
||||
|
||||
row = XLFormRowDescriptor(tag: Tags.MultivaluedOnlyDelete.rawValue, rowType: XLFormRowDescriptorTypeButton, title: "Multivalued Only Delete")
|
||||
row = XLFormRowDescriptor(tag: Tags.MultivaluedOnlyDelete, rowType: XLFormRowDescriptorTypeButton, title: "Multivalued Only Delete")
|
||||
row.action.viewControllerClass = MultivaluedOnlyDeleteViewController.self
|
||||
section.addFormRow(row)
|
||||
|
||||
@@ -126,7 +126,7 @@ class ExamplesFormViewController : XLFormViewController {
|
||||
section = XLFormSectionDescriptor.formSectionWithTitle("UI Customization")
|
||||
form.addFormSection(section)
|
||||
|
||||
row = XLFormRowDescriptor(tag: Tags.UICusomization.rawValue, rowType: XLFormRowDescriptorTypeButton, title:"UI Customization")
|
||||
row = XLFormRowDescriptor(tag: Tags.UICusomization, rowType: XLFormRowDescriptorTypeButton, title:"UI Customization")
|
||||
row.action.viewControllerClass = UICustomizationFormViewController.self
|
||||
section.addFormRow(row)
|
||||
|
||||
@@ -134,14 +134,14 @@ class ExamplesFormViewController : XLFormViewController {
|
||||
form.addFormSection(section)
|
||||
|
||||
|
||||
row = XLFormRowDescriptor(tag: Tags.Custom.rawValue, rowType: XLFormRowDescriptorTypeButton, title:"Custom Rows")
|
||||
row = XLFormRowDescriptor(tag: Tags.Custom, rowType: XLFormRowDescriptorTypeButton, title:"Custom Rows")
|
||||
row.action.viewControllerClass = CustomRowsViewController.self
|
||||
section.addFormRow(row)
|
||||
|
||||
section = XLFormSectionDescriptor.formSectionWithTitle("Accessory View")
|
||||
form.addFormSection(section)
|
||||
|
||||
row = XLFormRowDescriptor(tag: Tags.AccessoryView.rawValue, rowType: XLFormRowDescriptorTypeButton, title:"Accessory Views")
|
||||
row = XLFormRowDescriptor(tag: Tags.AccessoryView, rowType: XLFormRowDescriptorTypeButton, title:"Accessory Views")
|
||||
row.action.viewControllerClass = AccessoryViewFormViewController.self
|
||||
section.addFormRow(row)
|
||||
|
||||
@@ -150,7 +150,7 @@ class ExamplesFormViewController : XLFormViewController {
|
||||
form.addFormSection(section)
|
||||
|
||||
|
||||
row = XLFormRowDescriptor(tag: Tags.Validations.rawValue, rowType: XLFormRowDescriptorTypeButton, title: "Validation Examples")
|
||||
row = XLFormRowDescriptor(tag: Tags.Validations, rowType: XLFormRowDescriptorTypeButton, title: "Validation Examples")
|
||||
row.action.formSegueIdenfifier = "ValidationExamplesFormViewControllerSegue"
|
||||
section.addFormRow(row)
|
||||
|
||||
@@ -158,17 +158,17 @@ class ExamplesFormViewController : XLFormViewController {
|
||||
form.addFormSection(section)
|
||||
|
||||
|
||||
row = XLFormRowDescriptor(tag: Tags.Predicates.rawValue, rowType: XLFormRowDescriptorTypeButton, title: "Very basic predicates")
|
||||
row = XLFormRowDescriptor(tag: Tags.Predicates, rowType: XLFormRowDescriptorTypeButton, title: "Very basic predicates")
|
||||
row.action.formSegueIdenfifier = "BasicPredicateViewControllerSegue"
|
||||
section.addFormRow(row)
|
||||
|
||||
|
||||
row = XLFormRowDescriptor(tag: Tags.Predicates.rawValue, rowType: XLFormRowDescriptorTypeButton, title: "Blog Example Hide predicates")
|
||||
row = XLFormRowDescriptor(tag: Tags.Predicates, rowType: XLFormRowDescriptorTypeButton, title: "Blog Example Hide predicates")
|
||||
row.action.formSegueIdenfifier = "BlogExampleViewSegue"
|
||||
section.addFormRow(row)
|
||||
|
||||
|
||||
row = XLFormRowDescriptor(tag: Tags.Predicates.rawValue, rowType: XLFormRowDescriptorTypeButton, title: "Another example")
|
||||
row = XLFormRowDescriptor(tag: Tags.Predicates, rowType: XLFormRowDescriptorTypeButton, title: "Another example")
|
||||
row.action.formSegueIdenfifier = "PredicateFormViewControllerSegue"
|
||||
section.addFormRow(row)
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 931 B After Width: | Height: | Size: 931 B |
+21
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "default-avatar@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
BIN
Binary file not shown.
|
After Width: | Height: | Size: 7.5 KiB |
@@ -7,7 +7,7 @@
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.xmartlabs.$(PRODUCT_NAME:rfc1034identifier)</string>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
|
||||
+35
-44
@@ -25,17 +25,15 @@
|
||||
|
||||
|
||||
class MultivaluedFormViewController : XLFormViewController {
|
||||
|
||||
|
||||
required init(coder aDecoder: NSCoder) {
|
||||
required init?(coder aDecoder: NSCoder) {
|
||||
super.init(coder: aDecoder)
|
||||
self.initializeForm()
|
||||
initializeForm()
|
||||
}
|
||||
|
||||
|
||||
override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: NSBundle?) {
|
||||
super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil)
|
||||
self.initializeForm()
|
||||
initializeForm()
|
||||
}
|
||||
|
||||
func initializeForm() {
|
||||
@@ -47,7 +45,7 @@ class MultivaluedFormViewController : XLFormViewController {
|
||||
form = XLFormDescriptor(title: "Multivalued Examples")
|
||||
|
||||
// Multivalued section
|
||||
section = XLFormSectionDescriptor.formSectionWithTitle("Multivalued TextField", sectionOptions:XLFormSectionOptions.CanReorder | XLFormSectionOptions.CanInsert | XLFormSectionOptions.CanDelete, sectionInsertMode:XLFormSectionInsertMode.Button)
|
||||
section = XLFormSectionDescriptor.formSectionWithTitle("Multivalued TextField", sectionOptions:XLFormSectionOptions.CanReorder.union(.CanInsert).union(.CanDelete), sectionInsertMode:.Button)
|
||||
section.multivaluedAddButton!.title = "Add New Tag"
|
||||
section.footerTitle = "XLFormSectionInsertModeButton sectionType adds a 'Add Item' (Add New Tag) button row as last cell."
|
||||
// set up the row template
|
||||
@@ -57,12 +55,8 @@ class MultivaluedFormViewController : XLFormViewController {
|
||||
|
||||
form.addFormSection(section)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Another Multivalued section
|
||||
section = XLFormSectionDescriptor.formSectionWithTitle("Multivalued ActionSheet Selector example", sectionOptions:XLFormSectionOptions.CanInsert | XLFormSectionOptions.CanDelete)
|
||||
section = XLFormSectionDescriptor.formSectionWithTitle("Multivalued ActionSheet Selector example", sectionOptions:XLFormSectionOptions.CanInsert.union(.CanDelete))
|
||||
section.footerTitle = "XLFormSectionInsertModeLastRow sectionType adds a '+' icon inside last table view cell allowing us to add a new row."
|
||||
form.addFormSection(section)
|
||||
row = XLFormRowDescriptor(tag: nil, rowType: XLFormRowDescriptorTypeSelectorActionSheet, title: "Tap to select..")
|
||||
@@ -71,7 +65,7 @@ class MultivaluedFormViewController : XLFormViewController {
|
||||
|
||||
|
||||
// Another one
|
||||
section = XLFormSectionDescriptor.formSectionWithTitle("Multivalued Push Selector example", sectionOptions: XLFormSectionOptions.CanInsert | XLFormSectionOptions.CanDelete | XLFormSectionOptions.CanReorder, sectionInsertMode:XLFormSectionInsertMode.Button)
|
||||
section = XLFormSectionDescriptor.formSectionWithTitle("Multivalued Push Selector example", sectionOptions: XLFormSectionOptions.CanInsert.union(.CanDelete).union(.CanReorder), sectionInsertMode: .Button)
|
||||
section.footerTitle = "MultivaluedFormViewController.swift"
|
||||
form.addFormSection(section)
|
||||
row = XLFormRowDescriptor(tag: nil, rowType: XLFormRowDescriptorTypeSelectorPush, title: "Tap to select )..")
|
||||
@@ -84,14 +78,14 @@ class MultivaluedFormViewController : XLFormViewController {
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
self.navigationItem.rightBarButtonItem = UIBarButtonItem(barButtonSystemItem: UIBarButtonSystemItem.Edit, target: self, action: "addDidTouch:")
|
||||
navigationItem.rightBarButtonItem = UIBarButtonItem(barButtonSystemItem: .Edit, target: self, action: "addDidTouch:")
|
||||
}
|
||||
|
||||
//MARK: - Actions
|
||||
|
||||
func addDidTouch(sender: UIBarButtonItem) {
|
||||
let actionSheet = UIActionSheet(title: nil, delegate: self, cancelButtonTitle: "Cancel", destructiveButtonTitle: "Remove Last Section", otherButtonTitles: "Add a section at the end", self.form!.disabled ? "Enable Form" : "Disable Form")
|
||||
actionSheet.showInView(self.view)
|
||||
actionSheet.showInView(view)
|
||||
}
|
||||
|
||||
//MARK: - UIActionSheetDelegate
|
||||
@@ -99,25 +93,25 @@ class MultivaluedFormViewController : XLFormViewController {
|
||||
|
||||
override func actionSheet(actionSheet: UIActionSheet, clickedButtonAtIndex buttonIndex: Int) {
|
||||
if actionSheet.destructiveButtonIndex == buttonIndex {
|
||||
if self.form.formSections.count > 0 {
|
||||
if form.formSections.count > 0 {
|
||||
// remove last section
|
||||
self.form.removeFormSectionAtIndex(UInt(self.form.formSections.count - 1))
|
||||
form.removeFormSectionAtIndex(UInt(form.formSections.count - 1))
|
||||
}
|
||||
}
|
||||
else if actionSheet.buttonTitleAtIndex(buttonIndex) == "Add a section at the end" {
|
||||
// add a new section
|
||||
// let dateString = NSDateFormatter.localizedStringFromDate(NSDate.new(), dateStyle: NSDateFormatterStyle.ShortStyle, timeStyle: NSDateFormatterStyle.ShortStyle)
|
||||
let newSection = XLFormSectionDescriptor.formSectionWithTitle("Section created at \(NSDateFormatter.localizedStringFromDate(NSDate.new(), dateStyle: NSDateFormatterStyle.ShortStyle, timeStyle: NSDateFormatterStyle.ShortStyle))", sectionOptions:XLFormSectionOptions.CanInsert | XLFormSectionOptions.CanDelete)
|
||||
// let dateString = NSDateFormatter.localizedStringFromDate(NSDate(), dateStyle: NSDateFormatterStyle.ShortStyle, timeStyle: NSDateFormatterStyle.ShortStyle)
|
||||
let newSection = XLFormSectionDescriptor.formSectionWithTitle("Section created at \(NSDateFormatter.localizedStringFromDate(NSDate(), dateStyle: NSDateFormatterStyle.ShortStyle, timeStyle: NSDateFormatterStyle.ShortStyle))", sectionOptions:XLFormSectionOptions.CanInsert.union(.CanDelete))
|
||||
newSection.multivaluedTag = "multivaluedPushSelector_\(self.form.formSections.count)"
|
||||
let newRow = XLFormRowDescriptor(tag: nil, rowType: XLFormRowDescriptorTypeSelectorPush, title: "Tap to select )..")
|
||||
newRow.selectorOptions = ["Option 1", "Option 2", "Option 3"]
|
||||
newSection.addFormRow(newRow)
|
||||
self.form.addFormSection(newSection)
|
||||
form.addFormSection(newSection)
|
||||
}
|
||||
else {
|
||||
self.form.disabled = !self.form.disabled
|
||||
self.tableView.endEditing(true)
|
||||
self.tableView.reloadData()
|
||||
form.disabled = !self.form.disabled
|
||||
tableView.endEditing(true)
|
||||
tableView.reloadData()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -127,12 +121,11 @@ class MultivaluedFormViewController : XLFormViewController {
|
||||
|
||||
class MultivaluedOnlyReorderViewController : XLFormViewController {
|
||||
|
||||
required init(coder aDecoder: NSCoder) {
|
||||
required init?(coder aDecoder: NSCoder) {
|
||||
super.init(coder: aDecoder)
|
||||
self.initializeForm()
|
||||
}
|
||||
|
||||
|
||||
override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: NSBundle?) {
|
||||
super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil)
|
||||
self.initializeForm()
|
||||
@@ -151,28 +144,28 @@ class MultivaluedOnlyReorderViewController : XLFormViewController {
|
||||
|
||||
// Multivalued Section with inline rows - section set up to support only reordering
|
||||
section = XLFormSectionDescriptor.formSectionWithTitle("Reordering Inline Rows",
|
||||
sectionOptions:XLFormSectionOptions.CanReorder)
|
||||
sectionOptions:.CanReorder)
|
||||
section.footerTitle = "XLFormRowDescriptorTypeDateInline row type"
|
||||
form.addFormSection(section)
|
||||
var idx = 0
|
||||
for listItem in list {
|
||||
let timeIntervalSinceNow : NSTimeInterval = NSTimeInterval(secondsPerDay * ++idx)
|
||||
let timeIntervalSinceNow = NSTimeInterval(secondsPerDay * ++idx)
|
||||
row = XLFormRowDescriptor(tag: nil, rowType:XLFormRowDescriptorTypeDateInline, title: listItem)
|
||||
row.value = NSDate(timeIntervalSinceNow:timeIntervalSinceNow)
|
||||
section.addFormRow(row)
|
||||
}
|
||||
|
||||
// Multivalued Section with common rows - section set up to support only reordering
|
||||
section = XLFormSectionDescriptor.formSectionWithTitle("Reordering Rows", sectionOptions:XLFormSectionOptions.CanReorder)
|
||||
section = XLFormSectionDescriptor.formSectionWithTitle("Reordering Rows", sectionOptions:.CanReorder)
|
||||
section.footerTitle = "XLFormRowDescriptorTypeInfo row type"
|
||||
form.addFormSection(section)
|
||||
|
||||
|
||||
idx = 0
|
||||
for listItem in list {
|
||||
let timeIntervalSinceNow : NSTimeInterval = NSTimeInterval(secondsPerDay * ++idx)
|
||||
let timeIntervalSinceNow = NSTimeInterval(secondsPerDay * ++idx)
|
||||
row = XLFormRowDescriptor(tag: nil, rowType:XLFormRowDescriptorTypeInfo, title: listItem)
|
||||
row.value = NSDateFormatter.localizedStringFromDate(NSDate(timeIntervalSinceNow:timeIntervalSinceNow), dateStyle: NSDateFormatterStyle.MediumStyle, timeStyle: NSDateFormatterStyle.NoStyle)
|
||||
row.value = NSDateFormatter.localizedStringFromDate(NSDate(timeIntervalSinceNow:timeIntervalSinceNow), dateStyle: .MediumStyle, timeStyle: .NoStyle)
|
||||
section.addFormRow(row)
|
||||
}
|
||||
|
||||
@@ -183,7 +176,7 @@ class MultivaluedOnlyReorderViewController : XLFormViewController {
|
||||
|
||||
class MultivaluedOnlyInserViewController : XLFormViewController {
|
||||
|
||||
required init(coder aDecoder: NSCoder) {
|
||||
required init?(coder aDecoder: NSCoder) {
|
||||
super.init(coder: aDecoder)
|
||||
self.initializeForm()
|
||||
}
|
||||
@@ -204,7 +197,7 @@ class MultivaluedOnlyInserViewController : XLFormViewController {
|
||||
|
||||
form = XLFormDescriptor(title: "Multivalued Only Insert")
|
||||
|
||||
section = XLFormSectionDescriptor.formSectionWithTitle("XLFormSectionInsertModeButton", sectionOptions:XLFormSectionOptions.CanInsert, sectionInsertMode:XLFormSectionInsertMode.Button)
|
||||
section = XLFormSectionDescriptor.formSectionWithTitle("XLFormSectionInsertModeButton", sectionOptions:.CanInsert, sectionInsertMode:.Button)
|
||||
form.addFormSection(section)
|
||||
|
||||
|
||||
@@ -212,15 +205,15 @@ class MultivaluedOnlyInserViewController : XLFormViewController {
|
||||
row.cellConfig["textField.placeholder"] = "Add a new tag"
|
||||
section.multivaluedRowTemplate = row
|
||||
|
||||
section = XLFormSectionDescriptor.formSectionWithTitle("XLFormSectionInsertModeButton With Inline Cells", sectionOptions:XLFormSectionOptions.CanInsert, sectionInsertMode:XLFormSectionInsertMode.Button)
|
||||
section = XLFormSectionDescriptor.formSectionWithTitle("XLFormSectionInsertModeButton With Inline Cells", sectionOptions:.CanInsert, sectionInsertMode:.Button)
|
||||
row = XLFormRowDescriptor(tag: nil, rowType:XLFormRowDescriptorTypeDateInline)
|
||||
row.value = NSDate.new()
|
||||
row.value = NSDate()
|
||||
row.title = "Date"
|
||||
section.multivaluedRowTemplate = row
|
||||
form.addFormSection(section)
|
||||
|
||||
section = XLFormSectionDescriptor.formSectionWithTitle("XLFormSectionInsertModeLastRow",
|
||||
sectionOptions:XLFormSectionOptions.CanInsert, sectionInsertMode:XLFormSectionInsertMode.LastRow)
|
||||
sectionOptions:.CanInsert, sectionInsertMode:.LastRow)
|
||||
form.addFormSection(section)
|
||||
for tag in nameList {
|
||||
// add a row to the section, the row will be used to crete new rows.
|
||||
@@ -233,28 +226,26 @@ class MultivaluedOnlyInserViewController : XLFormViewController {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class MultivaluedOnlyDeleteViewController : XLFormViewController {
|
||||
|
||||
required init(coder aDecoder: NSCoder) {
|
||||
required init?(coder aDecoder: NSCoder) {
|
||||
super.init(coder: aDecoder)
|
||||
self.initializeForm()
|
||||
initializeForm()
|
||||
}
|
||||
|
||||
|
||||
override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: NSBundle?) {
|
||||
super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil)
|
||||
self.initializeForm()
|
||||
initializeForm()
|
||||
}
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
self.navigationItem.rightBarButtonItem = UIBarButtonItem(title: "Editing", style: UIBarButtonItemStyle.Plain, target: self, action: "toggleEditing:")
|
||||
navigationItem.rightBarButtonItem = UIBarButtonItem(title: "Editing", style: .Plain, target: self, action: "toggleEditing:")
|
||||
}
|
||||
|
||||
func toggleEditing(sender : UIBarButtonItem) {
|
||||
self.tableView.setEditing(!self.tableView.editing, animated: true)
|
||||
sender.title = self.tableView.editing ? "Editing" : "Not Editing"
|
||||
tableView.setEditing(!tableView.editing, animated: true)
|
||||
sender.title = tableView.editing ? "Editing" : "Not Editing"
|
||||
}
|
||||
|
||||
func initializeForm() {
|
||||
@@ -267,7 +258,7 @@ class MultivaluedOnlyDeleteViewController : XLFormViewController {
|
||||
|
||||
form = XLFormDescriptor(title: "Multivalued Only Delete")
|
||||
|
||||
section = XLFormSectionDescriptor.formSectionWithTitle("", sectionOptions:XLFormSectionOptions.CanDelete)
|
||||
section = XLFormSectionDescriptor.formSectionWithTitle("", sectionOptions:.CanDelete)
|
||||
section.footerTitle = "you can swipe to delete when table.editing = NO (Not Editing)"
|
||||
form.addFormSection(section)
|
||||
|
||||
@@ -280,7 +271,7 @@ class MultivaluedOnlyDeleteViewController : XLFormViewController {
|
||||
}
|
||||
|
||||
// Multivalued Section with inline row.
|
||||
section = XLFormSectionDescriptor.formSectionWithTitle("", sectionOptions:XLFormSectionOptions.CanDelete)
|
||||
section = XLFormSectionDescriptor.formSectionWithTitle("", sectionOptions:.CanDelete)
|
||||
section.footerTitle = "you can swipe to delete when table.editing = NO (Not Editing)"
|
||||
form.addFormSection(section)
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ class XLFormCustomCell : XLFormBaseCell {
|
||||
super.init(style: style, reuseIdentifier: reuseIdentifier)
|
||||
}
|
||||
|
||||
required init(coder aDecoder: NSCoder) {
|
||||
required init?(coder aDecoder: NSCoder) {
|
||||
super.init(coder: aDecoder)
|
||||
}
|
||||
|
||||
@@ -42,16 +42,26 @@ class XLFormCustomCell : XLFormBaseCell {
|
||||
override func update() {
|
||||
super.update()
|
||||
// override
|
||||
self.textLabel!.text = self.rowDescriptor.value != nil ? self.rowDescriptor.value as? String : "Am a custom cell, select me!"
|
||||
if let string = rowDescriptor?.value as? String {
|
||||
textLabel?.text = string
|
||||
}
|
||||
else {
|
||||
textLabel?.text = "Am a custom cell, select me!"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
override func formDescriptorCellDidSelectedWithFormController(controller: XLFormViewController!) {
|
||||
// custom code here
|
||||
// i.e new behaviour when cell has been selected
|
||||
self.rowDescriptor.value = self.rowDescriptor.value as? String == "I can do any custom behaviour..." ? "Am a custom cell, select me!" : "I can do any custom behaviour..."
|
||||
self.update()
|
||||
controller.tableView .selectRowAtIndexPath(nil, animated: true, scrollPosition: UITableViewScrollPosition.None)
|
||||
if let string = rowDescriptor?.value as? String where string == "Am a custom cell, select me!" {
|
||||
self.rowDescriptor?.value = string
|
||||
}
|
||||
else {
|
||||
self.rowDescriptor?.value = "I can do any custom behaviour..."
|
||||
}
|
||||
|
||||
update()
|
||||
controller.tableView.selectRowAtIndexPath(nil, animated: true, scrollPosition: .None)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -27,23 +27,24 @@ import MapKit
|
||||
|
||||
class OthersFormViewController : XLFormViewController {
|
||||
|
||||
private enum Tags : String {
|
||||
case SwitchBool = "switchBool"
|
||||
case SwitchCheck = "switchCheck"
|
||||
case StepCounter = "stepCounter"
|
||||
case Slider = "slider"
|
||||
case SegmentedControl = "segmentedControl"
|
||||
case Custom = "custom"
|
||||
case Info = "info"
|
||||
case Button = "button"
|
||||
case ButtonLeftAligned = "buttonLeftAligned"
|
||||
case ButtonWithSegueId = "buttonWithSegueId"
|
||||
case ButtonWithSegueClass = "buttonWithSegueClass"
|
||||
case ButtonWithNibName = "buttonWithNibName"
|
||||
case ButtonWithStoryboardId = "buttonWithStoryboardId"
|
||||
private struct Tags {
|
||||
static let SwitchBool = "switchBool"
|
||||
static let SwitchCheck = "switchCheck"
|
||||
static let StepCounter = "stepCounter"
|
||||
static let Slider = "slider"
|
||||
static let SegmentedControl = "segmentedControl"
|
||||
static let Custom = "custom"
|
||||
static let Info = "info"
|
||||
static let Button = "button"
|
||||
static let Image = "image"
|
||||
static let ButtonLeftAligned = "buttonLeftAligned"
|
||||
static let ButtonWithSegueId = "buttonWithSegueId"
|
||||
static let ButtonWithSegueClass = "buttonWithSegueClass"
|
||||
static let ButtonWithNibName = "buttonWithNibName"
|
||||
static let ButtonWithStoryboardId = "buttonWithStoryboardId"
|
||||
}
|
||||
|
||||
required init(coder aDecoder: NSCoder) {
|
||||
required init?(coder aDecoder: NSCoder) {
|
||||
super.init(coder: aDecoder)
|
||||
self.initializeForm()
|
||||
}
|
||||
@@ -67,32 +68,36 @@ class OthersFormViewController : XLFormViewController {
|
||||
form.addFormSection(section)
|
||||
|
||||
// Switch
|
||||
section.addFormRow(XLFormRowDescriptor(tag: Tags.SwitchBool.rawValue, rowType: XLFormRowDescriptorTypeBooleanSwitch, title: "Switch"))
|
||||
section.addFormRow(XLFormRowDescriptor(tag: Tags.SwitchBool, rowType: XLFormRowDescriptorTypeBooleanSwitch, title: "Switch"))
|
||||
|
||||
// Check
|
||||
section.addFormRow(XLFormRowDescriptor(tag: Tags.SwitchCheck.rawValue, rowType: XLFormRowDescriptorTypeBooleanCheck, title: "Check"))
|
||||
section.addFormRow(XLFormRowDescriptor(tag: Tags.SwitchCheck, rowType: XLFormRowDescriptorTypeBooleanCheck, title: "Check"))
|
||||
|
||||
// Step counter
|
||||
section.addFormRow(XLFormRowDescriptor(tag: Tags.StepCounter.rawValue, rowType: XLFormRowDescriptorTypeStepCounter, title: "Step counter"))
|
||||
section.addFormRow(XLFormRowDescriptor(tag: Tags.StepCounter, rowType: XLFormRowDescriptorTypeStepCounter, title: "Step counter"))
|
||||
|
||||
// Segmented Control
|
||||
row = XLFormRowDescriptor(tag: Tags.SegmentedControl.rawValue, rowType: XLFormRowDescriptorTypeSelectorSegmentedControl, title: "Fruits")
|
||||
row = XLFormRowDescriptor(tag: Tags.SegmentedControl, rowType: XLFormRowDescriptorTypeSelectorSegmentedControl, title: "Fruits")
|
||||
row.selectorOptions = ["Apple", "Orange", "Pear"]
|
||||
row.value = "Pear"
|
||||
section.addFormRow(row)
|
||||
|
||||
|
||||
// Slider
|
||||
row = XLFormRowDescriptor(tag: Tags.Slider.rawValue, rowType: XLFormRowDescriptorTypeSlider, title: "Slider")
|
||||
row = XLFormRowDescriptor(tag: Tags.Slider, rowType: XLFormRowDescriptorTypeSlider, title: "Slider")
|
||||
row.value = 30
|
||||
row.cellConfigAtConfigure["slider.maximumValue"] = 100
|
||||
row.cellConfigAtConfigure["slider.minimumValue"] = 10
|
||||
row.cellConfigAtConfigure["steps"] = 4
|
||||
section.addFormRow(row)
|
||||
|
||||
|
||||
// Image
|
||||
row = XLFormRowDescriptor(tag: Tags.Image, rowType: XLFormRowDescriptorTypeImage, title: "Image")
|
||||
row.value = UIImage(named: "default_avatar")
|
||||
section.addFormRow(row)
|
||||
|
||||
// Info cell
|
||||
row = XLFormRowDescriptor(tag: Tags.Info.rawValue, rowType: XLFormRowDescriptorTypeInfo)
|
||||
row = XLFormRowDescriptor(tag: Tags.Info, rowType: XLFormRowDescriptorTypeInfo)
|
||||
row.title = "Version"
|
||||
row.value = NSBundle.mainBundle().infoDictionary!["CFBundleShortVersionString"]
|
||||
section.addFormRow(row)
|
||||
@@ -103,30 +108,30 @@ class OthersFormViewController : XLFormViewController {
|
||||
form.addFormSection(section)
|
||||
|
||||
// Button
|
||||
row = XLFormRowDescriptor(tag: Tags.Button.rawValue, rowType: XLFormRowDescriptorTypeButton, title: "Button")
|
||||
row = XLFormRowDescriptor(tag: Tags.Button, rowType: XLFormRowDescriptorTypeButton, title: "Button")
|
||||
row.cellConfig["textLabel.textColor"] = UIColor(red: 0.0, green: 122.0/255.0, blue: 1.0, alpha: 1.0)
|
||||
row.action.formSelector = "didTouchButton:"
|
||||
section.addFormRow(row)
|
||||
|
||||
|
||||
// Left Button
|
||||
row = XLFormRowDescriptor(tag: Tags.ButtonLeftAligned.rawValue, rowType: XLFormRowDescriptorTypeButton, title: "Button with Block")
|
||||
row = XLFormRowDescriptor(tag: Tags.ButtonLeftAligned, rowType: XLFormRowDescriptorTypeButton, title: "Button with Block")
|
||||
row.cellConfig["textLabel.textColor"] = UIColor(red: 0.0, green: 122.0/255.0, blue: 1.0, alpha: 1.0)
|
||||
row.cellConfig["textLabel.textAlignment"] = NSTextAlignment.Left.rawValue
|
||||
row.cellConfig["accessoryType"] = UITableViewCellAccessoryType.DisclosureIndicator.rawValue
|
||||
row.action.formBlock = { (sender: XLFormRowDescriptor!) -> Void in
|
||||
let switchRow = sender.sectionDescriptor.formDescriptor!.formRowWithTag(Tags.SwitchBool.rawValue)!
|
||||
if switchRow.value != nil && switchRow.value!.boolValue == true {
|
||||
row.action.formBlock = { [weak self] (sender: XLFormRowDescriptor!) -> Void in
|
||||
let switchRow = sender.sectionDescriptor.formDescriptor!.formRowWithTag(Tags.SwitchBool)!
|
||||
if let value = switchRow.value where value.boolValue == true {
|
||||
let alertView = UIAlertView(title: "Switch is ON", message: "Button has checked the switch value...", delegate: self, cancelButtonTitle: "OK")
|
||||
alertView.show()
|
||||
}
|
||||
self.deselectFormRow(sender)
|
||||
self?.deselectFormRow(sender)
|
||||
}
|
||||
section.addFormRow(row)
|
||||
|
||||
|
||||
// Another Left Button with segue
|
||||
row = XLFormRowDescriptor(tag: Tags.ButtonWithSegueClass.rawValue, rowType: XLFormRowDescriptorTypeButton, title: "Button with Segue Class")
|
||||
row = XLFormRowDescriptor(tag: Tags.ButtonWithSegueClass, rowType: XLFormRowDescriptorTypeButton, title: "Button with Segue Class")
|
||||
row.action.formSegueClass = NSClassFromString("UIStoryboardPushSegue")
|
||||
row.action.viewControllerClass = MapViewController.self
|
||||
row.value = CLLocation(latitude: -33.0, longitude: -56.0)
|
||||
@@ -134,20 +139,20 @@ class OthersFormViewController : XLFormViewController {
|
||||
|
||||
|
||||
// Button with SegueId
|
||||
row = XLFormRowDescriptor(tag: Tags.ButtonWithSegueId.rawValue, rowType: XLFormRowDescriptorTypeButton, title: "Button with Segue Idenfifier")
|
||||
row = XLFormRowDescriptor(tag: Tags.ButtonWithSegueId, rowType: XLFormRowDescriptorTypeButton, title: "Button with Segue Idenfifier")
|
||||
row.action.formSegueIdenfifier = "MapViewControllerSegue"
|
||||
row.value = CLLocation(latitude: -33, longitude: -56)
|
||||
section.addFormRow(row)
|
||||
|
||||
|
||||
// Another Button using StoryboardId
|
||||
row = XLFormRowDescriptor(tag: Tags.ButtonWithStoryboardId.rawValue, rowType: XLFormRowDescriptorTypeButton, title: "Button with StoryboardId")
|
||||
row = XLFormRowDescriptor(tag: Tags.ButtonWithStoryboardId, rowType: XLFormRowDescriptorTypeButton, title: "Button with StoryboardId")
|
||||
row.action.viewControllerStoryboardId = "MapViewController"
|
||||
row.value = CLLocation(latitude: -33, longitude: -56)
|
||||
section.addFormRow(row)
|
||||
|
||||
// Button using NibName
|
||||
row = XLFormRowDescriptor(tag: Tags.ButtonWithNibName.rawValue, rowType: XLFormRowDescriptorTypeButton, title: "Button with NibName")
|
||||
row = XLFormRowDescriptor(tag: Tags.ButtonWithNibName, rowType: XLFormRowDescriptorTypeButton, title: "Button with NibName")
|
||||
row.action.viewControllerNibName = "MapViewController"
|
||||
row.value = CLLocation(latitude: -33, longitude: -56)
|
||||
section.addFormRow(row)
|
||||
@@ -157,7 +162,7 @@ class OthersFormViewController : XLFormViewController {
|
||||
|
||||
|
||||
func didTouchButton(sender: XLFormRowDescriptor) {
|
||||
if sender.sectionDescriptor.formDescriptor.formRowWithTag(Tags.SwitchBool.rawValue)?.value?.boolValue == true{
|
||||
if sender.sectionDescriptor.formDescriptor.formRowWithTag(Tags.SwitchBool)?.value?.boolValue == true{
|
||||
let alertView = UIAlertView(title: "Switch is ON", message: "Button has checked the switch value...", delegate: self, cancelButtonTitle: "OK")
|
||||
alertView.show()
|
||||
}
|
||||
@@ -166,18 +171,17 @@ class OthersFormViewController : XLFormViewController {
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
let barButton = UIBarButtonItem(title: "Disable", style: UIBarButtonItemStyle.Plain, target: self, action: "disableEnable:")
|
||||
let barButton = UIBarButtonItem(title: "Disable", style: .Plain, target: self, action: "disableEnable:")
|
||||
barButton.possibleTitles = Set(["Disable", "Enable"])
|
||||
self.navigationItem.rightBarButtonItem = barButton
|
||||
navigationItem.rightBarButtonItem = barButton
|
||||
}
|
||||
|
||||
|
||||
func disableEnable(button : UIBarButtonItem)
|
||||
{
|
||||
self.form.disabled = !self.form.disabled
|
||||
button.title = self.form.disabled ? "Enable" : "Disable"
|
||||
self.tableView.endEditing(true)
|
||||
self.tableView.reloadData()
|
||||
func disableEnable(button : UIBarButtonItem) {
|
||||
form.disabled = !form.disabled
|
||||
button.title = form.disabled ? "Enable" : "Disable"
|
||||
tableView.endEditing(true)
|
||||
tableView.reloadData()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -26,23 +26,23 @@
|
||||
|
||||
class BasicPredicateViewController : XLFormViewController {
|
||||
|
||||
private enum Tags : String {
|
||||
private struct Tags {
|
||||
|
||||
case HideRow = "tag1"
|
||||
case HideSection = "tag2"
|
||||
case Text = "tag3"
|
||||
case Date = "tag4"
|
||||
static let HideRow = "tag1"
|
||||
static let HideSection = "tag2"
|
||||
static let Text = "tag3"
|
||||
static let Date = "tag4"
|
||||
|
||||
}
|
||||
|
||||
override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: NSBundle?) {
|
||||
super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil)
|
||||
self.initializeForm()
|
||||
initializeForm()
|
||||
}
|
||||
|
||||
required init(coder aDecoder: NSCoder) {
|
||||
required init?(coder aDecoder: NSCoder) {
|
||||
super.init(coder: aDecoder)
|
||||
self.initializeForm()
|
||||
initializeForm()
|
||||
}
|
||||
|
||||
func initializeForm() {
|
||||
@@ -58,32 +58,27 @@ class BasicPredicateViewController : XLFormViewController {
|
||||
section.title = "A Section"
|
||||
form.addFormSection(section)
|
||||
|
||||
row = XLFormRowDescriptor(tag: Tags.HideRow.rawValue, rowType: XLFormRowDescriptorTypeBooleanSwitch, title: "Show next row")
|
||||
row = XLFormRowDescriptor(tag: Tags.HideRow, rowType: XLFormRowDescriptorTypeBooleanSwitch, title: "Show next row")
|
||||
row.value = 1
|
||||
section.addFormRow(row)
|
||||
|
||||
row = XLFormRowDescriptor(tag: Tags.HideSection.rawValue, rowType: XLFormRowDescriptorTypeBooleanSwitch, title: "Show B Section")
|
||||
row.hidden = "$\(Tags.HideRow.rawValue)==0"
|
||||
row = XLFormRowDescriptor(tag: Tags.HideSection, rowType: XLFormRowDescriptorTypeBooleanSwitch, title: "Show B Section")
|
||||
row.hidden = "$\(Tags.HideRow)==0"
|
||||
row.value = 1
|
||||
section.addFormRow(row)
|
||||
|
||||
section = XLFormSectionDescriptor()
|
||||
section.title = "B Section"
|
||||
section.footerTitle = "BasicPredicateViewController.swift"
|
||||
section.hidden = "$\(Tags.HideSection.rawValue)==0"
|
||||
section.hidden = "$\(Tags.HideSection)==0"
|
||||
form.addFormSection(section)
|
||||
|
||||
row = XLFormRowDescriptor(tag: Tags.Text.rawValue, rowType: XLFormRowDescriptorTypeText)
|
||||
row = XLFormRowDescriptor(tag: Tags.Text, rowType: XLFormRowDescriptorTypeText)
|
||||
row.cellConfigAtConfigure["textField.placeholder"] = "Gonna disappear soon!!"
|
||||
section.addFormRow(row)
|
||||
|
||||
row = XLFormRowDescriptor(tag: Tags.Date.rawValue, rowType: XLFormRowDescriptorTypeDateInline, title: "Some Date")
|
||||
row.hidden = "$\(Tags.Text.rawValue).value contains 'aaa'"
|
||||
row = XLFormRowDescriptor(tag: Tags.Date, rowType: XLFormRowDescriptorTypeDateInline, title: "Some Date")
|
||||
row.hidden = "$\(Tags.Text).value contains 'aaa'"
|
||||
section.addFormRow(row)
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -26,26 +26,22 @@
|
||||
|
||||
class NativeEventFormViewController : XLFormViewController {
|
||||
|
||||
|
||||
|
||||
required init(coder aDecoder: NSCoder) {
|
||||
required init?(coder aDecoder: NSCoder) {
|
||||
super.init(coder: aDecoder)
|
||||
self.initializeForm()
|
||||
initializeForm()
|
||||
}
|
||||
|
||||
override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: NSBundle?) {
|
||||
super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil)
|
||||
self.initializeForm()
|
||||
initializeForm()
|
||||
}
|
||||
|
||||
|
||||
func initializeForm() {
|
||||
|
||||
let form : XLFormDescriptor
|
||||
var section : XLFormSectionDescriptor
|
||||
var row : XLFormRowDescriptor
|
||||
|
||||
|
||||
form = XLFormDescriptor(title: "Add Event")
|
||||
|
||||
section = XLFormSectionDescriptor.formSection()
|
||||
@@ -141,11 +137,10 @@ class NativeEventFormViewController : XLFormViewController {
|
||||
self.form = form
|
||||
}
|
||||
|
||||
override func viewDidLoad()
|
||||
{
|
||||
override func viewDidLoad(){
|
||||
super.viewDidLoad()
|
||||
self.navigationItem.leftBarButtonItem = UIBarButtonItem(barButtonSystemItem: UIBarButtonSystemItem.Cancel, target: self, action: "cancelPressed:")
|
||||
self.navigationItem.rightBarButtonItem = UIBarButtonItem(barButtonSystemItem: UIBarButtonSystemItem.Save, target: self, action: "savePressed:")
|
||||
navigationItem.leftBarButtonItem = UIBarButtonItem(barButtonSystemItem: .Cancel, target: self, action: "cancelPressed:")
|
||||
navigationItem.rightBarButtonItem = UIBarButtonItem(barButtonSystemItem: .Save, target: self, action: "savePressed:")
|
||||
}
|
||||
|
||||
// MARK: XLFormDescriptorDelegate
|
||||
@@ -158,79 +153,75 @@ class NativeEventFormViewController : XLFormViewController {
|
||||
let newRow = formRow.copy() as! XLFormRowDescriptor
|
||||
newRow.tag = "secondAlert"
|
||||
newRow.title = "Second Alert"
|
||||
self.form.addFormRow(newRow, afterRow:formRow)
|
||||
form.addFormRow(newRow, afterRow:formRow)
|
||||
}
|
||||
else if !oldValue.valueData().isEqual(0) && newValue.valueData().isEqual(0) {
|
||||
self.form.removeFormRowWithTag("secondAlert")
|
||||
form.removeFormRowWithTag("secondAlert")
|
||||
}
|
||||
}
|
||||
else if formRow.tag == "all-day" {
|
||||
let startDateDescriptor = self.form.formRowWithTag("starts")!
|
||||
let endDateDescriptor = self.form.formRowWithTag("ends")!
|
||||
let startDateDescriptor = form.formRowWithTag("starts")!
|
||||
let endDateDescriptor = form.formRowWithTag("ends")!
|
||||
let dateStartCell: XLFormDateCell = startDateDescriptor.cellForFormController(self) as! XLFormDateCell
|
||||
let dateEndCell: XLFormDateCell = endDateDescriptor.cellForFormController(self) as! XLFormDateCell
|
||||
if formRow.value!.valueData() as? Bool == true {
|
||||
startDateDescriptor.valueTransformer = DateValueTrasformer.self
|
||||
endDateDescriptor.valueTransformer = DateValueTrasformer.self
|
||||
dateStartCell.formDatePickerMode = XLFormDateDatePickerMode.Date
|
||||
dateEndCell.formDatePickerMode = XLFormDateDatePickerMode.Date
|
||||
dateStartCell.formDatePickerMode = .Date
|
||||
dateEndCell.formDatePickerMode = .Date
|
||||
}
|
||||
else{
|
||||
startDateDescriptor.valueTransformer = DateTimeValueTrasformer.self
|
||||
endDateDescriptor.valueTransformer = DateTimeValueTrasformer.self
|
||||
dateStartCell.formDatePickerMode = XLFormDateDatePickerMode.DateTime
|
||||
dateEndCell.formDatePickerMode = XLFormDateDatePickerMode.DateTime
|
||||
dateStartCell.formDatePickerMode = .DateTime
|
||||
dateEndCell.formDatePickerMode = .DateTime
|
||||
}
|
||||
self.updateFormRow(startDateDescriptor)
|
||||
self.updateFormRow(endDateDescriptor)
|
||||
updateFormRow(startDateDescriptor)
|
||||
updateFormRow(endDateDescriptor)
|
||||
}
|
||||
else if formRow.tag == "starts" {
|
||||
let startDateDescriptor = self.form.formRowWithTag("starts")!
|
||||
let endDateDescriptor = self.form.formRowWithTag("ends")!
|
||||
let dateStartCell: XLFormDateCell = startDateDescriptor.cellForFormController(self) as! XLFormDateCell
|
||||
let dateEndCell: XLFormDateCell = endDateDescriptor.cellForFormController(self) as! XLFormDateCell
|
||||
if startDateDescriptor.value!.compare(endDateDescriptor.value as! NSDate) == NSComparisonResult.OrderedDescending {
|
||||
let startDateDescriptor = form.formRowWithTag("starts")!
|
||||
let endDateDescriptor = form.formRowWithTag("ends")!
|
||||
if startDateDescriptor.value!.compare(endDateDescriptor.value as! NSDate) == .OrderedDescending {
|
||||
// startDateDescriptor is later than endDateDescriptor
|
||||
endDateDescriptor.value = NSDate(timeInterval: 60*60*24, sinceDate: startDateDescriptor.value as! NSDate)
|
||||
endDateDescriptor.cellConfig.removeObjectForKey("detailTextLabel.attributedText")
|
||||
self.updateFormRow(endDateDescriptor)
|
||||
updateFormRow(endDateDescriptor)
|
||||
}
|
||||
}
|
||||
else if formRow.tag == "ends" {
|
||||
let startDateDescriptor = self.form.formRowWithTag("starts")!
|
||||
let endDateDescriptor = self.form.formRowWithTag("ends")!
|
||||
let startDateDescriptor = form.formRowWithTag("starts")!
|
||||
let endDateDescriptor = form.formRowWithTag("ends")!
|
||||
let dateEndCell = endDateDescriptor.cellForFormController(self) as! XLFormDateCell
|
||||
if startDateDescriptor.value!.compare(endDateDescriptor.value as! NSDate) == NSComparisonResult.OrderedDescending {
|
||||
if startDateDescriptor.value!.compare(endDateDescriptor.value as! NSDate) == .OrderedDescending {
|
||||
// startDateDescriptor is later than endDateDescriptor
|
||||
dateEndCell.update()
|
||||
let newDetailText : String = dateEndCell.detailTextLabel!.text!
|
||||
let newDetailText = dateEndCell.detailTextLabel!.text!
|
||||
let strikeThroughAttribute = [NSStrikethroughStyleAttributeName : NSUnderlineStyle.StyleSingle.rawValue]
|
||||
let strikeThroughText = NSAttributedString(string: newDetailText, attributes: strikeThroughAttribute)
|
||||
endDateDescriptor.cellConfig["detailTextLabel.attributedText"] = strikeThroughText
|
||||
self.updateFormRow(endDateDescriptor)
|
||||
updateFormRow(endDateDescriptor)
|
||||
}
|
||||
else{
|
||||
let endDateDescriptor = self.form.formRowWithTag("ends")!
|
||||
endDateDescriptor.cellConfig.removeObjectForKey("detailTextLabel.attributedText")
|
||||
self.updateFormRow(endDateDescriptor)
|
||||
updateFormRow(endDateDescriptor)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func cancelPressed(button: UIBarButtonItem)
|
||||
{
|
||||
self.dismissViewControllerAnimated(true, completion: nil)
|
||||
func cancelPressed(button: UIBarButtonItem){
|
||||
dismissViewControllerAnimated(true, completion: nil)
|
||||
}
|
||||
|
||||
|
||||
func savePressed(button: UIBarButtonItem)
|
||||
{
|
||||
let validationErrors : Array<NSError> = self.formValidationErrors() as! Array<NSError>
|
||||
func savePressed(button: UIBarButtonItem){
|
||||
let validationErrors : Array<NSError> = formValidationErrors() as! Array<NSError>
|
||||
if (validationErrors.count > 0){
|
||||
self.showFormValidationError(validationErrors.first)
|
||||
showFormValidationError(validationErrors.first)
|
||||
return
|
||||
}
|
||||
self.tableView.endEditing(true)
|
||||
tableView.endEditing(true)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -239,7 +230,7 @@ class NativeEventNavigationViewController : UINavigationController {
|
||||
|
||||
override func viewDidLoad(){
|
||||
super.viewDidLoad()
|
||||
self.view.tintColor = UIColor.redColor()
|
||||
view.tintColor = .redColor()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -33,7 +33,6 @@ class NSArrayValueTrasformer : NSValueTransformer {
|
||||
return NSString.self
|
||||
}
|
||||
|
||||
|
||||
override class func allowsReverseTransformation() -> Bool {
|
||||
return false
|
||||
}
|
||||
@@ -72,48 +71,48 @@ class ISOLanguageCodesValueTranformer : NSValueTransformer {
|
||||
|
||||
class SelectorsFormViewController : XLFormViewController {
|
||||
|
||||
private enum Tags : String {
|
||||
case Push = "selectorPush"
|
||||
case Popover = "selectorPopover"
|
||||
case ActionSheet = "selectorActionSheet"
|
||||
case AlertView = "selectorAlertView"
|
||||
case PickerView = "selectorPickerView"
|
||||
case Picker = "selectorPicker"
|
||||
case PickerViewInline = "selectorPickerViewInline"
|
||||
case MultipleSelector = "multipleSelector"
|
||||
case MultipleSelectorPopover = "multipleSelectorPopover"
|
||||
case DynamicSelectors = "dynamicSelectors"
|
||||
case CustomSelectors = "customSelectors"
|
||||
case SelectorWithSegueId = "selectorWithSegueId"
|
||||
case SelectorWithSegueClass = "selectorWithSegueClass"
|
||||
case SelectorWithNibName = "selectorWithNibName"
|
||||
case SelectorWithStoryboardId = "selectorWithStoryboardId"
|
||||
private struct Tags {
|
||||
static let Push = "selectorPush"
|
||||
static let Popover = "selectorPopover"
|
||||
static let ActionSheet = "selectorActionSheet"
|
||||
static let AlertView = "selectorAlertView"
|
||||
static let PickerView = "selectorPickerView"
|
||||
static let Picker = "selectorPicker"
|
||||
static let PickerViewInline = "selectorPickerViewInline"
|
||||
static let MultipleSelector = "multipleSelector"
|
||||
static let MultipleSelectorPopover = "multipleSelectorPopover"
|
||||
static let DynamicSelectors = "dynamicSelectors"
|
||||
static let CustomSelectors = "customSelectors"
|
||||
static let SelectorWithSegueId = "selectorWithSegueId"
|
||||
static let SelectorWithSegueClass = "selectorWithSegueClass"
|
||||
static let SelectorWithNibName = "selectorWithNibName"
|
||||
static let SelectorWithStoryboardId = "selectorWithStoryboardId"
|
||||
}
|
||||
|
||||
|
||||
override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: NSBundle?) {
|
||||
super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil)
|
||||
self.initializeForm()
|
||||
initializeForm()
|
||||
}
|
||||
|
||||
required init(coder aDecoder: NSCoder) {
|
||||
required init?(coder aDecoder: NSCoder) {
|
||||
super.init(coder: aDecoder)
|
||||
self.initializeForm()
|
||||
initializeForm()
|
||||
}
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
let barButton = UIBarButtonItem(title: "Disable", style: UIBarButtonItemStyle.Plain, target: self, action: "disableEnable:")
|
||||
let barButton = UIBarButtonItem(title: "Disable", style: .Plain, target: self, action: "disableEnable:")
|
||||
barButton.possibleTitles = Set(["Disable", "Enable"])
|
||||
self.navigationItem.rightBarButtonItem = barButton
|
||||
navigationItem.rightBarButtonItem = barButton
|
||||
}
|
||||
|
||||
func disableEnable(button : UIBarButtonItem)
|
||||
{
|
||||
self.form.disabled = !self.form.disabled
|
||||
button.title = self.form.disabled ? "Enable" : "Disable"
|
||||
self.tableView.endEditing(true)
|
||||
self.tableView.reloadData()
|
||||
form.disabled = !form.disabled
|
||||
button.title = form.disabled ? "Enable" : "Disable"
|
||||
tableView.endEditing(true)
|
||||
tableView.reloadData()
|
||||
}
|
||||
|
||||
func initializeForm() {
|
||||
@@ -129,7 +128,7 @@ class SelectorsFormViewController : XLFormViewController {
|
||||
|
||||
|
||||
// Selector Push
|
||||
row = XLFormRowDescriptor(tag: Tags.Push.rawValue, rowType:XLFormRowDescriptorTypeSelectorPush, title:"Push")
|
||||
row = XLFormRowDescriptor(tag: Tags.Push, rowType:XLFormRowDescriptorTypeSelectorPush, title:"Push")
|
||||
row.selectorOptions = [XLFormOptionsObject(value: 0, displayText: "Option 1"),
|
||||
XLFormOptionsObject(value: 1, displayText:"Option 2"),
|
||||
XLFormOptionsObject(value: 2, displayText:"Option 3"),
|
||||
@@ -142,14 +141,14 @@ class SelectorsFormViewController : XLFormViewController {
|
||||
|
||||
// Selector Popover
|
||||
if (UIDevice.currentDevice().userInterfaceIdiom == UIUserInterfaceIdiom.Pad){
|
||||
row = XLFormRowDescriptor(tag: Tags.Popover.rawValue, rowType:XLFormRowDescriptorTypeSelectorPopover, title:"PopOver")
|
||||
row = XLFormRowDescriptor(tag: Tags.Popover, rowType:XLFormRowDescriptorTypeSelectorPopover, title:"PopOver")
|
||||
row.selectorOptions = ["Option 1", "Option 2", "Option 3", "Option 4", "Option 5", "Option 6"]
|
||||
row.value = "Option 2"
|
||||
section.addFormRow(row)
|
||||
}
|
||||
|
||||
// Selector Action Sheet
|
||||
row = XLFormRowDescriptor(tag :Tags.ActionSheet.rawValue, rowType:XLFormRowDescriptorTypeSelectorActionSheet, title:"Sheet")
|
||||
row = XLFormRowDescriptor(tag :Tags.ActionSheet, rowType:XLFormRowDescriptorTypeSelectorActionSheet, title:"Sheet")
|
||||
row.selectorOptions = ["Option 1", "Option 2", "Option 3", "Option 4", "Option 5"]
|
||||
row.value = "Option 3"
|
||||
section.addFormRow(row)
|
||||
@@ -157,13 +156,13 @@ class SelectorsFormViewController : XLFormViewController {
|
||||
|
||||
|
||||
// Selector Alert View
|
||||
row = XLFormRowDescriptor(tag: Tags.AlertView.rawValue, rowType:XLFormRowDescriptorTypeSelectorAlertView, title:"Alert View")
|
||||
row = XLFormRowDescriptor(tag: Tags.AlertView, rowType:XLFormRowDescriptorTypeSelectorAlertView, title:"Alert View")
|
||||
row.selectorOptions = ["Option 1", "Option 2", "Option 3", "Option 4", "Option 5"]
|
||||
row.value = "Option 3"
|
||||
section.addFormRow(row)
|
||||
|
||||
// Selector Picker View
|
||||
row = XLFormRowDescriptor(tag: Tags.PickerView.rawValue, rowType:XLFormRowDescriptorTypeSelectorPickerView, title:"Picker View")
|
||||
row = XLFormRowDescriptor(tag: Tags.PickerView, rowType:XLFormRowDescriptorTypeSelectorPickerView, title:"Picker View")
|
||||
row.selectorOptions = ["Option 1", "Option 2", "Option 3", "Option 4", "Option 5"]
|
||||
row.value = "Option 4"
|
||||
section.addFormRow(row)
|
||||
@@ -173,7 +172,7 @@ class SelectorsFormViewController : XLFormViewController {
|
||||
section = XLFormSectionDescriptor.formSectionWithTitle("Fixed Controls")
|
||||
form.addFormSection(section)
|
||||
|
||||
row = XLFormRowDescriptor(tag: Tags.Picker.rawValue, rowType:XLFormRowDescriptorTypePicker)
|
||||
row = XLFormRowDescriptor(tag: Tags.Picker, rowType:XLFormRowDescriptorTypePicker)
|
||||
row.selectorOptions = ["Option 1", "Option 2", "Option 3", "Option 4", "Option 5"]
|
||||
row.value = "Option 1"
|
||||
section.addFormRow(row)
|
||||
@@ -182,7 +181,7 @@ class SelectorsFormViewController : XLFormViewController {
|
||||
section = XLFormSectionDescriptor.formSectionWithTitle("Inline Selectors")
|
||||
form.addFormSection(section)
|
||||
|
||||
row = XLFormRowDescriptor(tag: Tags.MultipleSelector.rawValue, rowType:XLFormRowDescriptorTypeSelectorPickerViewInline, title:"Inline Picker View")
|
||||
row = XLFormRowDescriptor(tag: Tags.MultipleSelector, rowType:XLFormRowDescriptorTypeSelectorPickerViewInline, title:"Inline Picker View")
|
||||
row.selectorOptions = ["Option 1", "Option 2", "Option 3", "Option 4", "Option 5", "Option 6"]
|
||||
row.value = "Option 6"
|
||||
section.addFormRow(row)
|
||||
@@ -191,14 +190,14 @@ class SelectorsFormViewController : XLFormViewController {
|
||||
section = XLFormSectionDescriptor.formSectionWithTitle("Multiple Selectors")
|
||||
form.addFormSection(section)
|
||||
|
||||
row = XLFormRowDescriptor(tag: Tags.MultipleSelector.rawValue, rowType:XLFormRowDescriptorTypeMultipleSelector, title:"Multiple Selector")
|
||||
row = XLFormRowDescriptor(tag: Tags.MultipleSelector, rowType:XLFormRowDescriptorTypeMultipleSelector, title:"Multiple Selector")
|
||||
row.selectorOptions = ["Option 1", "Option 2", "Option 3", "Option 4", "Option 5", "Option 6"]
|
||||
row.value = ["Option 1", "Option 3", "Option 4", "Option 5", "Option 6"]
|
||||
section.addFormRow(row)
|
||||
|
||||
|
||||
// Multiple selector with value tranformer
|
||||
row = XLFormRowDescriptor(tag: Tags.MultipleSelector.rawValue, rowType:XLFormRowDescriptorTypeMultipleSelector, title:"Multiple Selector")
|
||||
row = XLFormRowDescriptor(tag: Tags.MultipleSelector, rowType:XLFormRowDescriptorTypeMultipleSelector, title:"Multiple Selector")
|
||||
row.selectorOptions = ["Option 1", "Option 2", "Option 3", "Option 4", "Option 5", "Option 6"]
|
||||
row.value = ["Option 1", "Option 3", "Option 4", "Option 5", "Option 6"]
|
||||
row.valueTransformer = NSArrayValueTrasformer.self
|
||||
@@ -206,7 +205,7 @@ class SelectorsFormViewController : XLFormViewController {
|
||||
|
||||
|
||||
// Language multiple selector
|
||||
row = XLFormRowDescriptor(tag: Tags.MultipleSelector.rawValue, rowType:XLFormRowDescriptorTypeMultipleSelector, title:"Multiple Selector")
|
||||
row = XLFormRowDescriptor(tag: Tags.MultipleSelector, rowType:XLFormRowDescriptorTypeMultipleSelector, title:"Multiple Selector")
|
||||
row.selectorOptions = NSLocale.ISOLanguageCodes()
|
||||
row.selectorTitle = "Languages"
|
||||
row.valueTransformer = ISOLanguageCodesValueTranformer.self
|
||||
@@ -214,9 +213,9 @@ class SelectorsFormViewController : XLFormViewController {
|
||||
section.addFormRow(row)
|
||||
|
||||
|
||||
if UIDevice.currentDevice().userInterfaceIdiom == UIUserInterfaceIdiom.Pad {
|
||||
if UIDevice.currentDevice().userInterfaceIdiom == .Pad {
|
||||
// Language multiple selector popover
|
||||
row = XLFormRowDescriptor(tag: Tags.MultipleSelectorPopover.rawValue, rowType:XLFormRowDescriptorTypeMultipleSelectorPopover, title:"Multiple Selector PopOver")
|
||||
row = XLFormRowDescriptor(tag: Tags.MultipleSelectorPopover, rowType:XLFormRowDescriptorTypeMultipleSelectorPopover, title:"Multiple Selector PopOver")
|
||||
row.selectorOptions = NSLocale.ISOLanguageCodes()
|
||||
row.valueTransformer = ISOLanguageCodesValueTranformer.self
|
||||
row.value = NSLocale.preferredLanguages()
|
||||
@@ -229,7 +228,7 @@ class SelectorsFormViewController : XLFormViewController {
|
||||
section = XLFormSectionDescriptor.formSectionWithTitle("Dynamic Selectors")
|
||||
form.addFormSection(section)
|
||||
|
||||
row = XLFormRowDescriptor(tag: Tags.DynamicSelectors.rawValue, rowType:XLFormRowDescriptorTypeButton, title:"Dynamic Selectors")
|
||||
row = XLFormRowDescriptor(tag: Tags.DynamicSelectors, rowType:XLFormRowDescriptorTypeButton, title:"Dynamic Selectors")
|
||||
row.action.viewControllerClass = DynamicSelectorsFormViewController.self
|
||||
section.addFormRow(row)
|
||||
|
||||
@@ -239,7 +238,7 @@ class SelectorsFormViewController : XLFormViewController {
|
||||
section = XLFormSectionDescriptor.formSectionWithTitle("Custom Selectors")
|
||||
form.addFormSection(section)
|
||||
|
||||
row = XLFormRowDescriptor(tag: Tags.CustomSelectors.rawValue, rowType:XLFormRowDescriptorTypeButton, title:"Custom Selectors")
|
||||
row = XLFormRowDescriptor(tag: Tags.CustomSelectors, rowType:XLFormRowDescriptorTypeButton, title:"Custom Selectors")
|
||||
row.action.viewControllerClass = CustomSelectorsFormViewController.self
|
||||
section.addFormRow(row)
|
||||
|
||||
@@ -249,7 +248,7 @@ class SelectorsFormViewController : XLFormViewController {
|
||||
form.addFormSection(section)
|
||||
|
||||
// selector with segue class
|
||||
row = XLFormRowDescriptor(tag: Tags.SelectorWithSegueClass.rawValue, rowType: XLFormRowDescriptorTypeSelectorPush, title: "Selector with Segue Class")
|
||||
row = XLFormRowDescriptor(tag: Tags.SelectorWithSegueClass, rowType: XLFormRowDescriptorTypeSelectorPush, title: "Selector with Segue Class")
|
||||
row.action.formSegueClass = NSClassFromString("UIStoryboardPushSegue")
|
||||
row.action.viewControllerClass = MapViewController.self
|
||||
row.valueTransformer = CLLocationValueTrasformer.self
|
||||
@@ -257,21 +256,21 @@ class SelectorsFormViewController : XLFormViewController {
|
||||
section.addFormRow(row)
|
||||
|
||||
// selector with SegueId
|
||||
row = XLFormRowDescriptor(tag: Tags.SelectorWithSegueId.rawValue, rowType: XLFormRowDescriptorTypeSelectorPush, title: "Selector with Segue Idenfifier")
|
||||
row = XLFormRowDescriptor(tag: Tags.SelectorWithSegueId, rowType: XLFormRowDescriptorTypeSelectorPush, title: "Selector with Segue Idenfifier")
|
||||
row.action.formSegueIdenfifier = "MapViewControllerSegue";
|
||||
row.valueTransformer = CLLocationValueTrasformer.self
|
||||
row.value = CLLocation(latitude: -33, longitude: -56)
|
||||
section.addFormRow(row)
|
||||
|
||||
// selector using StoryboardId
|
||||
row = XLFormRowDescriptor(tag: Tags.SelectorWithStoryboardId.rawValue, rowType: XLFormRowDescriptorTypeSelectorPush, title: "Selector with StoryboardId")
|
||||
row = XLFormRowDescriptor(tag: Tags.SelectorWithStoryboardId, rowType: XLFormRowDescriptorTypeSelectorPush, title: "Selector with StoryboardId")
|
||||
row.action.viewControllerStoryboardId = "MapViewController";
|
||||
row.valueTransformer = CLLocationValueTrasformer.self
|
||||
row.value = CLLocation(latitude: -33, longitude: -56)
|
||||
section.addFormRow(row)
|
||||
|
||||
// selector with NibName
|
||||
row = XLFormRowDescriptor(tag: Tags.SelectorWithNibName.rawValue, rowType: XLFormRowDescriptorTypeSelectorPush, title: "Selector with NibName")
|
||||
row = XLFormRowDescriptor(tag: Tags.SelectorWithNibName, rowType: XLFormRowDescriptorTypeSelectorPush, title: "Selector with NibName")
|
||||
row.action.viewControllerNibName = "MapViewController"
|
||||
row.valueTransformer = CLLocationValueTrasformer.self
|
||||
row.value = CLLocation(latitude: -33, longitude: -56)
|
||||
|
||||
@@ -25,9 +25,9 @@
|
||||
|
||||
class UICustomizationFormViewController : XLFormViewController {
|
||||
|
||||
private enum Tags : String {
|
||||
case Name = "Name"
|
||||
case Button = "Button"
|
||||
private struct Tags {
|
||||
static let Name = "Name"
|
||||
static let Button = "Button"
|
||||
}
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ class UICustomizationFormViewController : XLFormViewController {
|
||||
self.initializeForm()
|
||||
}
|
||||
|
||||
required init(coder aDecoder: NSCoder) {
|
||||
required init?(coder aDecoder: NSCoder) {
|
||||
super.init(coder: aDecoder)
|
||||
self.initializeForm()
|
||||
}
|
||||
@@ -53,7 +53,7 @@ class UICustomizationFormViewController : XLFormViewController {
|
||||
form.addFormSection(section)
|
||||
|
||||
// Name
|
||||
row = XLFormRowDescriptor(tag: Tags.Name.rawValue, rowType: XLFormRowDescriptorTypeText, title:"Name")
|
||||
row = XLFormRowDescriptor(tag: Tags.Name, rowType: XLFormRowDescriptorTypeText, title:"Name")
|
||||
// change the background color
|
||||
row.cellConfigAtConfigure["backgroundColor"] = UIColor.greenColor()
|
||||
// font
|
||||
@@ -72,7 +72,7 @@ class UICustomizationFormViewController : XLFormViewController {
|
||||
form.addFormSection(section)
|
||||
|
||||
//Button
|
||||
row = XLFormRowDescriptor(tag: Tags.Button.rawValue, rowType: XLFormRowDescriptorTypeButton, title:"Button")
|
||||
row = XLFormRowDescriptor(tag: Tags.Button, rowType: XLFormRowDescriptorTypeButton, title:"Button")
|
||||
row.cellConfigAtConfigure["backgroundColor"] = UIColor.purpleColor()
|
||||
row.cellConfig["textLabel.color"] = UIColor.whiteColor()
|
||||
row.cellConfig["textLabel.font"] = UIFont.systemFontOfSize(40)
|
||||
@@ -83,10 +83,10 @@ class UICustomizationFormViewController : XLFormViewController {
|
||||
|
||||
override func tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath) -> CGFloat {
|
||||
// change cell height of a particular cell
|
||||
if self.form.formRowAtIndex(indexPath)?.tag == "Name" {
|
||||
if form.formRowAtIndex(indexPath)?.tag == "Name" {
|
||||
return 60.0
|
||||
}
|
||||
else if self.form.formRowAtIndex(indexPath)?.tag == "Button" {
|
||||
else if form.formRowAtIndex(indexPath)?.tag == "Button" {
|
||||
return 100.0
|
||||
}
|
||||
return super.tableView(tableView, heightForRowAtIndexPath: indexPath)
|
||||
|
||||
+24
-26
@@ -26,22 +26,22 @@
|
||||
|
||||
class ValidationExamplesFormViewController : XLFormViewController {
|
||||
|
||||
private enum Tags : String {
|
||||
case ValidationName = "Name"
|
||||
case ValidationEmail = "Email"
|
||||
case ValidationPassword = "Password"
|
||||
case ValidationInteger = "Integer"
|
||||
private struct Tags {
|
||||
static let ValidationName = "Name"
|
||||
static let ValidationEmail = "Email"
|
||||
static let ValidationPassword = "Password"
|
||||
static let ValidationInteger = "Integer"
|
||||
}
|
||||
|
||||
|
||||
override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: NSBundle?) {
|
||||
super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil)
|
||||
self.initializeForm()
|
||||
initializeForm()
|
||||
}
|
||||
|
||||
required init(coder aDecoder: NSCoder) {
|
||||
required init?(coder aDecoder: NSCoder) {
|
||||
super.init(coder: aDecoder)
|
||||
self.initializeForm()
|
||||
initializeForm()
|
||||
}
|
||||
|
||||
func initializeForm() {
|
||||
@@ -58,7 +58,7 @@ class ValidationExamplesFormViewController : XLFormViewController {
|
||||
|
||||
|
||||
// Name
|
||||
row = XLFormRowDescriptor(tag: Tags.ValidationName.rawValue, rowType: XLFormRowDescriptorTypeText, title:"Name")
|
||||
row = XLFormRowDescriptor(tag: Tags.ValidationName, rowType: XLFormRowDescriptorTypeText, title:"Name")
|
||||
row.cellConfigAtConfigure["textField.placeholder"] = "Required..."
|
||||
row.cellConfigAtConfigure["textField.textAlignment"] = NSTextAlignment.Right.rawValue
|
||||
row.required = true
|
||||
@@ -70,7 +70,7 @@ class ValidationExamplesFormViewController : XLFormViewController {
|
||||
form.addFormSection(section)
|
||||
|
||||
// Email
|
||||
row = XLFormRowDescriptor(tag: Tags.ValidationEmail.rawValue, rowType: XLFormRowDescriptorTypeText, title:"Email")
|
||||
row = XLFormRowDescriptor(tag: Tags.ValidationEmail, rowType: XLFormRowDescriptorTypeText, title:"Email")
|
||||
row.cellConfigAtConfigure["textField.textAlignment"] = NSTextAlignment.Right.rawValue
|
||||
row.required = false
|
||||
row.value = "not valid email"
|
||||
@@ -84,7 +84,7 @@ class ValidationExamplesFormViewController : XLFormViewController {
|
||||
form.addFormSection(section)
|
||||
|
||||
// Password
|
||||
row = XLFormRowDescriptor(tag: Tags.ValidationPassword.rawValue, rowType: XLFormRowDescriptorTypePassword, title:"Password")
|
||||
row = XLFormRowDescriptor(tag: Tags.ValidationPassword, rowType: XLFormRowDescriptorTypePassword, title:"Password")
|
||||
row.cellConfigAtConfigure["textField.placeholder"] = "Required..."
|
||||
row.cellConfigAtConfigure["textField.textAlignment"] = NSTextAlignment.Right.rawValue
|
||||
row.required = true
|
||||
@@ -98,7 +98,7 @@ class ValidationExamplesFormViewController : XLFormViewController {
|
||||
form.addFormSection(section)
|
||||
|
||||
// Integer
|
||||
row = XLFormRowDescriptor(tag: Tags.ValidationInteger.rawValue, rowType:XLFormRowDescriptorTypeInteger, title:"Integer")
|
||||
row = XLFormRowDescriptor(tag: Tags.ValidationInteger, rowType:XLFormRowDescriptorTypeInteger, title:"Integer")
|
||||
row.cellConfigAtConfigure["textField.placeholder"] = "Required..."
|
||||
row.cellConfigAtConfigure["textField.textAlignment"] = NSTextAlignment.Right.rawValue
|
||||
row.required = true
|
||||
@@ -106,14 +106,12 @@ class ValidationExamplesFormViewController : XLFormViewController {
|
||||
section.addFormRow(row)
|
||||
|
||||
self.form = form
|
||||
|
||||
|
||||
}
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
self.navigationItem.rightBarButtonItem?.target = self
|
||||
self.navigationItem.rightBarButtonItem?.action = "validateForm:"
|
||||
navigationItem.rightBarButtonItem?.target = self
|
||||
navigationItem.rightBarButtonItem?.action = "validateForm:"
|
||||
}
|
||||
|
||||
|
||||
@@ -121,22 +119,22 @@ class ValidationExamplesFormViewController : XLFormViewController {
|
||||
//MARK: Actions
|
||||
|
||||
func validateForm(buttonItem: UIBarButtonItem) {
|
||||
let array = self.formValidationErrors()
|
||||
let array = formValidationErrors()
|
||||
for errorItem in array {
|
||||
let error = errorItem as! NSError
|
||||
let validationStatus : XLFormValidationStatus = error.userInfo![XLValidationStatusErrorKey] as! XLFormValidationStatus
|
||||
if validationStatus.rowDescriptor!.tag == Tags.ValidationName.rawValue {
|
||||
if let cell = self.tableView.cellForRowAtIndexPath(self.form.indexPathOfFormRow(validationStatus.rowDescriptor)!) {
|
||||
cell.backgroundColor = UIColor.orangeColor()
|
||||
let validationStatus : XLFormValidationStatus = error.userInfo[XLValidationStatusErrorKey] as! XLFormValidationStatus
|
||||
if validationStatus.rowDescriptor!.tag == Tags.ValidationName {
|
||||
if let rowDescriptor = validationStatus.rowDescriptor, let indexPath = form.indexPathOfFormRow(rowDescriptor), let cell = tableView.cellForRowAtIndexPath(indexPath) {
|
||||
cell.backgroundColor = .orangeColor()
|
||||
UIView.animateWithDuration(0.3, animations: { () -> Void in
|
||||
cell.backgroundColor = UIColor.whiteColor()
|
||||
cell.backgroundColor = .whiteColor()
|
||||
})
|
||||
}
|
||||
}
|
||||
else if validationStatus.rowDescriptor!.tag == Tags.ValidationEmail.rawValue ||
|
||||
validationStatus.rowDescriptor!.tag == Tags.ValidationPassword.rawValue ||
|
||||
validationStatus.rowDescriptor!.tag == Tags.ValidationInteger.rawValue {
|
||||
if let cell = self.tableView.cellForRowAtIndexPath(self.form.indexPathOfFormRow(validationStatus.rowDescriptor)!) {
|
||||
else if validationStatus.rowDescriptor!.tag == Tags.ValidationEmail ||
|
||||
validationStatus.rowDescriptor!.tag == Tags.ValidationPassword ||
|
||||
validationStatus.rowDescriptor!.tag == Tags.ValidationInteger {
|
||||
if let rowDescriptor = validationStatus.rowDescriptor, let indexPath = form.indexPathOfFormRow(rowDescriptor), let cell = tableView.cellForRowAtIndexPath(indexPath) {
|
||||
self.animateCell(cell)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,8 @@ By [XMARTLABS](http://xmartlabs.com).
|
||||
[](https://travis-ci.org/xmartlabs/XLForm)
|
||||
[](https://github.com/xmartlabs/XLForm/releases)
|
||||
|
||||
**If you are looking for Swift 2 native implementation we have recently created [Eureka], a complete re-design of XLForm in Swift 2.** *Do not panic, We will continue maintaining and improving XLForm, obj-c rocks!!*
|
||||
|
||||
Purpose
|
||||
--------------
|
||||
|
||||
@@ -980,10 +982,19 @@ This rowDescriptor refers to the selected row of the previous view controller an
|
||||
|
||||
The best way to do this is to extend the class of that cell and override its update and/or configure methods. To make this work you should also update the `cellClassesForRowDescriptorTypes` dictionary in your subclass of XLFormViewController by setting your custom class instead of the class of the cell you wanted to change.
|
||||
|
||||
#### How to change the returnKeyType of a cell
|
||||
|
||||
To change the returnKeyType of a cell you can set the `returnKeyType` and `nextReturnKeyType` properties. The former will be used if there is no navigation enabled or if there is no row after this row. In the other case the latter will be used.
|
||||
If you create a custom cell and want to use these you should conform to the `XLFormReturnKeyProtocol` protocol.
|
||||
This is how you can set them:
|
||||
```
|
||||
[row.cellConfigAtConfigure setObject:@(UIReturnKeyGo) forKey:@"nextReturnKeyType"];
|
||||
```
|
||||
|
||||
Installation
|
||||
--------------------------
|
||||
|
||||
The easiest way to use XLForm in your app is via [CocoaPods](http://cocoapods.org/ "CocoaPods").
|
||||
## Cocoapods
|
||||
|
||||
1. Add the following line in the project's Podfile file:
|
||||
`pod 'XLForm', '~> 3.0'`.
|
||||
@@ -991,6 +1002,13 @@ The easiest way to use XLForm in your app is via [CocoaPods](http://cocoapods.or
|
||||
|
||||
XLForm **has no** dependencies over other pods.
|
||||
|
||||
## Carthage
|
||||
|
||||
In your `Cartfile` add:
|
||||
|
||||
```
|
||||
github "xmartlabs/XLForm" ~> 3.0
|
||||
```
|
||||
|
||||
### How to use master branch
|
||||
|
||||
@@ -1022,6 +1040,12 @@ Requirements
|
||||
Release Notes
|
||||
--------------
|
||||
|
||||
Version 3.1.0
|
||||
* Added Carthage support
|
||||
* Added NSCoding protocol
|
||||
* Allowed HTTP connections
|
||||
* Several bugfixes and improvements.
|
||||
|
||||
Version 3.0.2
|
||||
* Fix issue when inline pickers expand beyond table.
|
||||
|
||||
@@ -1140,3 +1164,5 @@ Contact
|
||||
Any suggestion or question? Please create a Github issue or reach us out.
|
||||
|
||||
[xmartlabs.com](http://xmartlabs.com) ([@xmartlabs](http://twitter.com/xmartlabs "@xmartlabs"))
|
||||
|
||||
[Eureka]: https://github.com/xmartlabs/Eureka
|
||||
|
||||
@@ -3,7 +3,7 @@ include FileUtils::Verbose
|
||||
namespace :test do
|
||||
desc "Run the XLForm Tests"
|
||||
task :ios do
|
||||
run_tests('XLForm Tests', 'iphonesimulator')
|
||||
run_tests('XLForm Tests', 'iphonesimulator9.2')
|
||||
tests_failed unless $?.success?
|
||||
end
|
||||
end
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
Pod::Spec.new do |s|
|
||||
s.name = 'XLForm'
|
||||
s.version = '3.0.2'
|
||||
s.version = '3.1.0'
|
||||
s.license = { :type => 'MIT' }
|
||||
s.summary = 'XLForm is the most flexible and powerful iOS library to create dynamic table-view forms.'
|
||||
s.description = <<-DESC
|
||||
@@ -8,7 +8,7 @@ Pod::Spec.new do |s|
|
||||
DESC
|
||||
s.homepage = 'https://github.com/xmartlabs/XLForm'
|
||||
s.authors = { 'Martin Barreto' => 'martin@xmartlabs.com' }
|
||||
s.source = { :git => 'https://github.com/xmartlabs/XLForm.git', :tag => 'v3.0.2' }
|
||||
s.source = { :git => 'https://github.com/xmartlabs/XLForm.git', :tag => s.version }
|
||||
s.source_files = 'XLForm/XL/**/*.{h,m}'
|
||||
s.requires_arc = true
|
||||
s.ios.deployment_target = '7.0'
|
||||
|
||||
@@ -0,0 +1,636 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 46;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
E267FD7C1BE804E200F86B42 /* XLFormBaseCell.h in Headers */ = {isa = PBXBuildFile; fileRef = E267FD2C1BE804E200F86B42 /* XLFormBaseCell.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
E267FD7D1BE804E200F86B42 /* XLFormBaseCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E267FD2D1BE804E200F86B42 /* XLFormBaseCell.m */; };
|
||||
E267FD7E1BE804E200F86B42 /* XLFormButtonCell.h in Headers */ = {isa = PBXBuildFile; fileRef = E267FD2E1BE804E200F86B42 /* XLFormButtonCell.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
E267FD7F1BE804E200F86B42 /* XLFormButtonCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E267FD2F1BE804E200F86B42 /* XLFormButtonCell.m */; };
|
||||
E267FD801BE804E200F86B42 /* XLFormCheckCell.h in Headers */ = {isa = PBXBuildFile; fileRef = E267FD301BE804E200F86B42 /* XLFormCheckCell.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
E267FD811BE804E200F86B42 /* XLFormCheckCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E267FD311BE804E200F86B42 /* XLFormCheckCell.m */; };
|
||||
E267FD821BE804E200F86B42 /* XLFormDateCell.h in Headers */ = {isa = PBXBuildFile; fileRef = E267FD321BE804E200F86B42 /* XLFormDateCell.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
E267FD831BE804E200F86B42 /* XLFormDateCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E267FD331BE804E200F86B42 /* XLFormDateCell.m */; };
|
||||
E267FD841BE804E200F86B42 /* XLFormDatePickerCell.h in Headers */ = {isa = PBXBuildFile; fileRef = E267FD341BE804E200F86B42 /* XLFormDatePickerCell.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
E267FD851BE804E200F86B42 /* XLFormDatePickerCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E267FD351BE804E200F86B42 /* XLFormDatePickerCell.m */; };
|
||||
E267FD861BE804E200F86B42 /* XLFormDescriptorCell.h in Headers */ = {isa = PBXBuildFile; fileRef = E267FD361BE804E200F86B42 /* XLFormDescriptorCell.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
E267FD871BE804E200F86B42 /* XLFormInlineRowDescriptorCell.h in Headers */ = {isa = PBXBuildFile; fileRef = E267FD371BE804E200F86B42 /* XLFormInlineRowDescriptorCell.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
E267FD881BE804E200F86B42 /* XLFormInlineSelectorCell.h in Headers */ = {isa = PBXBuildFile; fileRef = E267FD381BE804E200F86B42 /* XLFormInlineSelectorCell.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
E267FD891BE804E200F86B42 /* XLFormInlineSelectorCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E267FD391BE804E200F86B42 /* XLFormInlineSelectorCell.m */; };
|
||||
E267FD8A1BE804E200F86B42 /* XLFormLeftRightSelectorCell.h in Headers */ = {isa = PBXBuildFile; fileRef = E267FD3A1BE804E200F86B42 /* XLFormLeftRightSelectorCell.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
E267FD8B1BE804E200F86B42 /* XLFormLeftRightSelectorCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E267FD3B1BE804E200F86B42 /* XLFormLeftRightSelectorCell.m */; };
|
||||
E267FD8C1BE804E200F86B42 /* XLFormPickerCell.h in Headers */ = {isa = PBXBuildFile; fileRef = E267FD3C1BE804E200F86B42 /* XLFormPickerCell.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
E267FD8D1BE804E200F86B42 /* XLFormPickerCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E267FD3D1BE804E200F86B42 /* XLFormPickerCell.m */; };
|
||||
E267FD8E1BE804E200F86B42 /* XLFormSegmentedCell.h in Headers */ = {isa = PBXBuildFile; fileRef = E267FD3E1BE804E200F86B42 /* XLFormSegmentedCell.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
E267FD8F1BE804E200F86B42 /* XLFormSegmentedCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E267FD3F1BE804E200F86B42 /* XLFormSegmentedCell.m */; };
|
||||
E267FD901BE804E200F86B42 /* XLFormSelectorCell.h in Headers */ = {isa = PBXBuildFile; fileRef = E267FD401BE804E200F86B42 /* XLFormSelectorCell.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
E267FD911BE804E200F86B42 /* XLFormSelectorCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E267FD411BE804E200F86B42 /* XLFormSelectorCell.m */; };
|
||||
E267FD921BE804E200F86B42 /* XLFormSliderCell.h in Headers */ = {isa = PBXBuildFile; fileRef = E267FD421BE804E200F86B42 /* XLFormSliderCell.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
E267FD931BE804E200F86B42 /* XLFormSliderCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E267FD431BE804E200F86B42 /* XLFormSliderCell.m */; };
|
||||
E267FD941BE804E200F86B42 /* XLFormStepCounterCell.h in Headers */ = {isa = PBXBuildFile; fileRef = E267FD441BE804E200F86B42 /* XLFormStepCounterCell.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
E267FD951BE804E200F86B42 /* XLFormStepCounterCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E267FD451BE804E200F86B42 /* XLFormStepCounterCell.m */; };
|
||||
E267FD961BE804E200F86B42 /* XLFormSwitchCell.h in Headers */ = {isa = PBXBuildFile; fileRef = E267FD461BE804E200F86B42 /* XLFormSwitchCell.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
E267FD971BE804E200F86B42 /* XLFormSwitchCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E267FD471BE804E200F86B42 /* XLFormSwitchCell.m */; };
|
||||
E267FD981BE804E200F86B42 /* XLFormTextFieldCell.h in Headers */ = {isa = PBXBuildFile; fileRef = E267FD481BE804E200F86B42 /* XLFormTextFieldCell.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
E267FD991BE804E200F86B42 /* XLFormTextFieldCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E267FD491BE804E200F86B42 /* XLFormTextFieldCell.m */; };
|
||||
E267FD9A1BE804E200F86B42 /* XLFormTextViewCell.h in Headers */ = {isa = PBXBuildFile; fileRef = E267FD4A1BE804E200F86B42 /* XLFormTextViewCell.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
E267FD9B1BE804E200F86B42 /* XLFormTextViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E267FD4B1BE804E200F86B42 /* XLFormTextViewCell.m */; };
|
||||
E267FD9C1BE804E200F86B42 /* XLFormOptionsObject.h in Headers */ = {isa = PBXBuildFile; fileRef = E267FD4D1BE804E200F86B42 /* XLFormOptionsObject.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
E267FD9D1BE804E200F86B42 /* XLFormOptionsObject.m in Sources */ = {isa = PBXBuildFile; fileRef = E267FD4E1BE804E200F86B42 /* XLFormOptionsObject.m */; };
|
||||
E267FD9E1BE804E200F86B42 /* XLFormOptionsViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = E267FD4F1BE804E200F86B42 /* XLFormOptionsViewController.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
E267FD9F1BE804E200F86B42 /* XLFormOptionsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E267FD501BE804E200F86B42 /* XLFormOptionsViewController.m */; };
|
||||
E267FDA01BE804E200F86B42 /* XLFormRowDescriptorViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = E267FD511BE804E200F86B42 /* XLFormRowDescriptorViewController.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
E267FDA11BE804E200F86B42 /* XLFormViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = E267FD521BE804E200F86B42 /* XLFormViewController.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
E267FDA21BE804E200F86B42 /* XLFormViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E267FD531BE804E200F86B42 /* XLFormViewController.m */; };
|
||||
E267FDA31BE804E200F86B42 /* XLFormDescriptor.h in Headers */ = {isa = PBXBuildFile; fileRef = E267FD551BE804E200F86B42 /* XLFormDescriptor.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
E267FDA41BE804E200F86B42 /* XLFormDescriptor.m in Sources */ = {isa = PBXBuildFile; fileRef = E267FD561BE804E200F86B42 /* XLFormDescriptor.m */; };
|
||||
E267FDA51BE804E200F86B42 /* XLFormDescriptorDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = E267FD571BE804E200F86B42 /* XLFormDescriptorDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
E267FDA61BE804E200F86B42 /* XLFormRowDescriptor.h in Headers */ = {isa = PBXBuildFile; fileRef = E267FD581BE804E200F86B42 /* XLFormRowDescriptor.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
E267FDA71BE804E200F86B42 /* XLFormRowDescriptor.m in Sources */ = {isa = PBXBuildFile; fileRef = E267FD591BE804E200F86B42 /* XLFormRowDescriptor.m */; };
|
||||
E267FDA81BE804E200F86B42 /* XLFormSectionDescriptor.h in Headers */ = {isa = PBXBuildFile; fileRef = E267FD5A1BE804E200F86B42 /* XLFormSectionDescriptor.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
E267FDA91BE804E200F86B42 /* XLFormSectionDescriptor.m in Sources */ = {isa = PBXBuildFile; fileRef = E267FD5B1BE804E200F86B42 /* XLFormSectionDescriptor.m */; };
|
||||
E267FDAA1BE804E200F86B42 /* NSArray+XLFormAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = E267FD5D1BE804E200F86B42 /* NSArray+XLFormAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
E267FDAB1BE804E200F86B42 /* NSArray+XLFormAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = E267FD5E1BE804E200F86B42 /* NSArray+XLFormAdditions.m */; };
|
||||
E267FDAC1BE804E200F86B42 /* NSExpression+XLFormAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = E267FD5F1BE804E200F86B42 /* NSExpression+XLFormAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
E267FDAD1BE804E200F86B42 /* NSExpression+XLFormAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = E267FD601BE804E200F86B42 /* NSExpression+XLFormAdditions.m */; };
|
||||
E267FDAE1BE804E200F86B42 /* NSObject+XLFormAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = E267FD611BE804E200F86B42 /* NSObject+XLFormAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
E267FDAF1BE804E200F86B42 /* NSObject+XLFormAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = E267FD621BE804E200F86B42 /* NSObject+XLFormAdditions.m */; };
|
||||
E267FDB01BE804E200F86B42 /* NSPredicate+XLFormAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = E267FD631BE804E200F86B42 /* NSPredicate+XLFormAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
E267FDB11BE804E200F86B42 /* NSPredicate+XLFormAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = E267FD641BE804E200F86B42 /* NSPredicate+XLFormAdditions.m */; };
|
||||
E267FDB21BE804E200F86B42 /* NSString+XLFormAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = E267FD651BE804E200F86B42 /* NSString+XLFormAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
E267FDB31BE804E200F86B42 /* NSString+XLFormAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = E267FD661BE804E200F86B42 /* NSString+XLFormAdditions.m */; };
|
||||
E267FDB41BE804E200F86B42 /* UIView+XLFormAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = E267FD671BE804E200F86B42 /* UIView+XLFormAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
E267FDB51BE804E200F86B42 /* UIView+XLFormAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = E267FD681BE804E200F86B42 /* UIView+XLFormAdditions.m */; };
|
||||
E267FDB61BE804E200F86B42 /* XLFormRightDetailCell.h in Headers */ = {isa = PBXBuildFile; fileRef = E267FD6A1BE804E200F86B42 /* XLFormRightDetailCell.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
E267FDB71BE804E200F86B42 /* XLFormRightDetailCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E267FD6B1BE804E200F86B42 /* XLFormRightDetailCell.m */; };
|
||||
E267FDB81BE804E200F86B42 /* XLFormRightImageButton.h in Headers */ = {isa = PBXBuildFile; fileRef = E267FD6C1BE804E200F86B42 /* XLFormRightImageButton.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
E267FDB91BE804E200F86B42 /* XLFormRightImageButton.m in Sources */ = {isa = PBXBuildFile; fileRef = E267FD6D1BE804E200F86B42 /* XLFormRightImageButton.m */; };
|
||||
E267FDBA1BE804E200F86B42 /* XLFormRowNavigationAccessoryView.h in Headers */ = {isa = PBXBuildFile; fileRef = E267FD6E1BE804E200F86B42 /* XLFormRowNavigationAccessoryView.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
E267FDBB1BE804E200F86B42 /* XLFormRowNavigationAccessoryView.m in Sources */ = {isa = PBXBuildFile; fileRef = E267FD6F1BE804E200F86B42 /* XLFormRowNavigationAccessoryView.m */; };
|
||||
E267FDBC1BE804E200F86B42 /* XLFormTextView.h in Headers */ = {isa = PBXBuildFile; fileRef = E267FD701BE804E200F86B42 /* XLFormTextView.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
E267FDBD1BE804E200F86B42 /* XLFormTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = E267FD711BE804E200F86B42 /* XLFormTextView.m */; };
|
||||
E267FDBE1BE804E200F86B42 /* XLFormRegexValidator.h in Headers */ = {isa = PBXBuildFile; fileRef = E267FD731BE804E200F86B42 /* XLFormRegexValidator.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
E267FDBF1BE804E200F86B42 /* XLFormRegexValidator.m in Sources */ = {isa = PBXBuildFile; fileRef = E267FD741BE804E200F86B42 /* XLFormRegexValidator.m */; };
|
||||
E267FDC01BE804E200F86B42 /* XLFormValidationStatus.h in Headers */ = {isa = PBXBuildFile; fileRef = E267FD751BE804E200F86B42 /* XLFormValidationStatus.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
E267FDC11BE804E200F86B42 /* XLFormValidationStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = E267FD761BE804E200F86B42 /* XLFormValidationStatus.m */; };
|
||||
E267FDC21BE804E200F86B42 /* XLFormValidator.h in Headers */ = {isa = PBXBuildFile; fileRef = E267FD771BE804E200F86B42 /* XLFormValidator.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
E267FDC31BE804E200F86B42 /* XLFormValidator.m in Sources */ = {isa = PBXBuildFile; fileRef = E267FD781BE804E200F86B42 /* XLFormValidator.m */; };
|
||||
E267FDC41BE804E200F86B42 /* XLFormValidatorProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = E267FD791BE804E200F86B42 /* XLFormValidatorProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
E267FDC51BE804E200F86B42 /* XLForm.h in Headers */ = {isa = PBXBuildFile; fileRef = E267FD7A1BE804E200F86B42 /* XLForm.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
E267FDC61BE804E200F86B42 /* XLForm.m in Sources */ = {isa = PBXBuildFile; fileRef = E267FD7B1BE804E200F86B42 /* XLForm.m */; };
|
||||
E267FDC81BE806D000F86B42 /* XLForm.bundle in Resources */ = {isa = PBXBuildFile; fileRef = E267FDC71BE806D000F86B42 /* XLForm.bundle */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
E267FD201BE8048900F86B42 /* XLForm.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = XLForm.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
E267FD251BE8048900F86B42 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
E267FD2C1BE804E200F86B42 /* XLFormBaseCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XLFormBaseCell.h; sourceTree = "<group>"; };
|
||||
E267FD2D1BE804E200F86B42 /* XLFormBaseCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XLFormBaseCell.m; sourceTree = "<group>"; };
|
||||
E267FD2E1BE804E200F86B42 /* XLFormButtonCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XLFormButtonCell.h; sourceTree = "<group>"; };
|
||||
E267FD2F1BE804E200F86B42 /* XLFormButtonCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XLFormButtonCell.m; sourceTree = "<group>"; };
|
||||
E267FD301BE804E200F86B42 /* XLFormCheckCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XLFormCheckCell.h; sourceTree = "<group>"; };
|
||||
E267FD311BE804E200F86B42 /* XLFormCheckCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XLFormCheckCell.m; sourceTree = "<group>"; };
|
||||
E267FD321BE804E200F86B42 /* XLFormDateCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XLFormDateCell.h; sourceTree = "<group>"; };
|
||||
E267FD331BE804E200F86B42 /* XLFormDateCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XLFormDateCell.m; sourceTree = "<group>"; };
|
||||
E267FD341BE804E200F86B42 /* XLFormDatePickerCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XLFormDatePickerCell.h; sourceTree = "<group>"; };
|
||||
E267FD351BE804E200F86B42 /* XLFormDatePickerCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XLFormDatePickerCell.m; sourceTree = "<group>"; };
|
||||
E267FD361BE804E200F86B42 /* XLFormDescriptorCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XLFormDescriptorCell.h; sourceTree = "<group>"; };
|
||||
E267FD371BE804E200F86B42 /* XLFormInlineRowDescriptorCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XLFormInlineRowDescriptorCell.h; sourceTree = "<group>"; };
|
||||
E267FD381BE804E200F86B42 /* XLFormInlineSelectorCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XLFormInlineSelectorCell.h; sourceTree = "<group>"; };
|
||||
E267FD391BE804E200F86B42 /* XLFormInlineSelectorCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XLFormInlineSelectorCell.m; sourceTree = "<group>"; };
|
||||
E267FD3A1BE804E200F86B42 /* XLFormLeftRightSelectorCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XLFormLeftRightSelectorCell.h; sourceTree = "<group>"; };
|
||||
E267FD3B1BE804E200F86B42 /* XLFormLeftRightSelectorCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XLFormLeftRightSelectorCell.m; sourceTree = "<group>"; };
|
||||
E267FD3C1BE804E200F86B42 /* XLFormPickerCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XLFormPickerCell.h; sourceTree = "<group>"; };
|
||||
E267FD3D1BE804E200F86B42 /* XLFormPickerCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XLFormPickerCell.m; sourceTree = "<group>"; };
|
||||
E267FD3E1BE804E200F86B42 /* XLFormSegmentedCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XLFormSegmentedCell.h; sourceTree = "<group>"; };
|
||||
E267FD3F1BE804E200F86B42 /* XLFormSegmentedCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XLFormSegmentedCell.m; sourceTree = "<group>"; };
|
||||
E267FD401BE804E200F86B42 /* XLFormSelectorCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XLFormSelectorCell.h; sourceTree = "<group>"; };
|
||||
E267FD411BE804E200F86B42 /* XLFormSelectorCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XLFormSelectorCell.m; sourceTree = "<group>"; };
|
||||
E267FD421BE804E200F86B42 /* XLFormSliderCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XLFormSliderCell.h; sourceTree = "<group>"; };
|
||||
E267FD431BE804E200F86B42 /* XLFormSliderCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XLFormSliderCell.m; sourceTree = "<group>"; };
|
||||
E267FD441BE804E200F86B42 /* XLFormStepCounterCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XLFormStepCounterCell.h; sourceTree = "<group>"; };
|
||||
E267FD451BE804E200F86B42 /* XLFormStepCounterCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XLFormStepCounterCell.m; sourceTree = "<group>"; };
|
||||
E267FD461BE804E200F86B42 /* XLFormSwitchCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XLFormSwitchCell.h; sourceTree = "<group>"; };
|
||||
E267FD471BE804E200F86B42 /* XLFormSwitchCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XLFormSwitchCell.m; sourceTree = "<group>"; };
|
||||
E267FD481BE804E200F86B42 /* XLFormTextFieldCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XLFormTextFieldCell.h; sourceTree = "<group>"; };
|
||||
E267FD491BE804E200F86B42 /* XLFormTextFieldCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XLFormTextFieldCell.m; sourceTree = "<group>"; };
|
||||
E267FD4A1BE804E200F86B42 /* XLFormTextViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XLFormTextViewCell.h; sourceTree = "<group>"; };
|
||||
E267FD4B1BE804E200F86B42 /* XLFormTextViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XLFormTextViewCell.m; sourceTree = "<group>"; };
|
||||
E267FD4D1BE804E200F86B42 /* XLFormOptionsObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XLFormOptionsObject.h; sourceTree = "<group>"; };
|
||||
E267FD4E1BE804E200F86B42 /* XLFormOptionsObject.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XLFormOptionsObject.m; sourceTree = "<group>"; };
|
||||
E267FD4F1BE804E200F86B42 /* XLFormOptionsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XLFormOptionsViewController.h; sourceTree = "<group>"; };
|
||||
E267FD501BE804E200F86B42 /* XLFormOptionsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XLFormOptionsViewController.m; sourceTree = "<group>"; };
|
||||
E267FD511BE804E200F86B42 /* XLFormRowDescriptorViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XLFormRowDescriptorViewController.h; sourceTree = "<group>"; };
|
||||
E267FD521BE804E200F86B42 /* XLFormViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XLFormViewController.h; sourceTree = "<group>"; };
|
||||
E267FD531BE804E200F86B42 /* XLFormViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XLFormViewController.m; sourceTree = "<group>"; };
|
||||
E267FD551BE804E200F86B42 /* XLFormDescriptor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XLFormDescriptor.h; sourceTree = "<group>"; };
|
||||
E267FD561BE804E200F86B42 /* XLFormDescriptor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XLFormDescriptor.m; sourceTree = "<group>"; };
|
||||
E267FD571BE804E200F86B42 /* XLFormDescriptorDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XLFormDescriptorDelegate.h; sourceTree = "<group>"; };
|
||||
E267FD581BE804E200F86B42 /* XLFormRowDescriptor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XLFormRowDescriptor.h; sourceTree = "<group>"; };
|
||||
E267FD591BE804E200F86B42 /* XLFormRowDescriptor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XLFormRowDescriptor.m; sourceTree = "<group>"; };
|
||||
E267FD5A1BE804E200F86B42 /* XLFormSectionDescriptor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XLFormSectionDescriptor.h; sourceTree = "<group>"; };
|
||||
E267FD5B1BE804E200F86B42 /* XLFormSectionDescriptor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XLFormSectionDescriptor.m; sourceTree = "<group>"; };
|
||||
E267FD5D1BE804E200F86B42 /* NSArray+XLFormAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSArray+XLFormAdditions.h"; sourceTree = "<group>"; };
|
||||
E267FD5E1BE804E200F86B42 /* NSArray+XLFormAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSArray+XLFormAdditions.m"; sourceTree = "<group>"; };
|
||||
E267FD5F1BE804E200F86B42 /* NSExpression+XLFormAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSExpression+XLFormAdditions.h"; sourceTree = "<group>"; };
|
||||
E267FD601BE804E200F86B42 /* NSExpression+XLFormAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSExpression+XLFormAdditions.m"; sourceTree = "<group>"; };
|
||||
E267FD611BE804E200F86B42 /* NSObject+XLFormAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSObject+XLFormAdditions.h"; sourceTree = "<group>"; };
|
||||
E267FD621BE804E200F86B42 /* NSObject+XLFormAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSObject+XLFormAdditions.m"; sourceTree = "<group>"; };
|
||||
E267FD631BE804E200F86B42 /* NSPredicate+XLFormAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSPredicate+XLFormAdditions.h"; sourceTree = "<group>"; };
|
||||
E267FD641BE804E200F86B42 /* NSPredicate+XLFormAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSPredicate+XLFormAdditions.m"; sourceTree = "<group>"; };
|
||||
E267FD651BE804E200F86B42 /* NSString+XLFormAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+XLFormAdditions.h"; sourceTree = "<group>"; };
|
||||
E267FD661BE804E200F86B42 /* NSString+XLFormAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+XLFormAdditions.m"; sourceTree = "<group>"; };
|
||||
E267FD671BE804E200F86B42 /* UIView+XLFormAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+XLFormAdditions.h"; sourceTree = "<group>"; };
|
||||
E267FD681BE804E200F86B42 /* UIView+XLFormAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+XLFormAdditions.m"; sourceTree = "<group>"; };
|
||||
E267FD6A1BE804E200F86B42 /* XLFormRightDetailCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XLFormRightDetailCell.h; sourceTree = "<group>"; };
|
||||
E267FD6B1BE804E200F86B42 /* XLFormRightDetailCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XLFormRightDetailCell.m; sourceTree = "<group>"; };
|
||||
E267FD6C1BE804E200F86B42 /* XLFormRightImageButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XLFormRightImageButton.h; sourceTree = "<group>"; };
|
||||
E267FD6D1BE804E200F86B42 /* XLFormRightImageButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XLFormRightImageButton.m; sourceTree = "<group>"; };
|
||||
E267FD6E1BE804E200F86B42 /* XLFormRowNavigationAccessoryView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XLFormRowNavigationAccessoryView.h; sourceTree = "<group>"; };
|
||||
E267FD6F1BE804E200F86B42 /* XLFormRowNavigationAccessoryView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XLFormRowNavigationAccessoryView.m; sourceTree = "<group>"; };
|
||||
E267FD701BE804E200F86B42 /* XLFormTextView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XLFormTextView.h; sourceTree = "<group>"; };
|
||||
E267FD711BE804E200F86B42 /* XLFormTextView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XLFormTextView.m; sourceTree = "<group>"; };
|
||||
E267FD731BE804E200F86B42 /* XLFormRegexValidator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XLFormRegexValidator.h; sourceTree = "<group>"; };
|
||||
E267FD741BE804E200F86B42 /* XLFormRegexValidator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XLFormRegexValidator.m; sourceTree = "<group>"; };
|
||||
E267FD751BE804E200F86B42 /* XLFormValidationStatus.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XLFormValidationStatus.h; sourceTree = "<group>"; };
|
||||
E267FD761BE804E200F86B42 /* XLFormValidationStatus.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XLFormValidationStatus.m; sourceTree = "<group>"; };
|
||||
E267FD771BE804E200F86B42 /* XLFormValidator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XLFormValidator.h; sourceTree = "<group>"; };
|
||||
E267FD781BE804E200F86B42 /* XLFormValidator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XLFormValidator.m; sourceTree = "<group>"; };
|
||||
E267FD791BE804E200F86B42 /* XLFormValidatorProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XLFormValidatorProtocol.h; sourceTree = "<group>"; };
|
||||
E267FD7A1BE804E200F86B42 /* XLForm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = XLForm.h; path = XL/XLForm.h; sourceTree = "<group>"; };
|
||||
E267FD7B1BE804E200F86B42 /* XLForm.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = XLForm.m; path = XL/XLForm.m; sourceTree = "<group>"; };
|
||||
E267FDC71BE806D000F86B42 /* XLForm.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = XLForm.bundle; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
E267FD1C1BE8048900F86B42 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
E267FD161BE8048900F86B42 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E267FD221BE8048900F86B42 /* XLForm */,
|
||||
E267FD211BE8048900F86B42 /* Products */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E267FD211BE8048900F86B42 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E267FD201BE8048900F86B42 /* XLForm.framework */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E267FD221BE8048900F86B42 /* XLForm */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E267FD2B1BE804E200F86B42 /* Cell */,
|
||||
E267FD4C1BE804E200F86B42 /* Controllers */,
|
||||
E267FD541BE804E200F86B42 /* Descriptors */,
|
||||
E267FD5C1BE804E200F86B42 /* Helpers */,
|
||||
E267FD721BE804E200F86B42 /* Validation */,
|
||||
E267FD7A1BE804E200F86B42 /* XLForm.h */,
|
||||
E267FD7B1BE804E200F86B42 /* XLForm.m */,
|
||||
E267FD251BE8048900F86B42 /* Info.plist */,
|
||||
E267FDC71BE806D000F86B42 /* XLForm.bundle */,
|
||||
);
|
||||
path = XLForm;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E267FD2B1BE804E200F86B42 /* Cell */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E267FD2C1BE804E200F86B42 /* XLFormBaseCell.h */,
|
||||
E267FD2D1BE804E200F86B42 /* XLFormBaseCell.m */,
|
||||
E267FD2E1BE804E200F86B42 /* XLFormButtonCell.h */,
|
||||
E267FD2F1BE804E200F86B42 /* XLFormButtonCell.m */,
|
||||
E267FD301BE804E200F86B42 /* XLFormCheckCell.h */,
|
||||
E267FD311BE804E200F86B42 /* XLFormCheckCell.m */,
|
||||
E267FD321BE804E200F86B42 /* XLFormDateCell.h */,
|
||||
E267FD331BE804E200F86B42 /* XLFormDateCell.m */,
|
||||
E267FD341BE804E200F86B42 /* XLFormDatePickerCell.h */,
|
||||
E267FD351BE804E200F86B42 /* XLFormDatePickerCell.m */,
|
||||
E267FD361BE804E200F86B42 /* XLFormDescriptorCell.h */,
|
||||
E267FD371BE804E200F86B42 /* XLFormInlineRowDescriptorCell.h */,
|
||||
E267FD381BE804E200F86B42 /* XLFormInlineSelectorCell.h */,
|
||||
E267FD391BE804E200F86B42 /* XLFormInlineSelectorCell.m */,
|
||||
E267FD3A1BE804E200F86B42 /* XLFormLeftRightSelectorCell.h */,
|
||||
E267FD3B1BE804E200F86B42 /* XLFormLeftRightSelectorCell.m */,
|
||||
E267FD3C1BE804E200F86B42 /* XLFormPickerCell.h */,
|
||||
E267FD3D1BE804E200F86B42 /* XLFormPickerCell.m */,
|
||||
E267FD3E1BE804E200F86B42 /* XLFormSegmentedCell.h */,
|
||||
E267FD3F1BE804E200F86B42 /* XLFormSegmentedCell.m */,
|
||||
E267FD401BE804E200F86B42 /* XLFormSelectorCell.h */,
|
||||
E267FD411BE804E200F86B42 /* XLFormSelectorCell.m */,
|
||||
E267FD421BE804E200F86B42 /* XLFormSliderCell.h */,
|
||||
E267FD431BE804E200F86B42 /* XLFormSliderCell.m */,
|
||||
E267FD441BE804E200F86B42 /* XLFormStepCounterCell.h */,
|
||||
E267FD451BE804E200F86B42 /* XLFormStepCounterCell.m */,
|
||||
E267FD461BE804E200F86B42 /* XLFormSwitchCell.h */,
|
||||
E267FD471BE804E200F86B42 /* XLFormSwitchCell.m */,
|
||||
E267FD481BE804E200F86B42 /* XLFormTextFieldCell.h */,
|
||||
E267FD491BE804E200F86B42 /* XLFormTextFieldCell.m */,
|
||||
E267FD4A1BE804E200F86B42 /* XLFormTextViewCell.h */,
|
||||
E267FD4B1BE804E200F86B42 /* XLFormTextViewCell.m */,
|
||||
);
|
||||
name = Cell;
|
||||
path = XL/Cell;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E267FD4C1BE804E200F86B42 /* Controllers */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E267FD4D1BE804E200F86B42 /* XLFormOptionsObject.h */,
|
||||
E267FD4E1BE804E200F86B42 /* XLFormOptionsObject.m */,
|
||||
E267FD4F1BE804E200F86B42 /* XLFormOptionsViewController.h */,
|
||||
E267FD501BE804E200F86B42 /* XLFormOptionsViewController.m */,
|
||||
E267FD511BE804E200F86B42 /* XLFormRowDescriptorViewController.h */,
|
||||
E267FD521BE804E200F86B42 /* XLFormViewController.h */,
|
||||
E267FD531BE804E200F86B42 /* XLFormViewController.m */,
|
||||
);
|
||||
name = Controllers;
|
||||
path = XL/Controllers;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E267FD541BE804E200F86B42 /* Descriptors */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E267FD551BE804E200F86B42 /* XLFormDescriptor.h */,
|
||||
E267FD561BE804E200F86B42 /* XLFormDescriptor.m */,
|
||||
E267FD571BE804E200F86B42 /* XLFormDescriptorDelegate.h */,
|
||||
E267FD581BE804E200F86B42 /* XLFormRowDescriptor.h */,
|
||||
E267FD591BE804E200F86B42 /* XLFormRowDescriptor.m */,
|
||||
E267FD5A1BE804E200F86B42 /* XLFormSectionDescriptor.h */,
|
||||
E267FD5B1BE804E200F86B42 /* XLFormSectionDescriptor.m */,
|
||||
);
|
||||
name = Descriptors;
|
||||
path = XL/Descriptors;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E267FD5C1BE804E200F86B42 /* Helpers */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E267FD5D1BE804E200F86B42 /* NSArray+XLFormAdditions.h */,
|
||||
E267FD5E1BE804E200F86B42 /* NSArray+XLFormAdditions.m */,
|
||||
E267FD5F1BE804E200F86B42 /* NSExpression+XLFormAdditions.h */,
|
||||
E267FD601BE804E200F86B42 /* NSExpression+XLFormAdditions.m */,
|
||||
E267FD611BE804E200F86B42 /* NSObject+XLFormAdditions.h */,
|
||||
E267FD621BE804E200F86B42 /* NSObject+XLFormAdditions.m */,
|
||||
E267FD631BE804E200F86B42 /* NSPredicate+XLFormAdditions.h */,
|
||||
E267FD641BE804E200F86B42 /* NSPredicate+XLFormAdditions.m */,
|
||||
E267FD651BE804E200F86B42 /* NSString+XLFormAdditions.h */,
|
||||
E267FD661BE804E200F86B42 /* NSString+XLFormAdditions.m */,
|
||||
E267FD671BE804E200F86B42 /* UIView+XLFormAdditions.h */,
|
||||
E267FD681BE804E200F86B42 /* UIView+XLFormAdditions.m */,
|
||||
E267FD691BE804E200F86B42 /* Views */,
|
||||
);
|
||||
name = Helpers;
|
||||
path = XL/Helpers;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E267FD691BE804E200F86B42 /* Views */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E267FD6A1BE804E200F86B42 /* XLFormRightDetailCell.h */,
|
||||
E267FD6B1BE804E200F86B42 /* XLFormRightDetailCell.m */,
|
||||
E267FD6C1BE804E200F86B42 /* XLFormRightImageButton.h */,
|
||||
E267FD6D1BE804E200F86B42 /* XLFormRightImageButton.m */,
|
||||
E267FD6E1BE804E200F86B42 /* XLFormRowNavigationAccessoryView.h */,
|
||||
E267FD6F1BE804E200F86B42 /* XLFormRowNavigationAccessoryView.m */,
|
||||
E267FD701BE804E200F86B42 /* XLFormTextView.h */,
|
||||
E267FD711BE804E200F86B42 /* XLFormTextView.m */,
|
||||
);
|
||||
path = Views;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E267FD721BE804E200F86B42 /* Validation */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E267FD731BE804E200F86B42 /* XLFormRegexValidator.h */,
|
||||
E267FD741BE804E200F86B42 /* XLFormRegexValidator.m */,
|
||||
E267FD751BE804E200F86B42 /* XLFormValidationStatus.h */,
|
||||
E267FD761BE804E200F86B42 /* XLFormValidationStatus.m */,
|
||||
E267FD771BE804E200F86B42 /* XLFormValidator.h */,
|
||||
E267FD781BE804E200F86B42 /* XLFormValidator.m */,
|
||||
E267FD791BE804E200F86B42 /* XLFormValidatorProtocol.h */,
|
||||
);
|
||||
name = Validation;
|
||||
path = XL/Validation;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXHeadersBuildPhase section */
|
||||
E267FD1D1BE8048900F86B42 /* Headers */ = {
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
E267FD881BE804E200F86B42 /* XLFormInlineSelectorCell.h in Headers */,
|
||||
E267FD871BE804E200F86B42 /* XLFormInlineRowDescriptorCell.h in Headers */,
|
||||
E267FDA11BE804E200F86B42 /* XLFormViewController.h in Headers */,
|
||||
E267FD9C1BE804E200F86B42 /* XLFormOptionsObject.h in Headers */,
|
||||
E267FD7E1BE804E200F86B42 /* XLFormButtonCell.h in Headers */,
|
||||
E267FD841BE804E200F86B42 /* XLFormDatePickerCell.h in Headers */,
|
||||
E267FD961BE804E200F86B42 /* XLFormSwitchCell.h in Headers */,
|
||||
E267FDA61BE804E200F86B42 /* XLFormRowDescriptor.h in Headers */,
|
||||
E267FD901BE804E200F86B42 /* XLFormSelectorCell.h in Headers */,
|
||||
E267FDA81BE804E200F86B42 /* XLFormSectionDescriptor.h in Headers */,
|
||||
E267FDAE1BE804E200F86B42 /* NSObject+XLFormAdditions.h in Headers */,
|
||||
E267FD9E1BE804E200F86B42 /* XLFormOptionsViewController.h in Headers */,
|
||||
E267FD821BE804E200F86B42 /* XLFormDateCell.h in Headers */,
|
||||
E267FD801BE804E200F86B42 /* XLFormCheckCell.h in Headers */,
|
||||
E267FD8E1BE804E200F86B42 /* XLFormSegmentedCell.h in Headers */,
|
||||
E267FD8A1BE804E200F86B42 /* XLFormLeftRightSelectorCell.h in Headers */,
|
||||
E267FD921BE804E200F86B42 /* XLFormSliderCell.h in Headers */,
|
||||
E267FD941BE804E200F86B42 /* XLFormStepCounterCell.h in Headers */,
|
||||
E267FDBA1BE804E200F86B42 /* XLFormRowNavigationAccessoryView.h in Headers */,
|
||||
E267FDAA1BE804E200F86B42 /* NSArray+XLFormAdditions.h in Headers */,
|
||||
E267FDB21BE804E200F86B42 /* NSString+XLFormAdditions.h in Headers */,
|
||||
E267FDB81BE804E200F86B42 /* XLFormRightImageButton.h in Headers */,
|
||||
E267FDA51BE804E200F86B42 /* XLFormDescriptorDelegate.h in Headers */,
|
||||
E267FDC41BE804E200F86B42 /* XLFormValidatorProtocol.h in Headers */,
|
||||
E267FDC21BE804E200F86B42 /* XLFormValidator.h in Headers */,
|
||||
E267FDAC1BE804E200F86B42 /* NSExpression+XLFormAdditions.h in Headers */,
|
||||
E267FDB61BE804E200F86B42 /* XLFormRightDetailCell.h in Headers */,
|
||||
E267FDB01BE804E200F86B42 /* NSPredicate+XLFormAdditions.h in Headers */,
|
||||
E267FDBC1BE804E200F86B42 /* XLFormTextView.h in Headers */,
|
||||
E267FDC01BE804E200F86B42 /* XLFormValidationStatus.h in Headers */,
|
||||
E267FDB41BE804E200F86B42 /* UIView+XLFormAdditions.h in Headers */,
|
||||
E267FD8C1BE804E200F86B42 /* XLFormPickerCell.h in Headers */,
|
||||
E267FDBE1BE804E200F86B42 /* XLFormRegexValidator.h in Headers */,
|
||||
E267FD9A1BE804E200F86B42 /* XLFormTextViewCell.h in Headers */,
|
||||
E267FDC51BE804E200F86B42 /* XLForm.h in Headers */,
|
||||
E267FDA31BE804E200F86B42 /* XLFormDescriptor.h in Headers */,
|
||||
E267FD981BE804E200F86B42 /* XLFormTextFieldCell.h in Headers */,
|
||||
E267FD7C1BE804E200F86B42 /* XLFormBaseCell.h in Headers */,
|
||||
E267FD861BE804E200F86B42 /* XLFormDescriptorCell.h in Headers */,
|
||||
E267FDA01BE804E200F86B42 /* XLFormRowDescriptorViewController.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXHeadersBuildPhase section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
E267FD1F1BE8048900F86B42 /* XLForm */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = E267FD281BE8048900F86B42 /* Build configuration list for PBXNativeTarget "XLForm" */;
|
||||
buildPhases = (
|
||||
E267FD1B1BE8048900F86B42 /* Sources */,
|
||||
E267FD1C1BE8048900F86B42 /* Frameworks */,
|
||||
E267FD1D1BE8048900F86B42 /* Headers */,
|
||||
E267FD1E1BE8048900F86B42 /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = XLForm;
|
||||
productName = XLForm;
|
||||
productReference = E267FD201BE8048900F86B42 /* XLForm.framework */;
|
||||
productType = "com.apple.product-type.framework";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
E267FD171BE8048900F86B42 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 0710;
|
||||
ORGANIZATIONNAME = XLForm;
|
||||
TargetAttributes = {
|
||||
E267FD1F1BE8048900F86B42 = {
|
||||
CreatedOnToolsVersion = 7.1;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = E267FD1A1BE8048900F86B42 /* Build configuration list for PBXProject "XLForm" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
);
|
||||
mainGroup = E267FD161BE8048900F86B42;
|
||||
productRefGroup = E267FD211BE8048900F86B42 /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
E267FD1F1BE8048900F86B42 /* XLForm */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
E267FD1E1BE8048900F86B42 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
E267FDC81BE806D000F86B42 /* XLForm.bundle in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
E267FD1B1BE8048900F86B42 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
E267FDB51BE804E200F86B42 /* UIView+XLFormAdditions.m in Sources */,
|
||||
E267FDC11BE804E200F86B42 /* XLFormValidationStatus.m in Sources */,
|
||||
E267FDBD1BE804E200F86B42 /* XLFormTextView.m in Sources */,
|
||||
E267FDB91BE804E200F86B42 /* XLFormRightImageButton.m in Sources */,
|
||||
E267FDAB1BE804E200F86B42 /* NSArray+XLFormAdditions.m in Sources */,
|
||||
E267FD811BE804E200F86B42 /* XLFormCheckCell.m in Sources */,
|
||||
E267FDB71BE804E200F86B42 /* XLFormRightDetailCell.m in Sources */,
|
||||
E267FD831BE804E200F86B42 /* XLFormDateCell.m in Sources */,
|
||||
E267FD9B1BE804E200F86B42 /* XLFormTextViewCell.m in Sources */,
|
||||
E267FD8F1BE804E200F86B42 /* XLFormSegmentedCell.m in Sources */,
|
||||
E267FDAD1BE804E200F86B42 /* NSExpression+XLFormAdditions.m in Sources */,
|
||||
E267FDBF1BE804E200F86B42 /* XLFormRegexValidator.m in Sources */,
|
||||
E267FDC31BE804E200F86B42 /* XLFormValidator.m in Sources */,
|
||||
E267FD931BE804E200F86B42 /* XLFormSliderCell.m in Sources */,
|
||||
E267FDB11BE804E200F86B42 /* NSPredicate+XLFormAdditions.m in Sources */,
|
||||
E267FDA41BE804E200F86B42 /* XLFormDescriptor.m in Sources */,
|
||||
E267FD8B1BE804E200F86B42 /* XLFormLeftRightSelectorCell.m in Sources */,
|
||||
E267FD9F1BE804E200F86B42 /* XLFormOptionsViewController.m in Sources */,
|
||||
E267FD8D1BE804E200F86B42 /* XLFormPickerCell.m in Sources */,
|
||||
E267FD951BE804E200F86B42 /* XLFormStepCounterCell.m in Sources */,
|
||||
E267FDBB1BE804E200F86B42 /* XLFormRowNavigationAccessoryView.m in Sources */,
|
||||
E267FD7D1BE804E200F86B42 /* XLFormBaseCell.m in Sources */,
|
||||
E267FDA21BE804E200F86B42 /* XLFormViewController.m in Sources */,
|
||||
E267FDB31BE804E200F86B42 /* NSString+XLFormAdditions.m in Sources */,
|
||||
E267FD851BE804E200F86B42 /* XLFormDatePickerCell.m in Sources */,
|
||||
E267FDAF1BE804E200F86B42 /* NSObject+XLFormAdditions.m in Sources */,
|
||||
E267FD991BE804E200F86B42 /* XLFormTextFieldCell.m in Sources */,
|
||||
E267FD9D1BE804E200F86B42 /* XLFormOptionsObject.m in Sources */,
|
||||
E267FD7F1BE804E200F86B42 /* XLFormButtonCell.m in Sources */,
|
||||
E267FD911BE804E200F86B42 /* XLFormSelectorCell.m in Sources */,
|
||||
E267FDA91BE804E200F86B42 /* XLFormSectionDescriptor.m in Sources */,
|
||||
E267FD971BE804E200F86B42 /* XLFormSwitchCell.m in Sources */,
|
||||
E267FDC61BE804E200F86B42 /* XLForm.m in Sources */,
|
||||
E267FD891BE804E200F86B42 /* XLFormInlineSelectorCell.m in Sources */,
|
||||
E267FDA71BE804E200F86B42 /* XLFormRowDescriptor.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
E267FD261BE8048900F86B42 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 3.0.2;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.1;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
E267FD271BE8048900F86B42 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 3.0.2;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.1;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
E267FD291BE8048900F86B42 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
DEFINES_MODULE = YES;
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
INFOPLIST_FILE = XLForm/Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.xmartlabs.XLForm;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SKIP_INSTALL = YES;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
E267FD2A1BE8048900F86B42 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
DEFINES_MODULE = YES;
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
INFOPLIST_FILE = XLForm/Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.xmartlabs.XLForm;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SKIP_INSTALL = YES;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
E267FD1A1BE8048900F86B42 /* Build configuration list for PBXProject "XLForm" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
E267FD261BE8048900F86B42 /* Debug */,
|
||||
E267FD271BE8048900F86B42 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
E267FD281BE8048900F86B42 /* Build configuration list for PBXNativeTarget "XLForm" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
E267FD291BE8048900F86B42 /* Debug */,
|
||||
E267FD2A1BE8048900F86B42 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = E267FD171BE8048900F86B42 /* Project object */;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:XLForm.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
@@ -0,0 +1,80 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0710"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "E267FD1F1BE8048900F86B42"
|
||||
BuildableName = "XLForm.framework"
|
||||
BlueprintName = "XLForm"
|
||||
ReferencedContainer = "container:XLForm.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "E267FD1F1BE8048900F86B42"
|
||||
BuildableName = "XLForm.framework"
|
||||
BlueprintName = "XLForm"
|
||||
ReferencedContainer = "container:XLForm.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "E267FD1F1BE8048900F86B42"
|
||||
BuildableName = "XLForm.framework"
|
||||
BlueprintName = "XLForm"
|
||||
ReferencedContainer = "container:XLForm.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -40,4 +40,11 @@
|
||||
@end
|
||||
|
||||
|
||||
@protocol XLFormReturnKeyProtocol
|
||||
|
||||
@property UIReturnKeyType returnKeyType;
|
||||
@property UIReturnKeyType nextReturnKeyType;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
||||
@@ -27,11 +27,6 @@
|
||||
|
||||
@implementation XLFormBaseCell
|
||||
|
||||
- (id)init
|
||||
{
|
||||
return [self initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:nil];
|
||||
}
|
||||
|
||||
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
|
||||
{
|
||||
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
|
||||
{
|
||||
return [super initWithStyle:UITableViewCellStyleDefault reuseIdentifier:reuseIdentifier];
|
||||
return [super initWithStyle:style reuseIdentifier:reuseIdentifier];
|
||||
}
|
||||
|
||||
|
||||
@@ -46,13 +46,13 @@
|
||||
[super update];
|
||||
BOOL isDisabled = self.rowDescriptor.isDisabled;
|
||||
self.textLabel.text = self.rowDescriptor.title;
|
||||
BOOL leftAligmnment = self.rowDescriptor.action.viewControllerClass || [self.rowDescriptor.action.viewControllerStoryboardId length] != 0 || [self.rowDescriptor.action.viewControllerNibName length] != 0 || [self.rowDescriptor.action.formSegueIdenfifier length] != 0 || self.rowDescriptor.action.formSegueClass;
|
||||
self.textLabel.textAlignment = leftAligmnment ? NSTextAlignmentLeft : NSTextAlignmentCenter;
|
||||
self.accessoryType = !leftAligmnment || isDisabled ? UITableViewCellAccessoryNone : UITableViewCellAccessoryDisclosureIndicator;
|
||||
BOOL notASimpleAction = self.rowDescriptor.action.viewControllerClass || [self.rowDescriptor.action.viewControllerStoryboardId length] != 0 || [self.rowDescriptor.action.viewControllerNibName length] != 0 || [self.rowDescriptor.action.formSegueIdentifier length] != 0 || self.rowDescriptor.action.formSegueClass;
|
||||
self.textLabel.textAlignment = notASimpleAction ? NSTextAlignmentNatural : NSTextAlignmentCenter;
|
||||
self.accessoryType = !notASimpleAction || isDisabled ? UITableViewCellAccessoryNone : UITableViewCellAccessoryDisclosureIndicator;
|
||||
self.editingAccessoryType = self.accessoryType;
|
||||
self.selectionStyle = isDisabled ? UITableViewCellSelectionStyleNone : UITableViewCellSelectionStyleDefault;
|
||||
|
||||
if (!leftAligmnment){
|
||||
if (!notASimpleAction){
|
||||
CGFloat red, green, blue, alpha;
|
||||
[self.tintColor getRed:&red green:&green blue:&blue alpha:&alpha];
|
||||
self.textLabel.textColor = [UIColor colorWithRed:red green:green blue:blue alpha:(isDisabled ? 0.3 : 1.0)];
|
||||
@@ -60,6 +60,7 @@
|
||||
else{
|
||||
self.textLabel.textColor = nil;
|
||||
}
|
||||
self.detailTextLabel.text = self.rowDescriptor.value;
|
||||
}
|
||||
|
||||
|
||||
@@ -71,8 +72,8 @@
|
||||
else if (self.rowDescriptor.action.formSelector){
|
||||
[controller performFormSelector:self.rowDescriptor.action.formSelector withObject:self.rowDescriptor];
|
||||
}
|
||||
else if ([self.rowDescriptor.action.formSegueIdenfifier length] != 0){
|
||||
[controller performSegueWithIdentifier:self.rowDescriptor.action.formSegueIdenfifier sender:self.rowDescriptor];
|
||||
else if ([self.rowDescriptor.action.formSegueIdentifier length] != 0){
|
||||
[controller performSegueWithIdentifier:self.rowDescriptor.action.formSegueIdentifier sender:self.rowDescriptor];
|
||||
}
|
||||
else if (self.rowDescriptor.action.formSegueClass){
|
||||
UIViewController * controllerToPresent = [self controllerToPresent];
|
||||
|
||||
@@ -227,7 +227,7 @@
|
||||
- (void)datePickerValueChanged:(UIDatePicker *)sender
|
||||
{
|
||||
self.rowDescriptor.value = sender.date;
|
||||
self.detailTextLabel.text = [self valueDisplayText];
|
||||
[self update];
|
||||
[self setNeedsLayout];
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
//
|
||||
// XLFormBaseCell.h
|
||||
// XLForm ( https://github.com/xmartlabs/XLForm )
|
||||
//
|
||||
// Copyright (c) 2015 Xmartlabs ( http://xmartlabs.com )
|
||||
//
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
#import "XLFormBaseCell.h"
|
||||
|
||||
@interface XLFormImageCell : XLFormBaseCell
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,145 @@
|
||||
//
|
||||
// XLFormBaseCell.m
|
||||
// XLForm ( https://github.com/xmartlabs/XLForm )
|
||||
//
|
||||
// Copyright (c) 2015 Xmartlabs ( http://xmartlabs.com )
|
||||
//
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
#import "XLFormImageCell.h"
|
||||
#import "XLFormRowDescriptor.h"
|
||||
#import "UIView+XLFormAdditions.h"
|
||||
|
||||
@interface XLFormImageCell() <UIImagePickerControllerDelegate, UINavigationControllerDelegate>
|
||||
{
|
||||
UIPopoverController *popoverController;
|
||||
UIImagePickerController *imagePickerController;
|
||||
UIAlertController *alertController;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation XLFormImageCell
|
||||
|
||||
#pragma mark - XLFormDescriptorCell
|
||||
+ (CGFloat)formDescriptorCellHeightForRowDescriptor:(XLFormRowDescriptor *)rowDescriptor
|
||||
{
|
||||
return 40;
|
||||
}
|
||||
|
||||
- (void)configure
|
||||
{
|
||||
[super configure];
|
||||
self.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
self.accessoryView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 30, 30)];
|
||||
self.editingAccessoryView = self.accessoryView;
|
||||
}
|
||||
|
||||
- (void)update
|
||||
{
|
||||
[super update];
|
||||
self.textLabel.text = self.rowDescriptor.title;
|
||||
self.imageView.image = self.rowDescriptor.value;
|
||||
}
|
||||
|
||||
- (void)chooseImage:(UIImage *)image
|
||||
{
|
||||
self.imageView.image = image;
|
||||
self.rowDescriptor.value = image;
|
||||
}
|
||||
|
||||
- (UIImageView *)imageView
|
||||
{
|
||||
return (UIImageView *)self.accessoryView;
|
||||
}
|
||||
|
||||
- (void)formDescriptorCellDidSelectedWithFormController:(XLFormViewController *)controller
|
||||
{
|
||||
alertController = [UIAlertController alertControllerWithTitle: self.rowDescriptor.title
|
||||
message: nil
|
||||
preferredStyle: UIAlertControllerStyleActionSheet];
|
||||
|
||||
[alertController addAction:[UIAlertAction actionWithTitle: NSLocalizedString(@"Choose From Library", nil)
|
||||
style: UIAlertActionStyleDefault
|
||||
handler: ^(UIAlertAction * _Nonnull action) {
|
||||
[self openImage:UIImagePickerControllerSourceTypePhotoLibrary];
|
||||
}]];
|
||||
|
||||
if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) {
|
||||
[alertController addAction:[UIAlertAction actionWithTitle: NSLocalizedString(@"Take Photo", nil)
|
||||
style: UIAlertActionStyleDefault
|
||||
handler: ^(UIAlertAction * _Nonnull action) {
|
||||
[self openImage:UIImagePickerControllerSourceTypeCamera];
|
||||
}]];
|
||||
}
|
||||
|
||||
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) {
|
||||
alertController.modalPresentationStyle = UIModalPresentationPopover;
|
||||
alertController.popoverPresentationController.sourceView = self.contentView;
|
||||
alertController.popoverPresentationController.sourceRect = self.contentView.bounds;
|
||||
}
|
||||
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[self.formViewController presentViewController:alertController animated: true completion: nil];
|
||||
});
|
||||
}
|
||||
|
||||
- (void)openImage:(UIImagePickerControllerSourceType)source
|
||||
{
|
||||
imagePickerController = [[UIImagePickerController alloc] init];
|
||||
imagePickerController.delegate = self;
|
||||
imagePickerController.allowsEditing = YES;
|
||||
imagePickerController.sourceType = source;
|
||||
|
||||
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) {
|
||||
popoverController = [[UIPopoverController alloc] initWithContentViewController:imagePickerController];
|
||||
[popoverController presentPopoverFromRect: self.contentView.frame
|
||||
inView: self.formViewController.view
|
||||
permittedArrowDirections: UIPopoverArrowDirectionAny
|
||||
animated: YES];
|
||||
} else {
|
||||
[self.formViewController presentViewController: imagePickerController
|
||||
animated: YES
|
||||
completion: nil];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - UIImagePickerControllerDelegate
|
||||
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary<NSString *,id> *)info
|
||||
{
|
||||
UIImage *editedImage = info[UIImagePickerControllerEditedImage];
|
||||
UIImage *originalImage = info[UIImagePickerControllerOriginalImage];
|
||||
|
||||
if (editedImage) {
|
||||
[self chooseImage:editedImage];
|
||||
} else {
|
||||
[self chooseImage:originalImage];
|
||||
}
|
||||
|
||||
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) {
|
||||
if (popoverController && popoverController.isPopoverVisible) {
|
||||
[popoverController dismissPopoverAnimated: YES];
|
||||
}
|
||||
} else {
|
||||
[self.formViewController dismissViewControllerAnimated: YES completion: nil];
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -61,12 +61,17 @@
|
||||
|
||||
-(BOOL)resignFirstResponder
|
||||
{
|
||||
if (![self isFirstResponder]) {
|
||||
return [super resignFirstResponder];
|
||||
}
|
||||
NSIndexPath * selectedRowPath = [self.formViewController.form indexPathOfFormRow:self.rowDescriptor];
|
||||
NSIndexPath * nextRowPath = [NSIndexPath indexPathForRow:selectedRowPath.row + 1 inSection:selectedRowPath.section];
|
||||
XLFormRowDescriptor * nextFormRow = [self.formViewController.form formRowAtIndex:nextRowPath];
|
||||
XLFormSectionDescriptor * formSection = [self.formViewController.form.formSections objectAtIndex:nextRowPath.section];
|
||||
BOOL result = [super resignFirstResponder];
|
||||
[formSection removeFormRow:nextFormRow];
|
||||
if (result) {
|
||||
[formSection removeFormRow:nextFormRow];
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
NSDictionary * views = @{@"leftButton" : self.leftButton, @"rightLabel": self.rightLabel, @"separatorView": separatorView, @"constraintTextField": _constraintTextField };
|
||||
[self.contentView addConstraint:[NSLayoutConstraint constraintWithItem:self.leftButton attribute:NSLayoutAttributeCenterY relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeCenterY multiplier:1.0f constant:0.0f]];
|
||||
[self.contentView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[constraintTextField]" options:0 metrics:nil views:views]];
|
||||
[self.contentView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-16-[leftButton]-[separatorView(1)]-[rightLabel]-14-|" options:NSLayoutFormatAlignAllCenterY metrics:nil views:views]];
|
||||
[self.contentView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-[leftButton]-[separatorView(1)]-[rightLabel]-|" options:NSLayoutFormatAlignAllCenterY metrics:nil views:views]];
|
||||
[self.contentView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:[separatorView(20)]" options:0 metrics:nil views:views]];
|
||||
[self.contentView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|-12-[constraintTextField]-12-|" options:0 metrics:0 views:views]];
|
||||
}
|
||||
@@ -199,7 +199,7 @@
|
||||
UIAlertController * alertController = [UIAlertController alertControllerWithTitle:self.rowDescriptor.selectorTitle
|
||||
message:nil
|
||||
preferredStyle:UIAlertControllerStyleActionSheet];
|
||||
[alertController addAction:[UIAlertAction actionWithTitle:@"Cancel"
|
||||
[alertController addAction:[UIAlertAction actionWithTitle:NSLocalizedString(@"Cancel", nil)
|
||||
style:UIAlertActionStyleCancel
|
||||
handler:nil]];
|
||||
__weak __typeof(self)weakSelf = self;
|
||||
|
||||
@@ -140,7 +140,7 @@
|
||||
self.dynamicCustomConstraints = [NSMutableArray array];
|
||||
NSDictionary * views = @{@"segmentedControl": self.segmentedControl, @"textLabel": self.textLabel};
|
||||
if (self.textLabel.text.length > 0){
|
||||
[self.dynamicCustomConstraints addObjectsFromArray:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-16-[textLabel]-16-[segmentedControl]-16-|"
|
||||
[self.dynamicCustomConstraints addObjectsFromArray:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-[textLabel]-16-[segmentedControl]-|"
|
||||
options:NSLayoutFormatAlignAllCenterY
|
||||
metrics:0
|
||||
views:views]];
|
||||
@@ -151,7 +151,7 @@
|
||||
|
||||
}
|
||||
else{
|
||||
[self.dynamicCustomConstraints addObjectsFromArray:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-16-[segmentedControl]-16-|"
|
||||
[self.dynamicCustomConstraints addObjectsFromArray:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-[segmentedControl]-|"
|
||||
options:NSLayoutFormatAlignAllCenterY
|
||||
metrics:0
|
||||
views:views]];
|
||||
|
||||
@@ -141,7 +141,6 @@
|
||||
[super update];
|
||||
self.accessoryType = self.rowDescriptor.isDisabled || !([self.rowDescriptor.rowType isEqualToString:XLFormRowDescriptorTypeSelectorPush] || [self.rowDescriptor.rowType isEqualToString:XLFormRowDescriptorTypeMultipleSelector]) ? UITableViewCellAccessoryNone : UITableViewCellAccessoryDisclosureIndicator;;
|
||||
self.editingAccessoryType = self.accessoryType;
|
||||
[self.textLabel setText:self.rowDescriptor.title];
|
||||
self.selectionStyle = self.rowDescriptor.isDisabled || [self.rowDescriptor.rowType isEqualToString:XLFormRowDescriptorTypeInfo] ? UITableViewCellSelectionStyleNone : UITableViewCellSelectionStyleDefault;
|
||||
self.textLabel.text = [NSString stringWithFormat:@"%@%@", self.rowDescriptor.title, self.rowDescriptor.required && self.rowDescriptor.sectionDescriptor.formDescriptor.addAsteriskToRequiredRowsTitle ? @"*" : @""];
|
||||
self.detailTextLabel.text = [self valueDisplayText];
|
||||
@@ -151,8 +150,8 @@
|
||||
{
|
||||
if ([self.rowDescriptor.rowType isEqualToString:XLFormRowDescriptorTypeSelectorPush] || [self.rowDescriptor.rowType isEqualToString:XLFormRowDescriptorTypeSelectorPopover]){
|
||||
UIViewController * controllerToPresent = nil;
|
||||
if (self.rowDescriptor.action.formSegueIdenfifier){
|
||||
[controller performSegueWithIdentifier:self.rowDescriptor.action.formSegueIdenfifier sender:self.rowDescriptor];
|
||||
if (self.rowDescriptor.action.formSegueIdentifier){
|
||||
[controller performSegueWithIdentifier:self.rowDescriptor.action.formSegueIdentifier sender:self.rowDescriptor];
|
||||
}
|
||||
else if (self.rowDescriptor.action.formSegueClass){
|
||||
UIViewController * controllerToPresent = [self controllerToPresent];
|
||||
@@ -252,7 +251,7 @@
|
||||
UIAlertController * alertController = [UIAlertController alertControllerWithTitle:self.rowDescriptor.selectorTitle
|
||||
message:nil
|
||||
preferredStyle:UIAlertControllerStyleActionSheet];
|
||||
[alertController addAction:[UIAlertAction actionWithTitle:@"Cancel"
|
||||
[alertController addAction:[UIAlertAction actionWithTitle:NSLocalizedString(@"Cancel", nil)
|
||||
style:UIAlertActionStyleCancel
|
||||
handler:nil]];
|
||||
__weak __typeof(self)weakSelf = self;
|
||||
|
||||
@@ -47,8 +47,8 @@
|
||||
self.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
[self.contentView addConstraint:[NSLayoutConstraint constraintWithItem:self.textLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeTop multiplier:1 constant:10]];
|
||||
[self.contentView addConstraint:[NSLayoutConstraint constraintWithItem:self.slider attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeTop multiplier:1 constant:44]];
|
||||
[self.contentView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-15-[textLabel]-15-|" options:0 metrics:0 views:@{@"textLabel": self.textLabel}]];
|
||||
[self.contentView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-15-[slider]-15-|" options:0 metrics:0 views:@{@"slider": self.slider}]];
|
||||
[self.contentView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-[textLabel]-|" options:0 metrics:0 views:@{@"textLabel": self.textLabel}]];
|
||||
[self.contentView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-[slider]-|" options:0 metrics:0 views:@{@"slider": self.slider}]];
|
||||
|
||||
[self valueChanged:nil];
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
[self.contentView addConstraint:[NSLayoutConstraint constraintWithItem:self.stepControl attribute:NSLayoutAttributeCenterY relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeCenterY multiplier:1 constant:0]];
|
||||
[self.contentView addConstraint:[NSLayoutConstraint constraintWithItem:self.currentStepValue attribute:NSLayoutAttributeCenterY relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeCenterY multiplier:1 constant:0]];
|
||||
[self.contentView addConstraint:[NSLayoutConstraint constraintWithItem:self.currentStepValue attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:self.stepControl attribute:NSLayoutAttributeHeight multiplier:1 constant:0]];
|
||||
[self.contentView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:[value]-5-[control]-15-|" options:0 metrics:0 views:@{@"value": self.currentStepValue, @"control":self.stepControl}]];
|
||||
[self.contentView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:[value]-5-[control]-|" options:0 metrics:0 views:@{@"value": self.currentStepValue, @"control":self.stepControl}]];
|
||||
}
|
||||
|
||||
- (void)update
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
extern NSString *const XLFormTextFieldLengthPercentage;
|
||||
|
||||
@interface XLFormTextFieldCell : XLFormBaseCell
|
||||
@interface XLFormTextFieldCell : XLFormBaseCell <XLFormReturnKeyProtocol>
|
||||
|
||||
@property (nonatomic, readonly) UILabel * textLabel;
|
||||
@property (nonatomic, readonly) UITextField * textField;
|
||||
|
||||
@@ -34,7 +34,6 @@ NSString *const XLFormTextFieldLengthPercentage = @"textFieldLengthPercentage";
|
||||
@interface XLFormTextFieldCell() <UITextFieldDelegate>
|
||||
|
||||
@property NSMutableArray * dynamicCustomConstraints;
|
||||
@property UIReturnKeyType returnKeyType;
|
||||
|
||||
@end
|
||||
|
||||
@@ -42,6 +41,8 @@ NSString *const XLFormTextFieldLengthPercentage = @"textFieldLengthPercentage";
|
||||
|
||||
@synthesize textField = _textField;
|
||||
@synthesize textLabel = _textLabel;
|
||||
@synthesize returnKeyType = _returnKeyType;
|
||||
@synthesize nextReturnKeyType = _nextReturnKeyType;
|
||||
|
||||
|
||||
#pragma mark - KVO
|
||||
@@ -55,6 +56,16 @@ NSString *const XLFormTextFieldLengthPercentage = @"textFieldLengthPercentage";
|
||||
}
|
||||
}
|
||||
|
||||
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
|
||||
{
|
||||
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
|
||||
if (self) {
|
||||
_returnKeyType = UIReturnKeyDefault;
|
||||
_nextReturnKeyType = UIReturnKeyNext;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
-(void)dealloc
|
||||
{
|
||||
[self.textLabel removeObserver:self forKeyPath:@"text"];
|
||||
@@ -130,9 +141,14 @@ NSString *const XLFormTextFieldLengthPercentage = @"textFieldLengthPercentage";
|
||||
self.textField.autocorrectionType = UITextAutocorrectionTypeNo;
|
||||
self.textField.autocapitalizationType = UITextAutocapitalizationTypeNone;
|
||||
}
|
||||
|
||||
else if ([self.rowDescriptor.rowType isEqualToString:XLFormRowDescriptorTypeZipCode]){
|
||||
self.textField.autocorrectionType = UITextAutocorrectionTypeNo;
|
||||
self.textField.autocapitalizationType = UITextAutocapitalizationTypeAllCharacters;
|
||||
self.textField.keyboardType = UIKeyboardTypeDefault;
|
||||
}
|
||||
|
||||
self.textLabel.text = ((self.rowDescriptor.required && self.rowDescriptor.title && self.rowDescriptor.sectionDescriptor.formDescriptor.addAsteriskToRequiredRowsTitle) ? [NSString stringWithFormat:@"%@*", self.rowDescriptor.title] : self.rowDescriptor.title);
|
||||
|
||||
|
||||
self.textField.text = self.rowDescriptor.value ? [self.rowDescriptor.value displayText] : self.rowDescriptor.noValueDisplayText;
|
||||
[self.textField setEnabled:!self.rowDescriptor.isDisabled];
|
||||
self.textField.textColor = self.rowDescriptor.isDisabled ? [UIColor grayColor] : [UIColor blackColor];
|
||||
@@ -182,13 +198,13 @@ NSString *const XLFormTextFieldLengthPercentage = @"textFieldLengthPercentage";
|
||||
-(NSArray *)layoutConstraints
|
||||
{
|
||||
NSMutableArray * result = [[NSMutableArray alloc] init];
|
||||
[self.textLabel setContentHuggingPriority:500 forAxis:UILayoutConstraintAxisHorizontal];
|
||||
[self.textLabel setContentHuggingPriority:500 forAxis:UILayoutConstraintAxisHorizontal];
|
||||
[self.textLabel setContentCompressionResistancePriority:1000 forAxis:UILayoutConstraintAxisHorizontal];
|
||||
|
||||
|
||||
// Add Constraints
|
||||
[result addObjectsFromArray:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|-(>=11)-[_textField]-(>=11)-|" options:NSLayoutFormatAlignAllBaseline metrics:nil views:NSDictionaryOfVariableBindings(_textField)]];
|
||||
[result addObjectsFromArray:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|-(>=11)-[_textLabel]-(>=11)-|" options:NSLayoutFormatAlignAllBaseline metrics:nil views:NSDictionaryOfVariableBindings(_textLabel)]];
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -198,25 +214,23 @@ NSString *const XLFormTextFieldLengthPercentage = @"textFieldLengthPercentage";
|
||||
[self.contentView removeConstraints:self.dynamicCustomConstraints];
|
||||
}
|
||||
NSDictionary * views = @{@"label": self.textLabel, @"textField": self.textField, @"image": self.imageView};
|
||||
NSDictionary *metrics = @{@"leftMargin" : @16.0, @"rightMargin" : self.textField.textAlignment == NSTextAlignmentRight ? @16.0 : @4.0};
|
||||
|
||||
if (self.imageView.image){
|
||||
if (self.textLabel.text.length > 0){
|
||||
self.dynamicCustomConstraints = [NSMutableArray arrayWithArray:[NSLayoutConstraint constraintsWithVisualFormat:@"H:[image]-[label]-[textField]-(rightMargin)-|" options:0 metrics:metrics views:views]];
|
||||
self.dynamicCustomConstraints = [NSMutableArray arrayWithArray:[NSLayoutConstraint constraintsWithVisualFormat:@"H:[image]-[label]-[textField]-|" options:0 metrics:nil views:views]];
|
||||
}
|
||||
else{
|
||||
self.dynamicCustomConstraints = [NSMutableArray arrayWithArray:[NSLayoutConstraint constraintsWithVisualFormat:@"H:[image]-[textField]-(rightMargin)-|" options:0 metrics:metrics views:views]];
|
||||
self.dynamicCustomConstraints = [NSMutableArray arrayWithArray:[NSLayoutConstraint constraintsWithVisualFormat:@"H:[image]-[textField]-|" options:0 metrics:nil views:views]];
|
||||
}
|
||||
}
|
||||
else{
|
||||
if (self.textLabel.text.length > 0){
|
||||
self.dynamicCustomConstraints = [NSMutableArray arrayWithArray:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-(leftMargin)-[label]-[textField]-(rightMargin)-|" options:0 metrics:metrics views:views]];
|
||||
self.dynamicCustomConstraints = [NSMutableArray arrayWithArray:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-[label]-[textField]-|" options:0 metrics:nil views:views]];
|
||||
}
|
||||
else{
|
||||
self.dynamicCustomConstraints = [NSMutableArray arrayWithArray:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-(leftMargin)-[textField]-(rightMargin)-|" options:0 metrics:metrics views:views]];
|
||||
self.dynamicCustomConstraints = [NSMutableArray arrayWithArray:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-[textField]-|" options:0 metrics:nil views:views]];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[self.dynamicCustomConstraints addObject:[NSLayoutConstraint constraintWithItem:_textField
|
||||
attribute:NSLayoutAttributeWidth
|
||||
relatedBy:self.textFieldLengthPercentage ? NSLayoutRelationEqual : NSLayoutRelationGreaterThanOrEqual
|
||||
@@ -224,7 +238,7 @@ NSString *const XLFormTextFieldLengthPercentage = @"textFieldLengthPercentage";
|
||||
attribute:NSLayoutAttributeWidth
|
||||
multiplier:self.textFieldLengthPercentage ? [self.textFieldLengthPercentage floatValue] : 0.3
|
||||
constant:0.0]];
|
||||
|
||||
|
||||
[self.contentView addConstraints:self.dynamicCustomConstraints];
|
||||
[super updateConstraints];
|
||||
}
|
||||
@@ -288,12 +302,13 @@ NSString *const XLFormTextFieldLengthPercentage = @"textFieldLengthPercentage";
|
||||
|
||||
-(void)setReturnKeyType:(UIReturnKeyType)returnKeyType
|
||||
{
|
||||
_returnKeyType = returnKeyType;
|
||||
self.textField.returnKeyType = returnKeyType;
|
||||
}
|
||||
|
||||
-(UIReturnKeyType)returnKeyType
|
||||
{
|
||||
return self.textField.returnKeyType;
|
||||
return _returnKeyType;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -155,10 +155,10 @@ NSString *const kFormTextViewCellPlaceholder = @"placeholder";
|
||||
}
|
||||
NSDictionary * views = @{@"label": self.textLabel, @"textView": self.textView};
|
||||
if (!self.textLabel.text || [self.textLabel.text isEqualToString:@""]){
|
||||
[_dynamicCustomConstraints addObjectsFromArray:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-16-[textView]-16-|" options:0 metrics:0 views:views]];
|
||||
[_dynamicCustomConstraints addObjectsFromArray:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-[textView]-|" options:0 metrics:0 views:views]];
|
||||
}
|
||||
else{
|
||||
[_dynamicCustomConstraints addObjectsFromArray:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-16-[label]-[textView]-4-|" options:0 metrics:0 views:views]];
|
||||
[_dynamicCustomConstraints addObjectsFromArray:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-[label]-[textView]-|" options:0 metrics:0 views:views]];
|
||||
}
|
||||
[self.contentView addConstraints:_dynamicCustomConstraints];
|
||||
[super updateConstraints];
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#import "XLFormRowDescriptor.h"
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface XLFormOptionsObject : NSObject <XLFormOptionObject>
|
||||
@interface XLFormOptionsObject : NSObject <XLFormOptionObject,NSCoding>
|
||||
|
||||
+(XLFormOptionsObject *)formOptionsObjectWithValue:(id)value displayText:(NSString *)displayText;
|
||||
+(XLFormOptionsObject *)formOptionsOptionForValue:(id)value fromOptions:(NSArray *)options;
|
||||
|
||||
@@ -85,5 +85,27 @@
|
||||
{
|
||||
return _formValue;
|
||||
}
|
||||
|
||||
#pragma mark - NSCoding
|
||||
-(void)encodeWithCoder:(NSCoder *)encoder
|
||||
{
|
||||
|
||||
[encoder encodeObject:self.formValue
|
||||
forKey:@"formValue"];
|
||||
[encoder encodeObject:self.formDisplayText
|
||||
forKey:@"formDisplayText"];
|
||||
}
|
||||
-(id)initWithCoder:(NSCoder *)decoder
|
||||
{
|
||||
if ((self=[super init])) {
|
||||
|
||||
[self setValue:[decoder decodeObjectForKey:@"formValue"]
|
||||
forKey:@"formValue"];
|
||||
[self setValue:[decoder decodeObjectForKey:@"formDisplayText"]
|
||||
forKey:@"formDisplaytext"];
|
||||
|
||||
}
|
||||
|
||||
return self;
|
||||
|
||||
}
|
||||
@end
|
||||
|
||||
@@ -120,6 +120,9 @@
|
||||
self.tableView = [[UITableView alloc] initWithFrame:self.view.bounds
|
||||
style:self.tableViewStyle];
|
||||
self.tableView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
|
||||
if([self.tableView respondsToSelector:@selector(cellLayoutMarginsFollowReadableWidth)]){
|
||||
self.tableView.cellLayoutMarginsFollowReadableWidth = NO;
|
||||
}
|
||||
}
|
||||
if (!self.tableView.superview){
|
||||
[self.view addSubview:self.tableView];
|
||||
@@ -162,7 +165,7 @@
|
||||
selector:@selector(keyboardWillShow:)
|
||||
name:UIKeyboardWillShowNotification
|
||||
object:nil];
|
||||
|
||||
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||
selector:@selector(keyboardWillHide:)
|
||||
name:UIKeyboardWillHideNotification
|
||||
@@ -203,7 +206,7 @@
|
||||
+(NSMutableDictionary *)cellClassesForRowDescriptorTypes
|
||||
{
|
||||
static NSMutableDictionary * _cellClassesForRowDescriptorTypes;
|
||||
|
||||
|
||||
static dispatch_once_t onceToken;
|
||||
dispatch_once(&onceToken, ^{
|
||||
_cellClassesForRowDescriptorTypes = [@{XLFormRowDescriptorTypeText:[XLFormTextFieldCell class],
|
||||
@@ -217,6 +220,7 @@
|
||||
XLFormRowDescriptorTypeNumber: [XLFormTextFieldCell class],
|
||||
XLFormRowDescriptorTypeInteger: [XLFormTextFieldCell class],
|
||||
XLFormRowDescriptorTypeDecimal: [XLFormTextFieldCell class],
|
||||
XLFormRowDescriptorTypeZipCode: [XLFormTextFieldCell class],
|
||||
XLFormRowDescriptorTypeSelectorPush: [XLFormSelectorCell class],
|
||||
XLFormRowDescriptorTypeSelectorPopover: [XLFormSelectorCell class],
|
||||
XLFormRowDescriptorTypeSelectorActionSheet: [XLFormSelectorCell class],
|
||||
@@ -226,6 +230,7 @@
|
||||
XLFormRowDescriptorTypeSelectorSegmentedControl: [XLFormSegmentedCell class],
|
||||
XLFormRowDescriptorTypeMultipleSelector: [XLFormSelectorCell class],
|
||||
XLFormRowDescriptorTypeMultipleSelectorPopover: [XLFormSelectorCell class],
|
||||
XLFormRowDescriptorTypeImage: [XLFormImageCell class],
|
||||
XLFormRowDescriptorTypeTextView: [XLFormTextViewCell class],
|
||||
XLFormRowDescriptorTypeButton: [XLFormButtonCell class],
|
||||
XLFormRowDescriptorTypeInfo: [XLFormSelectorCell class],
|
||||
@@ -254,7 +259,7 @@
|
||||
+(NSMutableDictionary *)inlineRowDescriptorTypesForRowDescriptorTypes
|
||||
{
|
||||
static NSMutableDictionary * _inlineRowDescriptorTypesForRowDescriptorTypes;
|
||||
|
||||
|
||||
static dispatch_once_t onceToken;
|
||||
dispatch_once(&onceToken, ^{
|
||||
_inlineRowDescriptorTypesForRowDescriptorTypes = [
|
||||
@@ -652,7 +657,7 @@
|
||||
self.tableView.editing = !self.tableView.editing;
|
||||
self.tableView.editing = !self.tableView.editing;
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
-(void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
@@ -787,7 +792,7 @@
|
||||
return [NSIndexPath indexPathForRow:proposedDestinationIndexPath.row - 1 inSection:sourceIndexPath.section];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ((sectionDescriptor.sectionInsertMode == XLFormSectionInsertModeButton && sectionDescriptor.sectionOptions & XLFormSectionOptionCanInsert)){
|
||||
if (proposedDestinationIndexPath.row == sectionDescriptor.formRows.count - 1){
|
||||
return [NSIndexPath indexPathForRow:(sectionDescriptor.formRows.count - 2) inSection:sourceIndexPath.section];
|
||||
@@ -844,9 +849,17 @@
|
||||
|
||||
- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField
|
||||
{
|
||||
UITableViewCell<XLFormDescriptorCell>* cell = textField.formDescriptorCell;
|
||||
XLFormRowDescriptor * nextRow = [self nextRowDescriptorForRow:textField.formDescriptorCell.rowDescriptor
|
||||
withDirection:XLFormRowNavigationDirectionNext];
|
||||
textField.returnKeyType = nextRow ? UIReturnKeyNext : UIReturnKeyDefault;
|
||||
|
||||
|
||||
if ([cell conformsToProtocol:@protocol(XLFormReturnKeyProtocol)]) {
|
||||
textField.returnKeyType = nextRow ? ((id<XLFormReturnKeyProtocol>)cell).nextReturnKeyType : ((id<XLFormReturnKeyProtocol>)cell).returnKeyType;
|
||||
}
|
||||
else {
|
||||
textField.returnKeyType = nextRow ? UIReturnKeyNext : UIReturnKeyDefault;
|
||||
}
|
||||
return YES;
|
||||
}
|
||||
|
||||
|
||||
@@ -501,7 +501,7 @@ NSString * const XLValidationStatusErrorKey = @"XLValidationStatusErrorKey";
|
||||
{
|
||||
NSUInteger indexOfRow = [row.sectionDescriptor.formRows indexOfObject:row];
|
||||
if (indexOfRow != NSNotFound){
|
||||
if ([row.sectionDescriptor.formRows indexOfObject:row] + 1 < row.sectionDescriptor.formRows.count){
|
||||
if (indexOfRow + 1 < row.sectionDescriptor.formRows.count){
|
||||
return [row.sectionDescriptor.formRows objectAtIndex:++indexOfRow];
|
||||
}
|
||||
else{
|
||||
@@ -525,7 +525,7 @@ NSString * const XLValidationStatusErrorKey = @"XLValidationStatusErrorKey";
|
||||
{
|
||||
NSUInteger indexOfRow = [row.sectionDescriptor.formRows indexOfObject:row];
|
||||
if (indexOfRow != NSNotFound){
|
||||
if ([row.sectionDescriptor.formRows indexOfObject:row] > 0 ){
|
||||
if (indexOfRow > 0 ){
|
||||
return [row.sectionDescriptor.formRows objectAtIndex:--indexOfRow];
|
||||
}
|
||||
else{
|
||||
|
||||
@@ -71,6 +71,7 @@ typedef void(^XLOnChangeBlock)(id __nullable oldValue,id __nullable newValue,XLF
|
||||
|
||||
+(nonnull instancetype)formRowDescriptorWithTag:(nullable NSString *)tag rowType:(nonnull NSString *)rowType;
|
||||
+(nonnull instancetype)formRowDescriptorWithTag:(nullable NSString *)tag rowType:(nonnull NSString *)rowType title:(nullable NSString *)title;
|
||||
-(nonnull instancetype)initWithTag:(nullable NSString *)tag rowType:(nonnull NSString *)rowType title:(nullable NSString *)title;
|
||||
|
||||
-(nonnull XLFormBaseCell *)cellForFormController:(nonnull XLFormViewController *)formController;
|
||||
|
||||
@@ -141,7 +142,8 @@ typedef void(^XLOnChangeBlock)(id __nullable oldValue,id __nullable newValue,XLF
|
||||
|
||||
@property (nullable, nonatomic, strong) void (^formBlock)(XLFormRowDescriptor * __nonnull sender);
|
||||
@property (nullable, nonatomic) SEL formSelector;
|
||||
@property (nullable, nonatomic, strong) NSString * formSegueIdenfifier;
|
||||
@property (nullable, nonatomic, strong) NSString * formSegueIdenfifier DEPRECATED_ATTRIBUTE DEPRECATED_MSG_ATTRIBUTE("Use formSegueIdentifier instead");
|
||||
@property (nullable, nonatomic, strong) NSString * formSegueIdentifier;
|
||||
@property (nullable, nonatomic, strong) Class formSegueClass;
|
||||
|
||||
@end
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
_hidden = @NO;
|
||||
_rowType = rowType;
|
||||
_title = title;
|
||||
_cellStyle = UITableViewCellStyleValue1;
|
||||
_cellStyle = [rowType isEqualToString:XLFormRowDescriptorTypeButton] ? UITableViewCellStyleDefault : UITableViewCellStyleValue1;
|
||||
_validators = [NSMutableArray new];
|
||||
_cellConfig = [NSMutableDictionary dictionary];
|
||||
_cellConfigIfDisabled = [NSMutableDictionary dictionary];
|
||||
@@ -109,15 +109,30 @@
|
||||
return [[[self class] alloc] initWithTag:tag rowType:rowType title:title];
|
||||
}
|
||||
|
||||
-(XLFormBaseCell *)cellForFormController:(XLFormViewController *)formController
|
||||
-(XLFormBaseCell *)cellForFormController:(XLFormViewController * __unused)formController
|
||||
{
|
||||
if (!_cell){
|
||||
id cellClass = self.cellClass ?: [XLFormViewController cellClassesForRowDescriptorTypes][self.rowType];
|
||||
NSAssert(cellClass, @"Not defined XLFormRowDescriptorType: %@", self.rowType ?: @"");
|
||||
if ([cellClass isKindOfClass:[NSString class]]) {
|
||||
NSBundle *bundle = [NSBundle bundleForClass:NSClassFromString(cellClass)];
|
||||
if ([bundle pathForResource:cellClass ofType:@"nib"]){
|
||||
_cell = [[bundle loadNibNamed:cellClass owner:nil options:nil] firstObject];
|
||||
NSString *cellClassString = cellClass;
|
||||
NSString *cellResource = nil;
|
||||
NSBundle *bundle = nil;
|
||||
if ([cellClassString containsString:@"/"]) {
|
||||
NSArray *components = [cellClassString componentsSeparatedByString:@"/"];
|
||||
cellResource = [components lastObject];
|
||||
NSString *folderName = [components firstObject];
|
||||
NSString *bundlePath = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:folderName];
|
||||
bundle = [NSBundle bundleWithPath:bundlePath];
|
||||
} else {
|
||||
bundle = [NSBundle bundleForClass:NSClassFromString(cellClass)];
|
||||
cellResource = cellClassString;
|
||||
}
|
||||
NSParameterAssert(bundle != nil);
|
||||
NSParameterAssert(cellResource != nil);
|
||||
|
||||
if ([bundle pathForResource:cellResource ofType:@"nib"]){
|
||||
_cell = [[bundle loadNibNamed:cellResource owner:nil options:nil] firstObject];
|
||||
}
|
||||
} else {
|
||||
_cell = [[cellClass alloc] initWithStyle:self.cellStyle reuseIdentifier:nil];
|
||||
@@ -542,8 +557,8 @@
|
||||
else if (self.formSelector){
|
||||
actionCopy.formSelector = self.formSelector;
|
||||
}
|
||||
else if (self.formSegueIdenfifier){
|
||||
actionCopy.formSegueIdenfifier = [self.formSegueIdenfifier copy];
|
||||
else if (self.formSegueIdentifier){
|
||||
actionCopy.formSegueIdentifier = [self.formSegueIdentifier copy];
|
||||
}
|
||||
else if (self.formSegueClass){
|
||||
actionCopy.formSegueClass = [self.formSegueClass copy];
|
||||
@@ -577,7 +592,7 @@
|
||||
{
|
||||
_formBlock = nil;
|
||||
_formSegueClass = nil;
|
||||
_formSegueIdenfifier = nil;
|
||||
_formSegueIdentifier = nil;
|
||||
_formSelector = formSelector;
|
||||
}
|
||||
|
||||
@@ -585,7 +600,7 @@
|
||||
-(void)setFormBlock:(void (^)(XLFormRowDescriptor *))formBlock
|
||||
{
|
||||
_formSegueClass = nil;
|
||||
_formSegueIdenfifier = nil;
|
||||
_formSegueIdentifier = nil;
|
||||
_formSelector = nil;
|
||||
_formBlock = formBlock;
|
||||
}
|
||||
@@ -594,16 +609,27 @@
|
||||
{
|
||||
_formSelector = nil;
|
||||
_formBlock = nil;
|
||||
_formSegueIdenfifier = nil;
|
||||
_formSegueIdentifier = nil;
|
||||
_formSegueClass = formSegueClass;
|
||||
}
|
||||
|
||||
-(void)setFormSegueIdenfifier:(NSString *)formSegueIdenfifier
|
||||
-(void)setFormSegueIdentifier:(NSString *)formSegueIdentifier
|
||||
{
|
||||
_formSelector = nil;
|
||||
_formBlock = nil;
|
||||
_formSegueClass = nil;
|
||||
_formSegueIdenfifier = formSegueIdenfifier;
|
||||
_formSegueIdentifier = formSegueIdentifier;
|
||||
}
|
||||
|
||||
// Deprecated:
|
||||
-(void)setFormSegueIdenfifier:(NSString *)formSegueIdenfifier
|
||||
{
|
||||
self.formSegueIdentifier = formSegueIdenfifier;
|
||||
}
|
||||
|
||||
-(NSString *)formSegueIdenfifier
|
||||
{
|
||||
return self.formSegueIdentifier;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
_title = title;
|
||||
if ([self canInsertUsingButton]){
|
||||
_multivaluedAddButton = [XLFormRowDescriptor formRowDescriptorWithTag:nil rowType:XLFormRowDescriptorTypeButton title:@"Add Item"];
|
||||
[_multivaluedAddButton.cellConfig setObject:@(NSTextAlignmentLeft) forKey:@"textLabel.textAlignment"];
|
||||
[_multivaluedAddButton.cellConfig setObject:@(NSTextAlignmentNatural) forKey:@"textLabel.textAlignment"];
|
||||
_multivaluedAddButton.action.formSelector = NSSelectorFromString(@"multivaluedInsertButtonTapped:");
|
||||
[self insertObject:_multivaluedAddButton inFormRowsAtIndex:0];
|
||||
[self insertObject:_multivaluedAddButton inAllRowsAtIndex:0];
|
||||
|
||||
+54
-45
@@ -27,11 +27,16 @@
|
||||
|
||||
//Descriptors
|
||||
#import "XLFormDescriptor.h"
|
||||
#import "XLFormSectionDescriptor.h"
|
||||
#import "XLFormRowDescriptor.h"
|
||||
#import "XLFormSectionDescriptor.h"
|
||||
|
||||
// Categories
|
||||
#import "NSArray+XLFormAdditions.h"
|
||||
#import "NSExpression+XLFormAdditions.h"
|
||||
#import "NSObject+XLFormAdditions.h"
|
||||
#import "NSPredicate+XLFormAdditions.h"
|
||||
#import "NSString+XLFormAdditions.h"
|
||||
#import "UIView+XLFormAdditions.h"
|
||||
|
||||
//helpers
|
||||
#import "XLFormOptionsObject.h"
|
||||
@@ -47,64 +52,68 @@
|
||||
|
||||
//Cells
|
||||
#import "XLFormBaseCell.h"
|
||||
#import "XLFormButtonCell.h"
|
||||
#import "XLFormCheckCell.h"
|
||||
#import "XLFormDateCell.h"
|
||||
#import "XLFormDatePickerCell.h"
|
||||
#import "XLFormInlineSelectorCell.h"
|
||||
#import "XLFormLeftRightSelectorCell.h"
|
||||
#import "XLFormPickerCell.h"
|
||||
#import "XLFormRightDetailCell.h"
|
||||
#import "XLFormRightImageButton.h"
|
||||
#import "XLFormSegmentedCell.h"
|
||||
#import "XLFormSelectorCell.h"
|
||||
#import "XLFormSliderCell.h"
|
||||
#import "XLFormStepCounterCell.h"
|
||||
#import "XLFormSwitchCell.h"
|
||||
#import "XLFormTextFieldCell.h"
|
||||
#import "XLFormTextViewCell.h"
|
||||
#import "XLFormSelectorCell.h"
|
||||
#import "XLFormDatePickerCell.h"
|
||||
#import "XLFormButtonCell.h"
|
||||
#import "XLFormSwitchCell.h"
|
||||
#import "XLFormCheckCell.h"
|
||||
#import "XLFormDatePickerCell.h"
|
||||
#import "XLFormPickerCell.h"
|
||||
#import "XLFormLeftRightSelectorCell.h"
|
||||
#import "XLFormDateCell.h"
|
||||
#import "XLFormStepCounterCell.h"
|
||||
#import "XLFormSegmentedCell.h"
|
||||
#import "XLFormSliderCell.h"
|
||||
#import "XLFormImageCell.h"
|
||||
|
||||
//Validation
|
||||
#import "XLFormRegexValidator.h"
|
||||
|
||||
|
||||
extern NSString *const XLFormRowDescriptorTypeText;
|
||||
extern NSString *const XLFormRowDescriptorTypeName;
|
||||
extern NSString *const XLFormRowDescriptorTypeURL;
|
||||
extern NSString *const XLFormRowDescriptorTypeEmail;
|
||||
extern NSString *const XLFormRowDescriptorTypePassword;
|
||||
extern NSString *const XLFormRowDescriptorTypeNumber;
|
||||
extern NSString *const XLFormRowDescriptorTypePhone;
|
||||
extern NSString *const XLFormRowDescriptorTypeTwitter;
|
||||
extern NSString *const XLFormRowDescriptorTypeAccount;
|
||||
extern NSString *const XLFormRowDescriptorTypeInteger;
|
||||
extern NSString *const XLFormRowDescriptorTypeDecimal;
|
||||
extern NSString *const XLFormRowDescriptorTypeTextView;
|
||||
extern NSString *const XLFormRowDescriptorTypeSelectorPush;
|
||||
extern NSString *const XLFormRowDescriptorTypeSelectorPopover;
|
||||
extern NSString *const XLFormRowDescriptorTypeSelectorActionSheet;
|
||||
extern NSString *const XLFormRowDescriptorTypeSelectorAlertView;
|
||||
extern NSString *const XLFormRowDescriptorTypeSelectorPickerView;
|
||||
extern NSString *const XLFormRowDescriptorTypeSelectorPickerViewInline;
|
||||
extern NSString *const XLFormRowDescriptorTypeMultipleSelector;
|
||||
extern NSString *const XLFormRowDescriptorTypeMultipleSelectorPopover;
|
||||
extern NSString *const XLFormRowDescriptorTypeSelectorLeftRight;
|
||||
extern NSString *const XLFormRowDescriptorTypeSelectorSegmentedControl;
|
||||
extern NSString *const XLFormRowDescriptorTypeDateInline;
|
||||
extern NSString *const XLFormRowDescriptorTypeDateTimeInline;
|
||||
extern NSString *const XLFormRowDescriptorTypeTimeInline;
|
||||
extern NSString *const XLFormRowDescriptorTypeCountDownTimerInline;
|
||||
extern NSString *const XLFormRowDescriptorTypeDate;
|
||||
extern NSString *const XLFormRowDescriptorTypeDateTime;
|
||||
extern NSString *const XLFormRowDescriptorTypeTime;
|
||||
extern NSString *const XLFormRowDescriptorTypeCountDownTimer;
|
||||
extern NSString *const XLFormRowDescriptorTypeDatePicker;
|
||||
extern NSString *const XLFormRowDescriptorTypePicker;
|
||||
extern NSString *const XLFormRowDescriptorTypeSlider;
|
||||
extern NSString *const XLFormRowDescriptorTypeBooleanCheck;
|
||||
extern NSString *const XLFormRowDescriptorTypeBooleanSwitch;
|
||||
extern NSString *const XLFormRowDescriptorTypeButton;
|
||||
extern NSString *const XLFormRowDescriptorTypeCountDownTimer;
|
||||
extern NSString *const XLFormRowDescriptorTypeCountDownTimerInline;
|
||||
extern NSString *const XLFormRowDescriptorTypeDate;
|
||||
extern NSString *const XLFormRowDescriptorTypeDateInline;
|
||||
extern NSString *const XLFormRowDescriptorTypeDatePicker;
|
||||
extern NSString *const XLFormRowDescriptorTypeDateTime;
|
||||
extern NSString *const XLFormRowDescriptorTypeDateTimeInline;
|
||||
extern NSString *const XLFormRowDescriptorTypeDecimal;
|
||||
extern NSString *const XLFormRowDescriptorTypeEmail;
|
||||
extern NSString *const XLFormRowDescriptorTypeImage;
|
||||
extern NSString *const XLFormRowDescriptorTypeInfo;
|
||||
extern NSString *const XLFormRowDescriptorTypeInteger;
|
||||
extern NSString *const XLFormRowDescriptorTypeMultipleSelector;
|
||||
extern NSString *const XLFormRowDescriptorTypeMultipleSelectorPopover;
|
||||
extern NSString *const XLFormRowDescriptorTypeName;
|
||||
extern NSString *const XLFormRowDescriptorTypeNumber;
|
||||
extern NSString *const XLFormRowDescriptorTypePassword;
|
||||
extern NSString *const XLFormRowDescriptorTypePhone;
|
||||
extern NSString *const XLFormRowDescriptorTypePicker;
|
||||
extern NSString *const XLFormRowDescriptorTypeSelectorActionSheet;
|
||||
extern NSString *const XLFormRowDescriptorTypeSelectorAlertView;
|
||||
extern NSString *const XLFormRowDescriptorTypeSelectorLeftRight;
|
||||
extern NSString *const XLFormRowDescriptorTypeSelectorPickerView;
|
||||
extern NSString *const XLFormRowDescriptorTypeSelectorPickerViewInline;
|
||||
extern NSString *const XLFormRowDescriptorTypeSelectorPopover;
|
||||
extern NSString *const XLFormRowDescriptorTypeSelectorPush;
|
||||
extern NSString *const XLFormRowDescriptorTypeSelectorSegmentedControl;
|
||||
extern NSString *const XLFormRowDescriptorTypeSlider;
|
||||
extern NSString *const XLFormRowDescriptorTypeStepCounter;
|
||||
extern NSString *const XLFormRowDescriptorTypeText;
|
||||
extern NSString *const XLFormRowDescriptorTypeTextView;
|
||||
extern NSString *const XLFormRowDescriptorTypeTime;
|
||||
extern NSString *const XLFormRowDescriptorTypeTimeInline;
|
||||
extern NSString *const XLFormRowDescriptorTypeTwitter;
|
||||
extern NSString *const XLFormRowDescriptorTypeURL;
|
||||
extern NSString *const XLFormRowDescriptorTypeZipCode;
|
||||
|
||||
|
||||
#define SYSTEM_VERSION_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedSame)
|
||||
|
||||
@@ -36,8 +36,10 @@ NSString *const XLFormRowDescriptorTypePhone = @"phone";
|
||||
NSString *const XLFormRowDescriptorTypeTwitter = @"twitter";
|
||||
NSString *const XLFormRowDescriptorTypeAccount = @"account";
|
||||
NSString *const XLFormRowDescriptorTypeInteger = @"integer";
|
||||
NSString *const XLFormRowDescriptorTypeImage = @"image";
|
||||
NSString *const XLFormRowDescriptorTypeDecimal = @"decimal";
|
||||
NSString *const XLFormRowDescriptorTypeTextView = @"textView";
|
||||
NSString *const XLFormRowDescriptorTypeZipCode = @"zipCode";
|
||||
NSString *const XLFormRowDescriptorTypeSelectorPush = @"selectorPush";
|
||||
NSString *const XLFormRowDescriptorTypeSelectorPopover = @"selectorPopover";
|
||||
NSString *const XLFormRowDescriptorTypeSelectorActionSheet = @"selectorActionSheet";
|
||||
|
||||
Reference in New Issue
Block a user