rufus 0.6 → 0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- OTRkZjc4ZWVmOGQ0ZTAxMDI2NWJmZWQ4NzY0MzQyYTQ2ZDNjM2IzYw==
4
+ YjU3ODRhOWYwMjMxYmQ3MmM2NGZjYWI3YzhhYWYzM2FmZjA3OWZjYw==
5
5
  data.tar.gz: !binary |-
6
- MmU5YjNmNmQ1OTdmNjBlN2NkZTY5MGUxNzBhYTdkODZhNjNhYzAyOA==
6
+ ZDNhNDZhZDAwMGZmYzllNGU1NTI2NTBkOTRkN2ZmOGFiOTcxYmMyYw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZWEzOTc5ZGJkZjU0ZDY1YzgxZjUxYmI4ZDE1NTc5NzNiMDhmODgzMTNmMTAz
10
- OWM0Y2Y5MGE1ZmJmYzNmOWVmZjExZjYwMGVlNmEyMzk0OGJiZmMyYzVlZDNm
11
- MjNmOTI2ODZjNTQ4MTM0YzMzNWY1NTQ5OGE4Yjc3MjQwOTAxMGE=
9
+ YzE0OGFjOTMyMzJkOTczZDYzZjU2ZjkzYmFjMDk1NjQ1Y2UyMmY3ZmVkYmY2
10
+ ZGE1NmYyMGY5MWI4MDNmNDkxZGQ2NDMzODc3NmQyY2M1ZjUxYzEwZmZhNGEy
11
+ MTgwNjk5NzJjMzVlZDk5ZTA0YjE5OGE0MGVmMGI4NjU5MGJkOTI=
12
12
  data.tar.gz: !binary |-
13
- YzQxMTg5MWVhMDNmN2FhZjNlYjgzZjRkOGQ1MjY5MDJlOThmZGIyMTllYTU1
14
- YjJmYTU4ZjU5NGU5YTUxYjU5NzlmMGE0YmYwZGIwZGZiNjNlYWJiMzNiYjY4
15
- NmRkMjUwNDk3MDQxNDQxOGY0ZWJlMGE2ZTJhMjYxNzU0YmJhN2I=
13
+ NjYzZjNiNDVhMjc2MTBkNWFkNjBhY2VmNjRhZjI3NGNhMDFkZGUxM2JhYjVm
14
+ YTg5Zjk4N2I3Njk4MjczMmVjZmY4ZTVhNDkwY2RhNGQzMjkyMWE3OWI5ZDIx
15
+ NzIwZGE5ZjE5YmE5Y2NkZWI1YmI1YTJiMjQ1NWY3NTI2Y2I1NjQ=
@@ -13,6 +13,8 @@
13
13
  B869CCEF1814292E00093724 /* ScrollPageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = B869CCED1814292E00093724 /* ScrollPageViewController.xib */; };
14
14
  B869CCF31814B62800093724 /* TablePageViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B869CCF11814B62800093724 /* TablePageViewController.m */; };
15
15
  B869CCF41814B62800093724 /* TablePageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = B869CCF21814B62800093724 /* TablePageViewController.xib */; };
16
+ B869CD0518175B7500093724 /* LabelAPageViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B869CD0318175B7500093724 /* LabelAPageViewController.m */; };
17
+ B869CD0618175B7500093724 /* LabelAPageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = B869CD0418175B7500093724 /* LabelAPageViewController.xib */; };
16
18
  B88C11DE17BD550E00A62E9D /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B88C11DD17BD550E00A62E9D /* UIKit.framework */; };
17
19
  B88C11E017BD550E00A62E9D /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B88C11DF17BD550E00A62E9D /* Foundation.framework */; };
18
20
  B88C11E217BD550E00A62E9D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B88C11E117BD550E00A62E9D /* CoreGraphics.framework */; };
