Merge pull request #92 from ReactiveX/feature/calculator-example

Feature/calculator example
This commit is contained in:
Krunoslav Zaher 2015-08-16 11:37:55 +02:00
commit 11dca76244
8 changed files with 677 additions and 57 deletions

View File

@ -12,6 +12,8 @@
0706E19D1B176EE200BA2D3A /* String+extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0706E19C1B176EE200BA2D3A /* String+extensions.swift */; };
0706E19F1B17703E00BA2D3A /* RandomUserAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0706E19E1B17703E00BA2D3A /* RandomUserAPI.swift */; };
075F13101B4E9D5A000D7861 /* APIWrappersViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 075F130F1B4E9D5A000D7861 /* APIWrappersViewController.swift */; };
07A5C3DB1B70B703001EFE5C /* CalculatorViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A5C3DA1B70B703001EFE5C /* CalculatorViewController.swift */; };
07A5C3DC1B70B703001EFE5C /* CalculatorViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A5C3DA1B70B703001EFE5C /* CalculatorViewController.swift */; };
07E300071B14995F00F00100 /* TableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07E300061B14995F00F00100 /* TableViewController.swift */; };
07E300091B149A2A00F00100 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07E300081B149A2A00F00100 /* User.swift */; };
07E3C2331B03605B0010338D /* Dependencies.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07E3C2321B03605B0010338D /* Dependencies.swift */; };
@ -332,6 +334,7 @@
0706E19C1B176EE200BA2D3A /* String+extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "String+extensions.swift"; sourceTree = "<group>"; };
0706E19E1B17703E00BA2D3A /* RandomUserAPI.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RandomUserAPI.swift; sourceTree = "<group>"; };
075F130F1B4E9D5A000D7861 /* APIWrappersViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = APIWrappersViewController.swift; sourceTree = "<group>"; };
07A5C3DA1B70B703001EFE5C /* CalculatorViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CalculatorViewController.swift; sourceTree = "<group>"; };
07E300061B14995F00F00100 /* TableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TableViewController.swift; sourceTree = "<group>"; };
07E300081B149A2A00F00100 /* User.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = "<group>"; };
07E3C2321B03605B0010338D /* Dependencies.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Dependencies.swift; path = Examples/Dependencies.swift; sourceTree = "<group>"; };
@ -625,6 +628,15 @@
path = APIWrappers;
sourceTree = "<group>";
};
07A5C3D91B70B6B8001EFE5C /* 06 Calculator */ = {
isa = PBXGroup;
children = (
07A5C3DA1B70B703001EFE5C /* CalculatorViewController.swift */,
);
name = "06 Calculator";
path = Calculator;
sourceTree = "<group>";
};
07E300051B14994500F00100 /* 05 TableView */ = {
isa = PBXGroup;
children = (
@ -1045,14 +1057,14 @@
path = Services;
sourceTree = "<group>";
};
C859B9A21B45C5D900D012D7 /* 06 PartialUpdates */ = {
C859B9A21B45C5D900D012D7 /* 07 PartialUpdates */ = {
isa = PBXGroup;
children = (
C859B9A31B45C5D900D012D7 /* PartialUpdatesViewController.swift */,
C859B9AB1B45CF9100D012D7 /* NumberCell.swift */,
C859B9AD1B45CFAB00D012D7 /* NumberSectionView.swift */,
);
name = "06 PartialUpdates";
name = "07 PartialUpdates";
path = PartialUpdates;
sourceTree = "<group>";
};
@ -1064,8 +1076,9 @@
C86E2F301AE5A0CA00C31024 /* 03 WikipediaImageSearch */,
075F130E1B4E9D10000D7861 /* 04 APIWrappers */,
07E300051B14994500F00100 /* 05 TableView */,
C859B9A21B45C5D900D012D7 /* 06 PartialUpdates */,
C8A57F711B40AF4E00D5570A /* 06 CoreData */,
07A5C3D91B70B6B8001EFE5C /* 06 Calculator */,
C859B9A21B45C5D900D012D7 /* 07 PartialUpdates */,
C8A57F711B40AF4E00D5570A /* 08 CoreData */,
);
path = Examples;
sourceTree = "<group>";
@ -1150,12 +1163,12 @@
path = DataSources;
sourceTree = "<group>";
};
C8A57F711B40AF4E00D5570A /* 06 CoreData */ = {
C8A57F711B40AF4E00D5570A /* 08 CoreData */ = {
isa = PBXGroup;
children = (
C8A57F721B40AF7C00D5570A /* Random.xcdatamodeld */,
);
name = "06 CoreData";
name = "08 CoreData";
path = CoreData;
sourceTree = "<group>";
};
@ -1364,6 +1377,7 @@
C8297FD61B6CF953000589EA /* UITextField+Rx.swift in Sources */,
C8297E331B6CF905000589EA /* NumberCell.swift in Sources */,
C8297FBB1B6CF953000589EA /* RxCollectionViewDataSourceProxy.swift in Sources */,
07A5C3DC1B70B703001EFE5C /* CalculatorViewController.swift in Sources */,
C8297FA61B6CF953000589EA /* KVOObserver.swift in Sources */,
C8297F321B6CF94B000589EA /* Switch.swift in Sources */,
C8297E341B6CF905000589EA /* UIImageView+Extensions.swift in Sources */,
@ -1545,6 +1559,7 @@
C88C788F1B3F14FD0061C5AB /* Changeset.swift in Sources */,
C8C46DA81B47F7110020D71E /* CollectionViewImageCell.swift in Sources */,
C8C46DAC1B47F7110020D71E /* WikipediaSearchViewController.swift in Sources */,
07A5C3DB1B70B703001EFE5C /* CalculatorViewController.swift in Sources */,
0706E19D1B176EE200BA2D3A /* String+extensions.swift in Sources */,
C88C78731B3EB0A00061C5AB /* SectionModel.swift in Sources */,
C86E2F3F1AE5A0CA00C31024 /* SearchViewModel.swift in Sources */,

View File

@ -0,0 +1,226 @@
//
// CalculatorViewController.swift
// RxExample
//
// Created by Carlos García on 4/8/15.
// Copyright (c) 2015 Krunoslav Zaher. All rights reserved.
//
import UIKit
#if !RX_NO_MODULE
import RxSwift
import RxCocoa
#endif
class CalculatorViewController: ViewController {
enum Operator {
case Addition
case Subtraction
case Multiplication
case Division
}
enum Action {
case Clear
case ChangeSign
case Percent
case Operation(Operator)
case Equal
case AddNumber(Character)
case AddDot
}
struct CalState {
let previousNumber: String!
let action: Action
let currentNumber: String!
let inScreen: String
let replace: Bool
}
@IBOutlet weak var lastSignLabel: UILabel!
@IBOutlet weak var resultLabel: UILabel!
@IBOutlet weak var allClearButton: UIButton!
@IBOutlet weak var changeSignButton: UIButton!
@IBOutlet weak var percentButton: UIButton!
@IBOutlet weak var divideButton: UIButton!
@IBOutlet weak var multiplyButton: UIButton!
@IBOutlet weak var minusButton: UIButton!
@IBOutlet weak var plusButton: UIButton!
@IBOutlet weak var equalButton: UIButton!
@IBOutlet weak var dotButton: UIButton!
@IBOutlet weak var zeroButton: UIButton!
@IBOutlet weak var oneButton: UIButton!
@IBOutlet weak var twoButton: UIButton!
@IBOutlet weak var threeButton: UIButton!
@IBOutlet weak var fourButton: UIButton!
@IBOutlet weak var fiveButton: UIButton!
@IBOutlet weak var sixButton: UIButton!
@IBOutlet weak var sevenButton: UIButton!
@IBOutlet weak var eightButton: UIButton!
@IBOutlet weak var nineButton: UIButton!
let CLEAR_STATE = CalState(previousNumber: nil, action: .Clear, currentNumber: "0", inScreen: "0", replace: true)
let diposeBag = DisposeBag()
override func viewDidLoad() {
let commands: [Observable<Action>] = [
allClearButton.rx_tap >- map { _ in .Clear },
changeSignButton.rx_tap >- map { _ in .ChangeSign },
percentButton.rx_tap >- map { _ in .Percent },
divideButton.rx_tap >- map { _ in .Operation(.Division) },
multiplyButton.rx_tap >- map { _ in .Operation(.Multiplication) },
minusButton.rx_tap >- map { _ in .Operation(.Subtraction) },
plusButton.rx_tap >- map { _ in .Operation(.Addition) },
equalButton.rx_tap >- map { _ in .Equal },
dotButton.rx_tap >- map { _ in .AddDot },
zeroButton.rx_tap >- map { _ in .AddNumber("0") },
oneButton.rx_tap >- map { _ in .AddNumber("1") },
twoButton.rx_tap >- map { _ in .AddNumber("2") },
threeButton.rx_tap >- map { _ in .AddNumber("3") },
fourButton.rx_tap >- map { _ in .AddNumber("4") },
fiveButton.rx_tap >- map { _ in .AddNumber("5") },
sixButton.rx_tap >- map { _ in .AddNumber("6") },
sevenButton.rx_tap >- map { _ in .AddNumber("7") },
eightButton.rx_tap >- map { _ in .AddNumber("8") },
nineButton.rx_tap >- map { _ in .AddNumber("9") }
]
merge(from(commands))
>- scan(CLEAR_STATE) { a, x in
return self.tranformState(a, x)
}
>- debug("debugging")
>- subscribeNext { [weak self] calState in
self?.resultLabel.text = self?.prettyFormat(calState.inScreen)
switch calState.action {
case .Operation(let operation):
switch operation {
case .Addition:
self?.lastSignLabel.text = "+"
case .Subtraction:
self?.lastSignLabel.text = "-"
case .Multiplication:
self?.lastSignLabel.text = "x"
case .Division:
self?.lastSignLabel.text = "/"
}
default:
self?.lastSignLabel.text = ""
}
} >- diposeBag.addDisposable
}
func tranformState(a: CalState, _ x: Action) -> CalState {
switch x {
case .Clear:
return CLEAR_STATE
case .AddNumber(let c):
return addNumber(a, c)
case .AddDot:
return addDot(a)
case .ChangeSign:
let d = "\(-a.inScreen.toDouble()!)"
return CalState(previousNumber: a.previousNumber, action: a.action, currentNumber: d, inScreen: d, replace: true)
case .Percent:
let d = "\(a.inScreen.toDouble()!/100)"
return CalState(previousNumber: a.previousNumber, action: a.action, currentNumber: d, inScreen: d, replace: true)
case .Operation(let o):
return performOperation(a, o)
case .Equal:
return performEqual(a)
}
}
func addNumber(a: CalState, _ char: Character) -> CalState {
let cn = a.currentNumber == nil || a.replace ? String(char) : a.inScreen + String(char)
return CalState(previousNumber: a.previousNumber, action: a.action, currentNumber: cn, inScreen: cn, replace: false)
}
func addDot(a: CalState) -> CalState {
let cn = a.inScreen.rangeOfString(".") == nil ? a.currentNumber + "." : a.currentNumber
return CalState(previousNumber: a.previousNumber, action: a.action, currentNumber: cn, inScreen: cn, replace: false)
}
func performOperation(a: CalState, _ o: Operator) -> CalState {
if a.previousNumber == nil {
return CalState(previousNumber: a.currentNumber, action: .Operation(o), currentNumber: nil, inScreen: a.currentNumber, replace: true)
}
else {
let previous = a.previousNumber.toDouble()!
let current = a.inScreen.toDouble()!
switch a.action {
case .Operation(let op):
switch op {
case .Addition:
let result = "\(previous + current)"
return CalState(previousNumber: result, action: .Operation(o), currentNumber: nil, inScreen: result, replace: true)
case .Subtraction:
let result = "\(previous - current)"
return CalState(previousNumber: result, action: .Operation(o), currentNumber: nil, inScreen: result, replace: true)
case .Multiplication:
let result = "\(previous * current)"
return CalState(previousNumber: result, action: .Operation(o), currentNumber: nil, inScreen: result, replace: true)
case .Division:
let result = "\(previous / current)"
return CalState(previousNumber: result, action: .Operation(o), currentNumber: nil, inScreen: result, replace: true)
}
default:
return CalState(previousNumber: nil, action: .Operation(o), currentNumber: a.currentNumber, inScreen: a.inScreen, replace: true)
}
}
}
func performEqual(a: CalState) -> CalState {
let previous = (a.previousNumber ?? "0").toDouble()
let current = a.inScreen.toDouble()!
switch a.action {
case .Operation(let op):
switch op {
case .Addition:
let result = "\(previous! + current)"
return CalState(previousNumber: nil, action: .Clear, currentNumber: result, inScreen: result, replace: true)
case .Subtraction:
let result = "\(previous! - current)"
return CalState(previousNumber: nil, action: .Clear, currentNumber: result, inScreen: result, replace: true)
case .Multiplication:
let result = "\(previous! * current)"
return CalState(previousNumber: nil, action: .Clear, currentNumber: result, inScreen: result, replace: true)
case .Division:
let result = previous! / current
let resultText = result == Double.infinity ? "0" : "\(result)"
return CalState(previousNumber: nil, action: .Clear, currentNumber: resultText, inScreen: resultText, replace: true)
}
default:
return CalState(previousNumber: nil, action: .Clear, currentNumber: a.currentNumber, inScreen: a.inScreen, replace: true)
}
}
func prettyFormat(str: String) -> String {
if str.hasSuffix(".0") {
return str.substringToIndex(str.endIndex.predecessor().predecessor())
}
return str
}
}

View File

@ -1,7 +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="14F19a" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="E5v-jn-n2n">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="7706" systemVersion="14F25a" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="E5v-jn-n2n">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
<capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
</dependencies>
@ -25,7 +26,7 @@
<!--Table View Controller-->
<scene sceneID="Mhm-lU-Uhj">
<objects>
<viewController id="bZo-ey-Nha" customClass="TableViewController" customModule="RxExample" customModuleProvider="target" sceneMemberID="viewController">
<viewController id="bZo-ey-Nha" customClass="TableViewController" customModule="RxExample_iOS" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="uYL-wL-0i2"/>
<viewControllerLayoutGuide type="bottom" id="LL7-L6-PAN"/>
@ -66,12 +67,12 @@
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="yYr-Cu-KXe" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="151" y="272"/>
<point key="canvasLocation" x="151" y="-370"/>
</scene>
<!--Detail View Controller-->
<scene sceneID="n26-Ac-tgu">
<objects>
<viewController storyboardIdentifier="DetailViewController" id="ack-C5-IwI" customClass="DetailViewController" customModule="RxExample" customModuleProvider="target" sceneMemberID="viewController">
<viewController storyboardIdentifier="DetailViewController" id="ack-C5-IwI" customClass="DetailViewController" customModule="RxExample_iOS" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="ByU-ts-Mke"/>
<viewControllerLayoutGuide type="bottom" id="zIc-eF-yeA"/>
@ -123,12 +124,12 @@
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="NGu-t4-MLa" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="595" y="272"/>
<point key="canvasLocation" x="595" y="-370"/>
</scene>
<!--GitHub Signup-->
<scene sceneID="N2N-1B-sZ4">
<objects>
<viewController id="dHR-mS-HCG" customClass="GitHubSignupViewController" customModule="RxExample" customModuleProvider="target" sceneMemberID="viewController">
<viewController id="dHR-mS-HCG" customClass="GitHubSignupViewController" customModule="RxExample_iOS" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="08L-bJ-kbo"/>
<viewControllerLayoutGuide type="bottom" id="iau-x6-9gd"/>
@ -231,7 +232,7 @@
<!--Partial Updates View Controller-->
<scene sceneID="7Pq-0W-ati">
<objects>
<viewController id="HRf-Xk-9iT" customClass="PartialUpdatesViewController" customModule="RxExample" customModuleProvider="target" sceneMemberID="viewController">
<viewController id="HRf-Xk-9iT" customClass="PartialUpdatesViewController" customModule="RxExample_iOS" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="rR0-FR-HFT"/>
<viewControllerLayoutGuide type="bottom" id="t4S-nP-d6Z"/>
@ -258,7 +259,7 @@
<inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
</collectionViewFlowLayout>
<cells>
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="Cell" id="aNq-h7-r3z" customClass="NumberCell" customModule="RxExample" customModuleProvider="target">
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="Cell" id="aNq-h7-r3z" customClass="NumberCell" customModule="RxExample_iOS" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="50" height="50"/>
<autoresizingMask key="autoresizingMask"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
@ -283,7 +284,7 @@
</connections>
</collectionViewCell>
</cells>
<collectionReusableView key="sectionHeaderView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="Section" id="myv-cg-TS9" customClass="NumberSectionView" customModule="RxExample" customModuleProvider="target">
<collectionReusableView key="sectionHeaderView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="Section" id="myv-cg-TS9" customClass="NumberSectionView" customModule="RxExample_iOS" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="108" height="25"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
@ -337,12 +338,12 @@
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iOF-ih-lLu" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="133" y="1629"/>
<point key="canvasLocation" x="151" y="2344"/>
</scene>
<!--Rx Examples-->
<scene sceneID="TnT-xx-y5Q">
<objects>
<tableViewController id="t5K-0k-3cp" customClass="RootViewController" customModule="RxExample" customModuleProvider="target" sceneMemberID="viewController">
<tableViewController id="t5K-0k-3cp" customClass="RootViewController" customModule="RxExample_iOS" customModuleProvider="target" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="static" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="10" sectionFooterHeight="10" id="UYP-Va-Aja">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@ -373,29 +374,6 @@
<segue destination="dHR-mS-HCG" kind="push" id="rAe-JJ-Q7U"/>
</connections>
</tableViewCell>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="pxT-4B-gDc" detailTextLabel="xZJ-Xt-MqD" style="IBUITableViewCellStyleSubtitle" id="yAf-eB-mRo">
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="yAf-eB-mRo" id="M3Y-AJ-f8i">
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Search Wikipedia" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="pxT-4B-gDc">
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="MVVM Example" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="xZJ-Xt-MqD">
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="11"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</tableViewCellContentView>
<connections>
<segue destination="Iwo-im-m6d" kind="push" identifier="ShowWikipediaSearch" id="Gfh-zm-u0w"/>
</connections>
</tableViewCell>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="x4u-zK-muO" detailTextLabel="nuf-1K-ITV" style="IBUITableViewCellStyleSubtitle" id="HTx-Ei-Vlj">
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="HTx-Ei-Vlj" id="kc9-g3-Zfl">
@ -419,6 +397,52 @@
<segue destination="bZo-ey-Nha" kind="push" id="S82-xv-fWe"/>
</connections>
</tableViewCell>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="ufL-YX-dKF" detailTextLabel="efq-eT-ETM" style="IBUITableViewCellStyleSubtitle" id="Egb-OL-S5e">
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Egb-OL-S5e" id="Y1z-Y7-dLh">
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Calculator" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="ufL-YX-dKF">
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Stateless calculator example" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="efq-eT-ETM">
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="11"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</tableViewCellContentView>
<connections>
<segue destination="ErT-E8-uY3" kind="push" id="3is-Gn-lDH"/>
</connections>
</tableViewCell>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="pxT-4B-gDc" detailTextLabel="xZJ-Xt-MqD" style="IBUITableViewCellStyleSubtitle" id="yAf-eB-mRo">
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="yAf-eB-mRo" id="M3Y-AJ-f8i">
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Search Wikipedia" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="pxT-4B-gDc">
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="MVVM Example" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="xZJ-Xt-MqD">
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="11"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</tableViewCellContentView>
<connections>
<segue destination="Iwo-im-m6d" kind="push" identifier="ShowWikipediaSearch" id="Gfh-zm-u0w"/>
</connections>
</tableViewCell>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="siT-mr-b8A" detailTextLabel="BSH-sG-bpY" style="IBUITableViewCellStyleSubtitle" id="VBq-7j-4vQ">
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="VBq-7j-4vQ" id="m7h-NW-UnD">
@ -486,7 +510,7 @@
<!--Search Wikipedia-->
<scene sceneID="W3v-Hb-gUk">
<objects>
<viewController id="Iwo-im-m6d" customClass="WikipediaSearchViewController" customModule="RxExample" customModuleProvider="target" sceneMemberID="viewController">
<viewController id="Iwo-im-m6d" customClass="WikipediaSearchViewController" customModule="RxExample_iOS" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="5dr-42-uib"/>
<viewControllerLayoutGuide type="bottom" id="qRP-g3-i5K"/>
@ -536,12 +560,12 @@ This is only showcase app, not intended for production purposes.</string>
</connections>
</searchDisplayController>
</objects>
<point key="canvasLocation" x="151" y="-379"/>
<point key="canvasLocation" x="151" y="995"/>
</scene>
<!--Wrappers View Controller-->
<scene sceneID="GYg-hz-8N5">
<objects>
<viewController id="J6V-0T-aRq" customClass="APIWrappersViewController" customModule="RxExample" customModuleProvider="target" sceneMemberID="viewController">
<viewController id="J6V-0T-aRq" customClass="APIWrappersViewController" customModule="RxExample_iOS" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="anJ-3z-vFC"/>
<viewControllerLayoutGuide type="bottom" id="bgd-ny-eho"/>
@ -644,7 +668,362 @@ This is only showcase app, not intended for production purposes.</string>
<placeholder placeholderIdentifier="IBFirstResponder" id="k4I-9E-5OJ" sceneMemberID="firstResponder"/>
<panGestureRecognizer minimumNumberOfTouches="1" id="Shn-qP-Kjy"/>
</objects>
<point key="canvasLocation" x="151" y="955"/>
<point key="canvasLocation" x="151" y="1665"/>
</scene>
<!--Calculator-->
<scene sceneID="Xfe-3i-xhv">
<objects>
<viewController id="ErT-E8-uY3" customClass="CalculatorViewController" customModule="RxExample_iOS" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="BGU-Fc-pLc"/>
<viewControllerLayoutGuide type="bottom" id="LFx-RC-K1L"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="2aB-zX-D0f">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<button contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="2nU-2T-o0z">
<rect key="frame" x="240" y="488" width="80" height="80"/>
<color key="backgroundColor" red="0.52156862749999999" green="0.74901960779999999" blue="0.1450980392" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="width" secondItem="2nU-2T-o0z" secondAttribute="height" multiplier="1:1" id="4e3-8u-XpU"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="70"/>
<color key="tintColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<state key="normal" title="=">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
</button>
<button contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="cEb-GT-XMg">
<rect key="frame" x="0.0" y="408" width="80" height="80"/>
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="width" secondItem="cEb-GT-XMg" secondAttribute="height" multiplier="1:1" id="09S-n0-Nb0"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="70"/>
<color key="tintColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
<state key="normal" title="1">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
</button>
<button contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="CVO-3I-Mh2">
<rect key="frame" x="80" y="408" width="80" height="80"/>
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="width" secondItem="CVO-3I-Mh2" secondAttribute="height" multiplier="1:1" id="MOV-kW-88s"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="70"/>
<color key="tintColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
<state key="normal" title="2">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
</button>
<button contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="bkK-oc-Yvj">
<rect key="frame" x="160" y="408" width="80" height="80"/>
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="width" secondItem="bkK-oc-Yvj" secondAttribute="height" multiplier="1:1" id="lFg-hF-hjq"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="70"/>
<color key="tintColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
<state key="normal" title="3">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
</button>
<button contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="fYW-iZ-WBg">
<rect key="frame" x="160" y="488" width="80" height="80"/>
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="width" secondItem="fYW-iZ-WBg" secondAttribute="height" multiplier="1:1" id="oi8-Wx-SBM"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="70"/>
<color key="tintColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
<state key="normal" title=".">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
</button>
<button contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="X6C-HN-QW9">
<rect key="frame" x="0.0" y="488" width="160" height="80"/>
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="width" secondItem="X6C-HN-QW9" secondAttribute="height" multiplier="2:1" id="Mh5-pN-KV4"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="70"/>
<color key="tintColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
<state key="normal" title="0">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
</button>
<button contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="prS-ma-oED">
<rect key="frame" x="240" y="408" width="80" height="80"/>
<color key="backgroundColor" red="0.52156862749999999" green="0.74901960779999999" blue="0.1450980392" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="width" secondItem="prS-ma-oED" secondAttribute="height" multiplier="1:1" id="Mkr-K3-1dB"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="70"/>
<color key="tintColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<state key="normal" title="+">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
</button>
<button contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="rUw-vf-PNm">
<rect key="frame" x="0.0" y="328" width="80" height="80"/>
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="width" secondItem="rUw-vf-PNm" secondAttribute="height" multiplier="1:1" id="yT2-fN-joy"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="70"/>
<color key="tintColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
<state key="normal" title="4">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
</button>
<button contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="rK2-wv-Lxq">
<rect key="frame" x="80" y="328" width="80" height="80"/>
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="width" secondItem="rK2-wv-Lxq" secondAttribute="height" multiplier="1:1" id="mct-ej-iGY"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="70"/>
<color key="tintColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
<state key="normal" title="5">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
</button>
<button contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="hyZ-GS-b4n">
<rect key="frame" x="240" y="328" width="80" height="80"/>
<color key="backgroundColor" red="0.52156862749999999" green="0.74901960779999999" blue="0.1450980392" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="width" secondItem="hyZ-GS-b4n" secondAttribute="height" multiplier="1:1" id="Tfu-Rf-5Xe"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="70"/>
<color key="tintColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<state key="normal" title="-">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
</button>
<button contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="w1G-BD-RaP">
<rect key="frame" x="0.0" y="248" width="80" height="80"/>
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="width" secondItem="w1G-BD-RaP" secondAttribute="height" multiplier="1:1" id="5a5-Su-6yU"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="70"/>
<color key="tintColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
<state key="normal" title="7">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
</button>
<button contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="JfU-gs-Rj1">
<rect key="frame" x="80" y="248" width="80" height="80"/>
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="width" secondItem="JfU-gs-Rj1" secondAttribute="height" multiplier="1:1" id="i3P-4o-97z"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="70"/>
<color key="tintColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
<state key="normal" title="8">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
</button>
<button contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ScB-JD-pYD">
<rect key="frame" x="160" y="248" width="80" height="80"/>
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="width" secondItem="ScB-JD-pYD" secondAttribute="height" multiplier="1:1" id="VEO-yW-uqL"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="70"/>
<color key="tintColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
<state key="normal" title="9">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
</button>
<button contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Lef-oq-6tF">
<rect key="frame" x="240" y="248" width="80" height="80"/>
<color key="backgroundColor" red="0.52156862749999999" green="0.74901960779999999" blue="0.1450980392" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="width" secondItem="Lef-oq-6tF" secondAttribute="height" multiplier="1:1" id="QC5-C7-JdQ"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="70"/>
<color key="tintColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<state key="normal" title="X">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
</button>
<button contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ood-rP-hyC">
<rect key="frame" x="80" y="168" width="80" height="80"/>
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="width" secondItem="ood-rP-hyC" secondAttribute="height" multiplier="1:1" id="WY5-BL-7rX"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="38"/>
<color key="tintColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
<state key="normal" title="+/-">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
</button>
<button contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Bck-k4-Rnw">
<rect key="frame" x="160" y="168" width="80" height="80"/>
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="width" secondItem="Bck-k4-Rnw" secondAttribute="height" multiplier="1:1" id="spz-fS-4Ph"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="38"/>
<color key="tintColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
<state key="normal" title="%">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
</button>
<button contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="6Od-LO-GKb">
<rect key="frame" x="240" y="168" width="80" height="80"/>
<color key="backgroundColor" red="0.52156862749999999" green="0.74901960779999999" blue="0.1450980392" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="width" secondItem="6Od-LO-GKb" secondAttribute="height" multiplier="1:1" id="xZg-E7-mcs"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="70"/>
<color key="tintColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<state key="normal" title="/">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
</button>
<button contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="dCG-4D-hbZ">
<rect key="frame" x="160" y="328" width="80" height="80"/>
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="width" secondItem="dCG-4D-hbZ" secondAttribute="height" multiplier="1:1" id="cBD-Pp-Jbd"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="70"/>
<color key="tintColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
<state key="normal" title="6">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
</button>
<button contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="rNb-Ii-Dre">
<rect key="frame" x="0.0" y="168" width="80" height="80"/>
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="width" secondItem="rNb-Ii-Dre" secondAttribute="height" multiplier="1:1" id="sej-2C-PGC"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="42"/>
<color key="tintColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
<state key="normal" title="AC">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="xws-I8-RiJ">
<rect key="frame" x="16" y="92" width="288" height="68"/>
<color key="backgroundColor" red="0.98039215690000003" green="0.91372549020000005" blue="0.87058823529999996" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="42"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="YZh-2c-lxk">
<rect key="frame" x="16" y="72" width="288" height="21"/>
<color key="backgroundColor" red="0.98039215690000003" green="0.91372549020000005" blue="0.87058823529999996" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="21" id="Tno-m0-igg"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="prS-ma-oED" firstAttribute="top" secondItem="hyZ-GS-b4n" secondAttribute="bottom" id="19F-YX-RbU"/>
<constraint firstItem="X6C-HN-QW9" firstAttribute="width" secondItem="2aB-zX-D0f" secondAttribute="width" multiplier="0.5" id="1Xi-1J-6MR"/>
<constraint firstItem="hyZ-GS-b4n" firstAttribute="leading" secondItem="dCG-4D-hbZ" secondAttribute="trailing" id="3SH-H5-ZCs"/>
<constraint firstItem="Lef-oq-6tF" firstAttribute="width" secondItem="2aB-zX-D0f" secondAttribute="width" multiplier="0.25" id="5y5-DV-EXv"/>
<constraint firstItem="rNb-Ii-Dre" firstAttribute="width" secondItem="2aB-zX-D0f" secondAttribute="width" multiplier="0.25" id="6UO-b4-URv"/>
<constraint firstItem="bkK-oc-Yvj" firstAttribute="leading" secondItem="CVO-3I-Mh2" secondAttribute="trailing" id="7k3-BL-prQ"/>
<constraint firstItem="cEb-GT-XMg" firstAttribute="leading" secondItem="2aB-zX-D0f" secondAttribute="leadingMargin" constant="-16" id="8l6-De-dbE"/>
<constraint firstItem="xws-I8-RiJ" firstAttribute="top" secondItem="BGU-Fc-pLc" secondAttribute="bottom" constant="28" id="9PT-aA-C9h"/>
<constraint firstItem="CVO-3I-Mh2" firstAttribute="top" secondItem="rK2-wv-Lxq" secondAttribute="bottom" id="A2X-8X-HfS"/>
<constraint firstItem="xws-I8-RiJ" firstAttribute="leading" secondItem="2aB-zX-D0f" secondAttribute="leadingMargin" id="AAa-aA-FH3"/>
<constraint firstItem="JfU-gs-Rj1" firstAttribute="leading" secondItem="w1G-BD-RaP" secondAttribute="trailing" id="BUu-IH-pV4"/>
<constraint firstAttribute="width" secondItem="rUw-vf-PNm" secondAttribute="width" multiplier="4" id="Bg7-VX-Rb5"/>
<constraint firstItem="rK2-wv-Lxq" firstAttribute="top" secondItem="JfU-gs-Rj1" secondAttribute="bottom" id="E1x-RJ-fD8"/>
<constraint firstItem="JfU-gs-Rj1" firstAttribute="width" secondItem="2aB-zX-D0f" secondAttribute="width" multiplier="0.25" id="EWv-rO-Qi1"/>
<constraint firstItem="CVO-3I-Mh2" firstAttribute="width" secondItem="2aB-zX-D0f" secondAttribute="width" multiplier="0.25" id="Edo-hk-4ts"/>
<constraint firstItem="ScB-JD-pYD" firstAttribute="top" secondItem="Bck-k4-Rnw" secondAttribute="bottom" id="O8r-r6-AI5"/>
<constraint firstAttribute="width" secondItem="ScB-JD-pYD" secondAttribute="width" multiplier="4" id="Of5-GX-yeW"/>
<constraint firstAttribute="trailingMargin" secondItem="prS-ma-oED" secondAttribute="trailing" constant="-16" id="QeY-5T-xfi"/>
<constraint firstAttribute="width" secondItem="w1G-BD-RaP" secondAttribute="width" multiplier="4" id="VsK-xG-FcO"/>
<constraint firstItem="LFx-RC-K1L" firstAttribute="top" secondItem="2nU-2T-o0z" secondAttribute="bottom" id="Wbg-YM-ePH"/>
<constraint firstItem="fYW-iZ-WBg" firstAttribute="leading" secondItem="X6C-HN-QW9" secondAttribute="trailing" id="XRz-eE-prF"/>
<constraint firstItem="Lef-oq-6tF" firstAttribute="leading" secondItem="ScB-JD-pYD" secondAttribute="trailing" id="Xhj-hj-xlv"/>
<constraint firstItem="2nU-2T-o0z" firstAttribute="top" secondItem="prS-ma-oED" secondAttribute="bottom" id="YT3-we-hDa"/>
<constraint firstAttribute="trailingMargin" secondItem="Lef-oq-6tF" secondAttribute="trailing" constant="-16" id="YVe-zZ-rpJ"/>
<constraint firstAttribute="trailingMargin" secondItem="6Od-LO-GKb" secondAttribute="trailing" constant="-16" id="YYt-hC-gKN"/>
<constraint firstItem="hyZ-GS-b4n" firstAttribute="top" secondItem="Lef-oq-6tF" secondAttribute="bottom" id="YxH-Sz-wBK"/>
<constraint firstItem="ood-rP-hyC" firstAttribute="leading" secondItem="rNb-Ii-Dre" secondAttribute="trailing" id="Yxb-GB-vCh"/>
<constraint firstItem="bkK-oc-Yvj" firstAttribute="width" secondItem="2aB-zX-D0f" secondAttribute="width" multiplier="0.25" id="Ze1-tk-JnN"/>
<constraint firstAttribute="width" secondItem="fYW-iZ-WBg" secondAttribute="width" multiplier="4" constant="1" id="aiA-Up-lJm"/>
<constraint firstItem="6Od-LO-GKb" firstAttribute="leading" secondItem="Bck-k4-Rnw" secondAttribute="trailing" id="c0U-9F-UVE"/>
<constraint firstItem="YZh-2c-lxk" firstAttribute="top" secondItem="BGU-Fc-pLc" secondAttribute="bottom" constant="8" symbolic="YES" id="c2C-vt-O44"/>
<constraint firstItem="w1G-BD-RaP" firstAttribute="top" secondItem="rNb-Ii-Dre" secondAttribute="bottom" id="cYd-Hw-gZi"/>
<constraint firstItem="JfU-gs-Rj1" firstAttribute="top" secondItem="ood-rP-hyC" secondAttribute="bottom" id="dCo-4f-e20"/>
<constraint firstItem="ood-rP-hyC" firstAttribute="width" secondItem="2aB-zX-D0f" secondAttribute="width" multiplier="0.25" id="dOo-b9-A1C"/>
<constraint firstItem="YZh-2c-lxk" firstAttribute="leading" secondItem="xws-I8-RiJ" secondAttribute="leading" id="fEF-N8-P6d"/>
<constraint firstItem="w1G-BD-RaP" firstAttribute="leading" secondItem="2aB-zX-D0f" secondAttribute="leadingMargin" constant="-16" id="fSF-8a-U5j"/>
<constraint firstItem="X6C-HN-QW9" firstAttribute="leading" secondItem="2aB-zX-D0f" secondAttribute="leadingMargin" constant="-16" id="fgg-RT-xp8"/>
<constraint firstItem="rNb-Ii-Dre" firstAttribute="top" secondItem="xws-I8-RiJ" secondAttribute="bottom" constant="8" id="g0o-Ye-EJ6"/>
<constraint firstAttribute="width" secondItem="2nU-2T-o0z" secondAttribute="width" multiplier="4" constant="1" id="gLZ-iH-P1M"/>
<constraint firstItem="rK2-wv-Lxq" firstAttribute="leading" secondItem="rUw-vf-PNm" secondAttribute="trailing" id="gZb-JV-S97"/>
<constraint firstItem="rUw-vf-PNm" firstAttribute="top" secondItem="w1G-BD-RaP" secondAttribute="bottom" id="gmy-h3-c0P"/>
<constraint firstAttribute="trailingMargin" secondItem="hyZ-GS-b4n" secondAttribute="trailing" constant="-16" id="hU6-SH-5Jd"/>
<constraint firstItem="xws-I8-RiJ" firstAttribute="trailing" secondItem="2aB-zX-D0f" secondAttribute="trailingMargin" id="jPI-v2-MQO"/>
<constraint firstAttribute="width" secondItem="hyZ-GS-b4n" secondAttribute="width" multiplier="4" id="jU8-UQ-CVh"/>
<constraint firstItem="X6C-HN-QW9" firstAttribute="top" secondItem="cEb-GT-XMg" secondAttribute="bottom" id="kfz-93-2aV"/>
<constraint firstItem="cEb-GT-XMg" firstAttribute="top" secondItem="rUw-vf-PNm" secondAttribute="bottom" id="lAe-vl-ibd"/>
<constraint firstItem="Lef-oq-6tF" firstAttribute="top" secondItem="6Od-LO-GKb" secondAttribute="bottom" id="leB-OZ-sOB"/>
<constraint firstItem="LFx-RC-K1L" firstAttribute="top" secondItem="X6C-HN-QW9" secondAttribute="bottom" id="mKH-O8-Rcn"/>
<constraint firstItem="dCG-4D-hbZ" firstAttribute="top" secondItem="ScB-JD-pYD" secondAttribute="bottom" id="o9H-jI-OfN"/>
<constraint firstItem="CVO-3I-Mh2" firstAttribute="leading" secondItem="cEb-GT-XMg" secondAttribute="trailing" id="pzB-qX-XDt"/>
<constraint firstItem="rNb-Ii-Dre" firstAttribute="leading" secondItem="2aB-zX-D0f" secondAttribute="leadingMargin" constant="-16" id="rEG-5j-cKX"/>
<constraint firstItem="dCG-4D-hbZ" firstAttribute="width" secondItem="2aB-zX-D0f" secondAttribute="width" multiplier="0.25" id="tIw-Wc-o5Y"/>
<constraint firstItem="Bck-k4-Rnw" firstAttribute="width" secondItem="2aB-zX-D0f" secondAttribute="width" multiplier="0.25" id="u2H-CZ-AhP"/>
<constraint firstItem="LFx-RC-K1L" firstAttribute="top" secondItem="fYW-iZ-WBg" secondAttribute="bottom" id="v5P-Ga-JLx"/>
<constraint firstItem="cEb-GT-XMg" firstAttribute="width" secondItem="2aB-zX-D0f" secondAttribute="width" multiplier="0.25" id="vsj-Qb-St6"/>
<constraint firstAttribute="trailingMargin" secondItem="2nU-2T-o0z" secondAttribute="trailing" constant="-16" id="wJb-zH-Ld3"/>
<constraint firstAttribute="width" secondItem="6Od-LO-GKb" secondAttribute="width" multiplier="4" id="wb6-ee-SbK"/>
<constraint firstItem="fYW-iZ-WBg" firstAttribute="top" secondItem="bkK-oc-Yvj" secondAttribute="bottom" id="wql-9W-wt1"/>
<constraint firstItem="rK2-wv-Lxq" firstAttribute="width" secondItem="2aB-zX-D0f" secondAttribute="width" multiplier="0.25" id="x9Z-go-ezU"/>
<constraint firstItem="X6C-HN-QW9" firstAttribute="top" secondItem="CVO-3I-Mh2" secondAttribute="bottom" id="xJN-iL-mp3"/>
<constraint firstItem="bkK-oc-Yvj" firstAttribute="top" secondItem="dCG-4D-hbZ" secondAttribute="bottom" id="xSQ-kM-i0y"/>
<constraint firstItem="rUw-vf-PNm" firstAttribute="leading" secondItem="2aB-zX-D0f" secondAttribute="leadingMargin" constant="-16" id="xtL-Oh-5l2"/>
<constraint firstItem="prS-ma-oED" firstAttribute="width" secondItem="2aB-zX-D0f" secondAttribute="width" multiplier="0.25" id="y31-8t-Nvu"/>
<constraint firstItem="YZh-2c-lxk" firstAttribute="trailing" secondItem="xws-I8-RiJ" secondAttribute="trailing" id="zjQ-8H-XyV"/>
</constraints>
</view>
<navigationItem key="navigationItem" title="Calculator" id="f5N-0y-Z8w"/>
<connections>
<outlet property="allClearButton" destination="rNb-Ii-Dre" id="4s2-ak-hmP"/>
<outlet property="changeSignButton" destination="ood-rP-hyC" id="DVh-Lx-YA6"/>
<outlet property="divideButton" destination="6Od-LO-GKb" id="TJl-SF-xDG"/>
<outlet property="dotButton" destination="fYW-iZ-WBg" id="8gh-Bh-xnH"/>
<outlet property="eightButton" destination="JfU-gs-Rj1" id="lfN-Lb-3rB"/>
<outlet property="equalButton" destination="2nU-2T-o0z" id="d5s-aq-IZb"/>
<outlet property="fiveButton" destination="rK2-wv-Lxq" id="97z-os-7bw"/>
<outlet property="fourButton" destination="rUw-vf-PNm" id="7xg-NF-12b"/>
<outlet property="lastSignLabel" destination="YZh-2c-lxk" id="9eW-Xe-JWt"/>
<outlet property="minusButton" destination="hyZ-GS-b4n" id="hg4-5p-4PH"/>
<outlet property="multiplyButton" destination="Lef-oq-6tF" id="LJ7-bN-1Ok"/>
<outlet property="nineButton" destination="ScB-JD-pYD" id="qEp-ke-pJD"/>
<outlet property="oneButton" destination="cEb-GT-XMg" id="7ND-Jm-7he"/>
<outlet property="percentButton" destination="Bck-k4-Rnw" id="2HI-1N-V3v"/>
<outlet property="plusButton" destination="prS-ma-oED" id="wsH-hh-cHi"/>
<outlet property="resultLabel" destination="xws-I8-RiJ" id="X21-5l-a8h"/>
<outlet property="sevenButton" destination="w1G-BD-RaP" id="vbU-5M-YfS"/>
<outlet property="sixButton" destination="dCG-4D-hbZ" id="i6m-PM-MEL"/>
<outlet property="threeButton" destination="bkK-oc-Yvj" id="jWX-5p-rc3"/>
<outlet property="twoButton" destination="CVO-3I-Mh2" id="HdU-aP-840"/>
<outlet property="zeroButton" destination="X6C-HN-QW9" id="Jy2-qg-wIn"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Hlb-0U-7wp" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="151" y="296"/>
</scene>
</scenes>
<simulatedMetricsContainer key="defaultSimulatedMetrics">

View File

@ -10,7 +10,7 @@ test("----- githubSignUp -----", function (check, pass) {
return false;
}
UIATarget.localTarget().frontMostApp().mainWindow().tableViews()[0].cells()[0].tapWithOptions({tapOffset:{x:0.24, y:0.20}});
UIATarget.localTarget().frontMostApp().mainWindow().tableViews()[0].cells()[0].tap();
UIATarget.localTarget().frontMostApp().mainWindow().textFields()[0].tap();
writeInElement(UIATarget.localTarget().frontMostApp().mainWindow().textFields()[0], "rxrevolution")

View File

@ -4,7 +4,7 @@ test("----- searchWikipedia -----", function (check, pass) {
var width = UIATarget.localTarget().frontMostApp().mainWindow().rect().size.width
UIATarget.localTarget().frontMostApp().mainWindow().tableViews()[0].cells()[1].tap();
UIATarget.localTarget().frontMostApp().mainWindow().tableViews()[0].cells()[3].tap();
UIATarget.localTarget().frontMostApp().mainWindow().searchBars()[0].searchBars()[0].tap();
writeInElement(UIATarget.localTarget().frontMostApp().mainWindow().searchBars()[0].searchBars()[0], "banana")

View File

@ -7,7 +7,7 @@ test("----- masterDetail -----", function (check, pass) {
}
UIATarget.localTarget().frontMostApp().mainWindow().tableViews()[0].cells()[2].tapWithOptions({tapOffset:{x:0.24, y:0.20}});
UIATarget.localTarget().frontMostApp().mainWindow().tableViews()[0].cells()[1].tap();
UIATarget.localTarget().frontMostApp().navigationBar().rightButton().tap();
UIATarget.localTarget().frontMostApp().mainWindow().dragInsideWithOptions({startOffset:{x:0.93, y:yOffset(300)}, endOffset:{x:0.95, y:yOffset(200)}, duration:1.5});
UIATarget.localTarget().frontMostApp().mainWindow().dragInsideWithOptions({startOffset:{x:0.93, y:yOffset(300)}, endOffset:{x:0.95, y:yOffset(100)}, duration:1.5});

View File

@ -5,7 +5,7 @@
test("----- UIBarButtonItem tap -----", function (check, pass) {
UIATarget.localTarget().frontMostApp().mainWindow().tableViews()[0].cells()[3].tapWithOptions({tapOffset:{x:0.24, y:0.20}});
UIATarget.localTarget().frontMostApp().mainWindow().tableViews()[0].cells()[4]();
UIATarget.localTarget().frontMostApp().navigationBar().rightButton().tap();
@ -21,7 +21,7 @@ test("----- UIBarButtonItem tap -----", function (check, pass) {
test("----- UIBarButtonItem tap -----", function (check, pass) {
UIATarget.localTarget().frontMostApp().mainWindow().tableViews()[0].cells()[3].tapWithOptions({tapOffset:{x:0.24, y:0.20}});
UIATarget.localTarget().frontMostApp().mainWindow().tableViews()[0].cells()[4]();
UIATarget.localTarget().frontMostApp().mainWindow().buttons()["TapMe"].tap();
@ -39,7 +39,7 @@ test("----- UIBarButtonItem tap -----", function (check, pass) {
test("----- UISegmentedControl tap -----", function (check, pass) {
UIATarget.localTarget().frontMostApp().mainWindow().tableViews()[0].cells()[3].tapWithOptions({tapOffset:{x:0.24, y:0.20}});
UIATarget.localTarget().frontMostApp().mainWindow().tableViews()[0].cells()[4]();
UIATarget.localTarget().frontMostApp().mainWindow().segmentedControls()[0].buttons()["Second"].tap();
@ -63,7 +63,7 @@ test("----- UISegmentedControl tap -----", function (check, pass) {
test("----- UISwitch tap -----", function (check, pass) {
UIATarget.localTarget().frontMostApp().mainWindow().tableViews()[0].cells()[3].tapWithOptions({tapOffset:{x:0.24, y:0.20}});
UIATarget.localTarget().frontMostApp().mainWindow().tableViews()[0].cells()[4]();
UIATarget.localTarget().frontMostApp().mainWindow().switches()[0].setValue(0);
@ -87,7 +87,7 @@ test("----- UISwitch tap -----", function (check, pass) {
test("----- UITextField text -----", function (check, pass) {
UIATarget.localTarget().frontMostApp().mainWindow().tableViews()[0].cells()[3].tapWithOptions({tapOffset:{x:0.24, y:0.20}});
UIATarget.localTarget().frontMostApp().mainWindow().tableViews()[0].cells()[4]();
UIATarget.localTarget().frontMostApp().mainWindow().textFields()[0].textFields()[0].tap();
// UIATarget.localTarget().frontMostApp().keyboard().typeString("t");// fails if software keyboard is disabled
@ -107,7 +107,7 @@ test("----- UITextField text -----", function (check, pass) {
test("----- UISlider value -----", function (check, pass) {
UIATarget.localTarget().frontMostApp().mainWindow().tableViews()[0].cells()[3].tapWithOptions({tapOffset:{x:0.24, y:0.20}});
UIATarget.localTarget().frontMostApp().mainWindow().tableViews()[0].cells()[4]();
UIATarget.localTarget().frontMostApp().mainWindow().sliders()[0].dragToValue(0.00);
@ -124,7 +124,7 @@ test("----- UISlider value -----", function (check, pass) {
test("----- UIDatePicker date -----", function (check, pass) {
UIATarget.localTarget().frontMostApp().mainWindow().tableViews()[0].cells()[3].tapWithOptions({tapOffset:{x:0.24, y:0.20}});
UIATarget.localTarget().frontMostApp().mainWindow().tableViews()[0].cells()[4]();
UIATarget.localTarget().frontMostApp().mainWindow().pickers()[0].wheels()[0].tapWithOptions({tapOffset:{x:0.49, y:0.65}});
UIATarget.localTarget().frontMostApp().mainWindow().pickers()[0].wheels()[1].tapWithOptions({tapOffset:{x:0.35, y:0.64}});
@ -143,7 +143,7 @@ test("----- UIDatePicker date -----", function (check, pass) {
test("----- UIActionSheet tap -----", function (check, pass) {
UIATarget.localTarget().frontMostApp().mainWindow().tableViews()[0].cells()[3].tapWithOptions({tapOffset:{x:0.24, y:0.20}});
UIATarget.localTarget().frontMostApp().mainWindow().tableViews()[0].cells()[4]();
UIATarget.localTarget().frontMostApp().mainWindow().buttons()["Open ActionSheet"].tap();
UIATarget.localTarget().frontMostApp().actionSheet().collectionViews()[0].cells()["OK"].buttons()["OK"].tap();
@ -161,7 +161,7 @@ test("----- UIActionSheet tap -----", function (check, pass) {
test("----- UIAlertView tap -----", function (check, pass) {
UIATarget.localTarget().frontMostApp().mainWindow().tableViews()[0].cells()[3].tapWithOptions({tapOffset:{x:0.24, y:0.20}});
UIATarget.localTarget().frontMostApp().mainWindow().tableViews()[0].cells()[4]();
UIATarget.localTarget().onAlert = function(alert){
UIATarget.localTarget().onAlert = null

View File

@ -2,7 +2,7 @@
test("----- reactivePartialUpdates -----", function (check, pass) {
UIATarget.localTarget().frontMostApp().mainWindow().tableViews()[0].cells()[4].tapWithOptions({tapOffset:{x:0.24, y:0.20}});
UIATarget.localTarget().frontMostApp().mainWindow().tableViews()[0].cells()[5].tap();
UIATarget.localTarget().frontMostApp().navigationBar().rightButton().tap();
UIATarget.localTarget().frontMostApp().navigationBar().rightButton().tap();
UIATarget.localTarget().frontMostApp().navigationBar().rightButton().tap();