@@ -59,6 +61,9 @@
59
61
  B869CCF01814B62800093724 /* TablePageViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TablePageViewController.h; sourceTree = "<group>"; };
60
62
  B869CCF11814B62800093724 /* TablePageViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TablePageViewController.m; sourceTree = "<group>"; };
61
63
  B869CCF21814B62800093724 /* TablePageViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = TablePageViewController.xib; sourceTree = "<group>"; };
64
+ B869CD0218175B7500093724 /* LabelAPageViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LabelAPageViewController.h; sourceTree = "<group>"; };
65
+ B869CD0318175B7500093724 /* LabelAPageViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LabelAPageViewController.m; sourceTree = "<group>"; };
66
+ B869CD0418175B7500093724 /* LabelAPageViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = LabelAPageViewController.xib; sourceTree = "<group>"; };
62
67
  B88C11DA17BD550E00A62E9D /* RufusApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RufusApp.app; sourceTree = BUILT_PRODUCTS_DIR; };
63
68
  B88C11DD17BD550E00A62E9D /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
64
69
  B88C11DF17BD550E00A62E9D /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
@@ -228,6 +233,9 @@
228
233
  B869CCF01814B62800093724 /* TablePageViewController.h */,
229
234
  B869CCF11814B62800093724 /* TablePageViewController.m */,
230
235
  B869CCF21814B62800093724 /* TablePageViewController.xib */,
236
+ B869CD0218175B7500093724 /* LabelAPageViewController.h */,
237
+ B869CD0318175B7500093724 /* LabelAPageViewController.m */,
238
+ B869CD0418175B7500093724 /* LabelAPageViewController.xib */,
231
239
  );
232
240
  name = PageObjectControllers;
233
241
  sourceTree = "<group>";
@@ -315,6 +323,7 @@
315
323
  B869CCEF1814292E00093724 /* ScrollPageViewController.xib in Resources */,
316
324
  B8F2F1771802703D0037AD69 /* DisplayedPageViewController.xib in Resources */,
317
325
  B8F2F16C180255FE0037AD69 /* ExistsPageViewController.xib in Resources */,
326
+ B869CD0618175B7500093724 /* LabelAPageViewController.xib in Resources */,
318
327
  B88C121C17BD55BB00A62E9D /* RufusPageViewController.xib in Resources */,
319
328
  );
320
329
  runOnlyForDeploymentPostprocessing = 0;
@@ -355,6 +364,7 @@
355
364
  B869CCF31814B62800093724 /* TablePageViewController.m in Sources */,
356
365
  B88C11EE17BD550E00A62E9D /* RUAppDelegate.m in Sources */,
357
366
  B88C11F717BD550E00A62E9D /* RUViewController.m in Sources */,
367
+ B869CD0518175B7500093724 /* LabelAPageViewController.m in Sources */,
358
368
  B869CCEE1814292E00093724 /* ScrollPageViewController.m in Sources */,
359
369
  B88C121B17BD55BB00A62E9D /* RufusPageViewController.m in Sources */,
360
370
  B8F2F16B180255FE0037AD69 /* ExistsPageViewController.m in Sources */,
@@ -0,0 +1,14 @@
1
+ //
2
+ // LabelAPageViewController.h
3
+ // RufusApp
4
+ //
5
+ // Created by Jeremy Stewart on 10/22/13.
6
+ // Copyright (c) 2013 Northwoods. All rights reserved.
7
+ //
8
+
9
+ #import <UIKit/UIKit.h>
10
+
11
+ @interface LabelAPageViewController : UIViewController
12
+ @property (weak, nonatomic) IBOutlet UILabel *labelALabel;
13
+
14
+ @end
@@ -0,0 +1,38 @@
1
+ //
2
+ // LabelAPageViewController.m
3
+ // RufusApp
4
+ //
5
+ // Created by Jeremy Stewart on 10/22/13.
6
+ // Copyright (c) 2013 Northwoods. All rights reserved.
7
+ //
8
+
9
+ #import "LabelAPageViewController.h"
10
+
11
+ @interface LabelAPageViewController ()
12
+
13
+ @end
14
+
15
+ @implementation LabelAPageViewController
16
+
17
+ - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
18
+ {
19
+ self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
20
+ if (self) {
21
+ // Custom initialization
22
+ }
23
+ return self;
24
+ }
25
+
26
+ - (void)viewDidLoad
27
+ {
28
+ [super viewDidLoad];
29
+ // Do any additional setup after loading the view from its nib.
30
+ }
31
+
32
+ - (void)didReceiveMemoryWarning
33
+ {
34
+ [super didReceiveMemoryWarning];
35
+ // Dispose of any resources that can be recreated.
36
+ }
37
+
38
+ @end
@@ -0,0 +1,29 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <document type="com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB" version="3.0" toolsVersion="4510" systemVersion="12F45" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" useAutolayout="YES">
3
+ <dependencies>
4
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3742"/>
5
+ </dependencies>
6
+ <objects>
7
+ <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="LabelAPageViewController">
8
+ <connections>
9
+ <outlet property="labelALabel" destination="FdH-9q-92f" id="lsY-vN-NTN"/>
10
+ <outlet property="view" destination="2" id="3"/>
11
+ </connections>
12
+ </placeholder>
13
+ <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
14
+ <view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="2">
15
+ <rect key="frame" x="0.0" y="0.0" width="768" height="1004"/>
16
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
17
+ <subviews>
18
+ <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Label A Page" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="FdH-9q-92f">
19
+ <rect key="frame" x="232" y="121" width="320" height="21"/>
20
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
21
+ <fontDescription key="fontDescription" type="system" pointSize="17"/>
22
+ <nil key="highlightedColor"/>
23
+ </label>
24
+ </subviews>
25
+ <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
26
+ <simulatedStatusBarMetrics key="simulatedStatusBarMetrics" statusBarStyle="lightContent"/>
27
+ </view>
28
+ </objects>
29
+ </document>
@@ -7,6 +7,7 @@
7
7
  //
8
8
 
9
9
  #import "TablePageViewController.h"
10
+ #import "LabelAPageViewController.h"
10
11
 
11
12
  @interface TablePageViewController ()
12
13
 
@@ -19,8 +20,8 @@
19
20
  {
20
21
  self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
21
22
  if (self) {
23
+
22
24
  labels = [self makeLabels];
23
-
24
25
  }
25
26
  return self;
26
27
  }
@@ -45,19 +46,31 @@
45
46
 
46
47
  -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
47
48
  {
48
- UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"Cell"];
49
- if (!cell) {
50
- cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"Cell"];
51
- }
52
- NSLog(@"%@", [tableView accessibilityLabel]);
49
+
50
+ UITableViewCell *cell = nil;
53
51
 
54
52
  if ([[tableView accessibilityLabel] isEqualToString:[ascending accessibilityLabel]]) {
53
+ cell = [tableView dequeueReusableCellWithIdentifier:@"Ascending"];
54
+ if (!cell) {
55
+ cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"Ascending"];
56
+ }
55
57
  UILabel *text = [labels objectAtIndex:[indexPath row]];
56
58
  [[cell textLabel] setText:[text text]];
57
59
  } else if ([[tableView accessibilityLabel] isEqualToString:[descending accessibilityLabel]]) {
60
+ cell = [tableView dequeueReusableCellWithIdentifier:@"Descending"];
61
+ if (!cell) {
62
+ cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"Descending"];
63
+ }
64
+
58
65
  UILabel *text = [labels objectAtIndex:([labels count] - 1) - [indexPath row]];
59
66
  [[cell textLabel] setText:[text text]];
60
67
  } else {
68
+ cell = [tableView dequeueReusableCellWithIdentifier:@"Unsorted"];
69
+ if (!cell) {
70
+ cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"Unsorted"];
71
+ }
72
+
73
+
61
74
  if ([indexPath row] % 2 == 0) {
62
75
  [[cell textLabel] setText:@"x"];
63
76
  } else {
@@ -69,6 +82,19 @@
69
82
  return cell;
70
83
  }
71
84
 
85
+
86
+
87
+ -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
88
+ {
89
+ UILabel *label = [labels objectAtIndex:[indexPath row]];
90
+ NSLog(@"Index Path row %d", [indexPath row]);
91
+ NSLog(@"Label text is: %@", [label text]);
92
+ if ([[label text] isEqualToString:@"a"]) {
93
+ LabelAPageViewController *labelAPageViewController = [[LabelAPageViewController alloc] init];
94
+ [[self navigationController] pushViewController:labelAPageViewController animated:YES];
95
+ }
96
+ }
97
+
72
98
  -(NSArray *) makeLabels
73
99
  {
74
100
 
@@ -105,4 +131,6 @@
105
131
  }
106
132
 
107
133
 
134
+ - (IBAction)toButtonTables:(id)sender {
135
+ }
108
136
  @end
@@ -1,12 +1,12 @@
1
1
  <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
- <document type="com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB" version="3.0" toolsVersion="4510" systemVersion="12F45" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" useAutolayout="YES">
2
+ <document type="com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB" version="3.0" toolsVersion="4510" systemVersion="12F45" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none">
3
3
  <dependencies>
4
4
  <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3742"/>
5
5
  </dependencies>
6
6
  <objects>
7
7
  <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="TablePageViewController">
8
8
  <connections>
9
- <outlet property="ascending" destination="kZD-bA-3M9" id="9YH-ox-6m4"/>
9
+ <outlet property="ascending" destination="zsU-Kt-7ug" id="HVS-dR-COH"/>
10
10
  <outlet property="descending" destination="bFd-cR-AnT" id="eBV-Hh-9s9"/>
11
11
  <outlet property="notSorted" destination="uNl-JB-Y7y" id="qUm-f4-Dvn"/>
12
12
  <outlet property="sortedLabel" destination="y3W-to-ma5" id="BFf-Dd-ctn"/>
@@ -19,31 +19,22 @@
19
19
  <rect key="frame" x="0.0" y="0.0" width="768" height="1004"/>
20
20
  <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
21
21
  <subviews>
22
- <tableView clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" alwaysBounceVertical="YES" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" translatesAutoresizingMaskIntoConstraints="NO" id="kZD-bA-3M9">
23
- <rect key="frame" x="42" y="162" width="150" height="467"/>
24
- <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
25
- <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
26
- <connections>
27
- <outlet property="dataSource" destination="-1" id="LFA-Si-hjw"/>
28
- <outlet property="delegate" destination="-1" id="mZE-tT-AJ1"/>
29
- </connections>
30
- </tableView>
31
- <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Ascending" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="y3W-to-ma5">
22
+ <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Ascending" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="y3W-to-ma5">
32
23
  <rect key="frame" x="69" y="114" width="81" height="21"/>
33
24
  <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
34
25
  <fontDescription key="fontDescription" type="system" pointSize="17"/>
35
26
  <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
36
27
  <nil key="highlightedColor"/>
37
28
  </label>
38
- <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Unsorted" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="SsI-ER-Hih">
29
+ <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Unsorted" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="SsI-ER-Hih">
39
30
  <rect key="frame" x="294" y="114" width="71" height="21"/>
40
31
  <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
41
32
  <fontDescription key="fontDescription" type="system" pointSize="17"/>
42
33
  <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
43
34
  <nil key="highlightedColor"/>
44
35
  </label>
45
- <tableView clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" alwaysBounceVertical="YES" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" translatesAutoresizingMaskIntoConstraints="NO" id="bFd-cR-AnT">
46
- <rect key="frame" x="503" y="162" width="150" height="467"/>
36
+ <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="bFd-cR-AnT">
37
+ <rect key="frame" x="503" y="162" width="150" height="460"/>
47
38
  <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
48
39
  <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
49
40
  <connections>
@@ -51,14 +42,14 @@
51
42
  <outlet property="delegate" destination="-1" id="Yuo-gb-oXe"/>
52
43
  </connections>
53
44
  </tableView>
54
- <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Descending" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="D79-jP-phq">
45
+ <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Descending" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="D79-jP-phq">
55
46
  <rect key="frame" x="543" y="114" width="92" height="21"/>
56
47
  <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
57
48
  <fontDescription key="fontDescription" type="system" pointSize="17"/>
58
49
  <nil key="highlightedColor"/>
59
50
  </label>
60
- <tableView clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" alwaysBounceVertical="YES" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" translatesAutoresizingMaskIntoConstraints="NO" id="uNl-JB-Y7y">
61
- <rect key="frame" x="227" y="166" width="228" height="460"/>
51
+ <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="uNl-JB-Y7y">
52
+ <rect key="frame" x="227" y="162" width="228" height="460"/>
62
53
  <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
63
54
  <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
64
55
  <connections>
@@ -66,6 +57,15 @@
66
57
  <outlet property="delegate" destination="-1" id="LLv-JY-nfq"/>
67
58
  </connections>
68
59
  </tableView>
60
+ <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="zsU-Kt-7ug">
61
+ <rect key="frame" x="53" y="162" width="150" height="460"/>
62
+ <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
63
+ <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
64
+ <connections>
65
+ <outlet property="dataSource" destination="-1" id="Cea-CZ-u8X"/>
66
+ <outlet property="delegate" destination="-1" id="9mT-IH-0ks"/>
67
+ </connections>
68
+ </tableView>
69
69
  </subviews>
70
70
  <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
71
71
  <accessibility key="accessibilityConfiguration" label="tableView"/>
@@ -14,9 +14,13 @@ Feature: Interacting with a view
14
14
  When I rotate the app to "landscape"
15
15
  And I rotate the app to "portrait"
16
16
  Then the app is in the "portrait" orientation
17
- @sending
17
+
18
18
  Scenario: Typing into a text field
19
19
  Given I am on the "HomePage"
20
20
  When I type "BooYah" into the text field defined "text_box"
21
21
  Then the view marked "text_box" has the text "BooYah"
22
22
 
23
+ Scenario: Taking a screenshot
24
+ Given I have created a valid appium driver for iOS
25
+ When I take a screenshot called "coolShot.png"
26
+ Then then the file "coolShot.png" exists
@@ -22,4 +22,10 @@ When(/^I type "([^"]*)" into the text field defined "([^"]*)"$/) do |keys, which
22
22
  end
23
23
  Then(/^the view marked "([^"]*)" has the text "([^"]*)"$/) do |which, keys|
24
24
  on(HomePage).send("view_#{which}_view").text.should eq keys
25
+ end
26
+ When(/^I take a screenshot called "([^"]*)"$/) do |name|
27
+ $driver.screenshot name
28
+ end
29
+ Then(/^then the file "([^"]*)" exists$/) do |name|
30
+ File.exists?(name).should be_true
25
31
  end
@@ -11,4 +11,10 @@ Then(/^I can see all the children for the view defined "([^"]*)"$/) do |which|
11
11
  children[5].attribute('name').should eq 'c'
12
12
  children[6].attribute('name').should eq 'd'
13
13
  children[7].attribute('name').should eq 'e'
14
+ end
15
+ Given(/^I select index "([^"]*)" of the "([^"]*)" table$/) do |index, table|
16
+ on(TablePage).send("view_#{table}_view").click_on index.to_i
17
+ end
18
+ Given(/^I select the label "([^"]*)" in the "([^"]*)" table$/) do |which, table|
19
+ on(TablePage).send("view_#{table}_view").click_on which
14
20
  end
@@ -5,6 +5,7 @@ Before do
5
5
  end
6
6
 
7
7
  After do
8
+ `rm coolShot.png` if File.exists? 'coolShot.png'
8
9
  $driver = nil
9
10
  sleep 2
10
11
  end
@@ -0,0 +1,11 @@
1
+ require 'rufus'
2
+
3
+ class LabelAPage
4
+ include Rufus
5
+
6
+ label(:view_a, :name => 'Label A Page')
7
+
8
+ def active?
9
+ exists_after_wait? view_a_view
10
+ end
11
+ end
@@ -10,4 +10,12 @@ Feature: dealing with tables
10
10
  And I see the table defined "unsorted" is not sorted
11
11
 
12
12
  Scenario: Getting the child elements
13
- Then I can see all the children for the view defined "ascending"
13
+ Then I can see all the children for the view defined "ascending"
14
+
15
+ Scenario: Selecting an item by index
16
+ Given I select index "4" of the "ascending" table
17
+ Then I am on the "LabelAPage"
18
+
19
+ Scenario: Selecting and item by label
20
+ Given I select the label "a" in the "ascending" table
21
+ Then I am on the "LabelAPage"
@@ -19,6 +19,15 @@ module Rufus
19
19
  def sorted_descending?
20
20
  descending? children
21
21
  end
22
+ #start with this method
23
+ def click_on(what)
24
+ if what.is_a? Integer
25
+ child_elements = children
26
+ child_elements[what - 1].click if what - 1 <= child_elements.count
27
+ else
28
+ click_label what
29
+ end
30
+ end
22
31
 
23
32
  private
24
33
 
@@ -44,6 +53,12 @@ module Rufus
44
53
  elements.map{|element| element.attribute 'name'}
45
54
  end
46
55
 
56
+ def click_label(which)
57
+ children.each do |child|
58
+ child.click if child.attribute('name').eql? which
59
+ end
60
+ end
61
+
47
62
  end
48
63
  end
49
64
  end
@@ -172,6 +172,10 @@ module Rufus
172
172
  driver.execute_script 'mobile: scrollTo', {'element' => id}
173
173
  end
174
174
 
175
+ def screenshot(name)
176
+ driver.save_screenshot name
177
+ end
178
+
175
179
  private
176
180
 
177
181
  def url(config)
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |gem|
2
2
  gem.name = "rufus"
3
- gem.version = "0.6"
3
+ gem.version = "0.7"
4
4
  gem.authors = ["Jeremy Stewart"]
5
5
  gem.email = ["jlstewart379@gmail.com"]
6
6
  gem.description = "Page object wrapper for Appium"
@@ -336,6 +336,12 @@ describe Rufus::Driver do
336
336
  @driver.page_source.should eq("some page data")
337
337
  end
338
338
 
339
+ it 'can take a screenshot of the page' do
340
+ Rufus::Drivers::IOS_Simulator.should_receive(:for).with(@config, url).and_return(mock_driver)
341
+ mock_driver.should_receive(:save_screenshot).with('theShot.png')
342
+ @driver.screenshot 'theShot.png'
343
+ end
344
+
339
345
  context 'getting element lists by class' do
340
346
 
341
347
  let(:mock_list){'a mock list of elements'}
@@ -30,5 +30,22 @@ describe Rufus::Accessors::Table do
30
30
  table.sorted?.should be_true
31
31
  end
32
32
  end
33
+
34
+ context 'selecting elements' do
35
+
36
+ let(:mock_element){'some element'}
37
+
38
+ it 'can select a table item by index' do
39
+ mock_child_elements.should_receive(:[]).with(1).and_return(mock_element)
40
+ mock_child_elements.should_receive(:count).and_return(1)
41
+ mock_element.should_receive(:click)
42
+ table.click_on 2
43
+ end
44
+
45
+ it 'can select a table item by label' do
46
+ mock_child_elements.should_receive(:each)
47
+ table.click_on 'labelName'
48
+ end
49
+ end
33
50
  end
34
51
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rufus
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.6'
4
+ version: '0.7'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Stewart
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-22 00:00:00.000000000 Z
11
+ date: 2013-10-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: page_navigation
@@ -295,6 +295,9 @@ files:
295
295
  - RufusApp/RufusApp/Frank/Frankified_build/Applications/RufusApp.app/embedded.mobileprovision
296
296
  - RufusApp/RufusApp/Frank/Frankified_build/Applications/RufusApp.app/en.lproj/InfoPlist.strings
297
297
  - RufusApp/RufusApp/Frank/Frankified_build/Applications/RufusApp.app/en.lproj/RUViewController.nib
298
+ - RufusApp/RufusApp/LabelAPageViewController.h
299
+ - RufusApp/RufusApp/LabelAPageViewController.m
300
+ - RufusApp/RufusApp/LabelAPageViewController.xib
298
301
  - RufusApp/RufusApp/RUAppDelegate.h
299
302
  - RufusApp/RufusApp/RUAppDelegate.m
300
303
  - RufusApp/RufusApp/RUViewController.h
@@ -339,6 +342,7 @@ files:
339
342
  - features/support/screens/enabled_page.rb
340
343
  - features/support/screens/exists_page.rb
341
344
  - features/support/screens/home_page.rb
345
+ - features/support/screens/label_a_page.rb
342
346
  - features/support/screens/rufus_page.rb
343
347
  - features/support/screens/scroll_page.rb
344
348
  - features/support/screens/table_page.rb