iCuke 0.4.12 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (114) hide show
  1. data/Rakefile +3 -3
  2. data/VERSION +1 -1
  3. data/app/AlertsViewController.h +59 -0
  4. data/app/AlertsViewController.m +341 -0
  5. data/app/AppDelegate.h +60 -0
  6. data/app/AppDelegate.m +101 -0
  7. data/app/ButtonsViewController.h +80 -0
  8. data/app/ButtonsViewController.m +448 -0
  9. data/app/Constants.h +58 -0
  10. data/app/ControlsViewController.h +72 -0
  11. data/app/ControlsViewController.m +379 -0
  12. data/app/ImagesViewController.h +62 -0
  13. data/app/ImagesViewController.m +137 -0
  14. data/app/{iCuke/iCuke-Info.plist → Info.plist} +4 -4
  15. data/app/MainViewController.h +57 -0
  16. data/app/MainViewController.m +262 -0
  17. data/app/Picker/CustomPickerDataSource.h +55 -0
  18. data/app/Picker/CustomPickerDataSource.m +135 -0
  19. data/app/Picker/CustomView.h +62 -0
  20. data/app/Picker/CustomView.m +119 -0
  21. data/app/PickerViewController.h +88 -0
  22. data/app/PickerViewController.m +402 -0
  23. data/app/Prefix.pch +5 -0
  24. data/app/ReadMe.txt +82 -0
  25. data/app/SearchBarController.h +58 -0
  26. data/app/SearchBarController.m +105 -0
  27. data/app/SegmentViewController.h +54 -0
  28. data/app/SegmentViewController.m +195 -0
  29. data/app/TextFieldController.h +67 -0
  30. data/app/TextFieldController.m +342 -0
  31. data/app/TextViewController.h +57 -0
  32. data/app/TextViewController.m +164 -0
  33. data/app/ToolbarViewController.h +74 -0
  34. data/app/ToolbarViewController.m +303 -0
  35. data/app/TransitionViewController.h +64 -0
  36. data/app/TransitionViewController.m +178 -0
  37. data/app/UICatalog.xcodeproj/project.pbxproj +615 -0
  38. data/app/WebViewController.h +57 -0
  39. data/app/WebViewController.m +173 -0
  40. data/app/en.lproj/AlertsViewController.xib +144 -0
  41. data/app/en.lproj/ButtonsViewController.xib +147 -0
  42. data/app/en.lproj/ControlsViewController.xib +147 -0
  43. data/app/en.lproj/ImagesViewController.xib +264 -0
  44. data/app/en.lproj/Localizable.strings +41 -0
  45. data/app/en.lproj/MainWindow.xib +306 -0
  46. data/app/en.lproj/PickerViewController.xib +415 -0
  47. data/app/en.lproj/SearchBarController.xib +142 -0
  48. data/app/en.lproj/SegmentViewController.xib +143 -0
  49. data/app/en.lproj/TextFieldController.xib +167 -0
  50. data/app/en.lproj/TextViewController.xib +149 -0
  51. data/app/en.lproj/ToolbarViewController.xib +491 -0
  52. data/app/en.lproj/TransitionViewController.xib +255 -0
  53. data/app/en.lproj/WebViewController.xib +141 -0
  54. data/app/images/12-6AM.png +0 -0
  55. data/app/images/12-6PM.png +0 -0
  56. data/app/images/6-12AM.png +0 -0
  57. data/app/images/6-12PM.png +0 -0
  58. data/app/images/Default.png +0 -0
  59. data/app/images/Icon.png +0 -0
  60. data/app/images/UIButton_custom.png +0 -0
  61. data/app/images/blueButton.png +0 -0
  62. data/app/images/orangeslide.png +0 -0
  63. data/app/images/scene1.jpg +0 -0
  64. data/app/images/scene2.jpg +0 -0
  65. data/app/images/scene3.jpg +0 -0
  66. data/app/images/scene4.jpg +0 -0
  67. data/app/images/scene5.jpg +0 -0
  68. data/app/images/segment_check.png +0 -0
  69. data/app/images/segment_search.png +0 -0
  70. data/app/images/segment_tools.png +0 -0
  71. data/app/images/slider_ball.png +0 -0
  72. data/app/images/whiteButton.png +0 -0
  73. data/app/images/yellowslide.png +0 -0
  74. data/app/main.m +58 -0
  75. data/ext/iCuke/DefaultsResponse.m +0 -1
  76. data/ext/iCuke/EventResponse.m +9 -1
  77. data/ext/iCuke/Rakefile +1 -1
  78. data/ext/iCuke/Recorder.h +3 -1
  79. data/ext/iCuke/Recorder.m +10 -5
  80. data/ext/iCuke/RecorderResponse.h +1 -0
  81. data/ext/iCuke/RecorderResponse.m +10 -1
  82. data/ext/iCuke/Viewer.m +5 -6
  83. data/ext/iCuke/iCukeHTTPServer.m +1 -1
  84. data/ext/iCuke/iCukeServer.m +24 -7
  85. data/ext/iCuke/libicuke.dylib +0 -0
  86. data/features/uicatalog.feature +20 -0
  87. data/iCuke.gemspec +81 -24
  88. data/lib/icuke/com.apple.Accessibility.plist +0 -0
  89. data/lib/icuke/core_ext.rb +26 -0
  90. data/lib/icuke/cucumber.rb +20 -12
  91. data/lib/icuke/headless.rb +55 -0
  92. data/lib/icuke/simulator.rb +7 -129
  93. data/lib/icuke/xcode.rb +136 -0
  94. metadata +82 -25
  95. data/app/iCuke/Classes/FlipsideView.h +0 -13
  96. data/app/iCuke/Classes/FlipsideView.m +0 -32
  97. data/app/iCuke/Classes/FlipsideViewController.h +0 -25
  98. data/app/iCuke/Classes/FlipsideViewController.m +0 -54
  99. data/app/iCuke/Classes/MainView.h +0 -15
  100. data/app/iCuke/Classes/MainView.m +0 -32
  101. data/app/iCuke/Classes/MainViewController.h +0 -16
  102. data/app/iCuke/Classes/MainViewController.m +0 -86
  103. data/app/iCuke/Classes/iCukeAppDelegate.h +0 -20
  104. data/app/iCuke/Classes/iCukeAppDelegate.m +0 -33
  105. data/app/iCuke/FlipsideView.xib +0 -444
  106. data/app/iCuke/MainView.xib +0 -520
  107. data/app/iCuke/MainWindow.xib +0 -355
  108. data/app/iCuke/SniffingView.h +0 -20
  109. data/app/iCuke/SniffingView.m +0 -191
  110. data/app/iCuke/iCuke.xcodeproj/project.pbxproj +0 -313
  111. data/app/iCuke/iCuke_Prefix.pch +0 -14
  112. data/app/iCuke/main.m +0 -16
  113. data/features/icuke.feature +0 -17
  114. /data/app/{iCuke/.gitignore → .gitignore} +0 -0
@@ -0,0 +1,136 @@
1
+ require 'appscript'
2
+ require 'timeout'
3
+
4
+ module ICuke
5
+ class XCode
6
+ def self.app
7
+ @app ||= Appscript.app('Xcode.app')
8
+ end
9
+
10
+ def self.open_project(project_file)
11
+ unless open_project?(project_file)
12
+ app.launch
13
+ app.open project_file
14
+ end
15
+ app.active_project_document.project
16
+ end
17
+
18
+ def self.open_project?(project_file)
19
+ running? and
20
+ app.active_project_document.get and
21
+ app.active_project_document.project.path.get == project_file
22
+ end
23
+
24
+ def self.interface
25
+ Appscript.app('System Events').application_processes['Xcode']
26
+ end
27
+
28
+ def self.running?
29
+ app.is_running?
30
+ end
31
+
32
+ def self.quit
33
+ IPhoneSimulator.quit
34
+ app.quit if running?
35
+ sleep(0.2) until !running?
36
+ end
37
+
38
+ def self.status
39
+ interface.windows[1].static_texts[0].value.get
40
+ end
41
+
42
+ def self.launched_app?
43
+ status =~ /launched$/
44
+ end
45
+
46
+ def self.installing_app?
47
+ status =~ /^Installing/
48
+ end
49
+
50
+ def self.with_settings(project, settings, &block)
51
+ initial_settings = {}
52
+
53
+ settings.each_key { |setting| initial_settings[setting] = project.send(setting).get }
54
+ settings.each_pair do |setting, value|
55
+ project.send(setting).set value
56
+ end
57
+
58
+ yield
59
+ ensure
60
+ initial_settings.each_pair do |setting, value|
61
+ project.send(setting).set value
62
+ end if running?
63
+ end
64
+ end
65
+
66
+ class IPhoneSimulator
67
+ def self.app
68
+ @app ||= Appscript.app('iPhone Simulator.app')
69
+ end
70
+
71
+ def self.quit
72
+ app.quit if running?
73
+ sleep(0.2) until !running?
74
+ end
75
+
76
+ def self.running?
77
+ app.is_running?
78
+ end
79
+ end
80
+
81
+ class Simulator
82
+ include Timeout
83
+
84
+ def launch(project_file, options = {})
85
+ options = {
86
+ :target => nil,
87
+ :configuration => 'Debug'
88
+ }.merge(options)
89
+
90
+ # If we don't kill the simulator first the rest of this function becomes
91
+ # a no-op and we don't land on the applications first page
92
+ IPhoneSimulator.quit
93
+
94
+ begin
95
+ project = XCode.open_project(project_file)
96
+
97
+ settings = {
98
+ :active_build_configuration_type => project.build_configuration_types[options[:configuration]]
99
+ }
100
+ if options[:target]
101
+ settings[:active_target] = project.targets[options[:target]]
102
+ end
103
+
104
+ XCode.with_settings(project, settings) do
105
+ executable = project.active_executable.get
106
+ options[:env].each_pair do |name, value|
107
+ executable.make :new => :environment_variable,
108
+ :with_properties => { :name => name, :value => value, :active => true }
109
+ end
110
+
111
+ project.launch_
112
+
113
+ sleep(0.5) while XCode.installing_app?
114
+
115
+ unless XCode.launched_app?
116
+ XCode.quit
117
+ retry
118
+ end
119
+
120
+ timeout(30) do
121
+ begin
122
+ view
123
+ rescue Errno::ECONNREFUSED
124
+ sleep(0.5)
125
+ retry
126
+ end
127
+ end
128
+ end
129
+ end
130
+ end
131
+
132
+ def quit
133
+ IPhoneSimulator.quit
134
+ end
135
+ end
136
+ end
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 4
8
- - 12
9
- version: 0.4.12
7
+ - 5
8
+ - 1
9
+ version: 0.5.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Rob Holland
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-04-23 00:00:00 +01:00
17
+ date: 2010-05-11 00:00:00 +01:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -81,26 +81,79 @@ files:
81
81
  - README.rdoc
82
82
  - Rakefile
83
83
  - VERSION
84
- - app/iCuke/.gitignore
85
- - app/iCuke/Classes/FlipsideView.h
86
- - app/iCuke/Classes/FlipsideView.m
87
- - app/iCuke/Classes/FlipsideViewController.h
88
- - app/iCuke/Classes/FlipsideViewController.m
89
- - app/iCuke/Classes/MainView.h
90
- - app/iCuke/Classes/MainView.m
91
- - app/iCuke/Classes/MainViewController.h
92
- - app/iCuke/Classes/MainViewController.m
93
- - app/iCuke/Classes/iCukeAppDelegate.h
94
- - app/iCuke/Classes/iCukeAppDelegate.m
95
- - app/iCuke/FlipsideView.xib
96
- - app/iCuke/MainView.xib
97
- - app/iCuke/MainWindow.xib
98
- - app/iCuke/SniffingView.h
99
- - app/iCuke/SniffingView.m
100
- - app/iCuke/iCuke-Info.plist
101
- - app/iCuke/iCuke.xcodeproj/project.pbxproj
102
- - app/iCuke/iCuke_Prefix.pch
103
- - app/iCuke/main.m
84
+ - app/.gitignore
85
+ - app/AlertsViewController.h
86
+ - app/AlertsViewController.m
87
+ - app/AppDelegate.h
88
+ - app/AppDelegate.m
89
+ - app/ButtonsViewController.h
90
+ - app/ButtonsViewController.m
91
+ - app/Constants.h
92
+ - app/ControlsViewController.h
93
+ - app/ControlsViewController.m
94
+ - app/ImagesViewController.h
95
+ - app/ImagesViewController.m
96
+ - app/Info.plist
97
+ - app/MainViewController.h
98
+ - app/MainViewController.m
99
+ - app/Picker/CustomPickerDataSource.h
100
+ - app/Picker/CustomPickerDataSource.m
101
+ - app/Picker/CustomView.h
102
+ - app/Picker/CustomView.m
103
+ - app/PickerViewController.h
104
+ - app/PickerViewController.m
105
+ - app/Prefix.pch
106
+ - app/ReadMe.txt
107
+ - app/SearchBarController.h
108
+ - app/SearchBarController.m
109
+ - app/SegmentViewController.h
110
+ - app/SegmentViewController.m
111
+ - app/TextFieldController.h
112
+ - app/TextFieldController.m
113
+ - app/TextViewController.h
114
+ - app/TextViewController.m
115
+ - app/ToolbarViewController.h
116
+ - app/ToolbarViewController.m
117
+ - app/TransitionViewController.h
118
+ - app/TransitionViewController.m
119
+ - app/UICatalog.xcodeproj/project.pbxproj
120
+ - app/WebViewController.h
121
+ - app/WebViewController.m
122
+ - app/en.lproj/AlertsViewController.xib
123
+ - app/en.lproj/ButtonsViewController.xib
124
+ - app/en.lproj/ControlsViewController.xib
125
+ - app/en.lproj/ImagesViewController.xib
126
+ - app/en.lproj/Localizable.strings
127
+ - app/en.lproj/MainWindow.xib
128
+ - app/en.lproj/PickerViewController.xib
129
+ - app/en.lproj/SearchBarController.xib
130
+ - app/en.lproj/SegmentViewController.xib
131
+ - app/en.lproj/TextFieldController.xib
132
+ - app/en.lproj/TextViewController.xib
133
+ - app/en.lproj/ToolbarViewController.xib
134
+ - app/en.lproj/TransitionViewController.xib
135
+ - app/en.lproj/WebViewController.xib
136
+ - app/images/12-6AM.png
137
+ - app/images/12-6PM.png
138
+ - app/images/6-12AM.png
139
+ - app/images/6-12PM.png
140
+ - app/images/Default.png
141
+ - app/images/Icon.png
142
+ - app/images/UIButton_custom.png
143
+ - app/images/blueButton.png
144
+ - app/images/orangeslide.png
145
+ - app/images/scene1.jpg
146
+ - app/images/scene2.jpg
147
+ - app/images/scene3.jpg
148
+ - app/images/scene4.jpg
149
+ - app/images/scene5.jpg
150
+ - app/images/segment_check.png
151
+ - app/images/segment_search.png
152
+ - app/images/segment_tools.png
153
+ - app/images/slider_ball.png
154
+ - app/images/whiteButton.png
155
+ - app/images/yellowslide.png
156
+ - app/main.m
104
157
  - ext/iCuke/.gitignore
105
158
  - ext/iCuke/DefaultsResponse.h
106
159
  - ext/iCuke/DefaultsResponse.m
@@ -136,13 +189,17 @@ files:
136
189
  - ext/iCuke/json/SBJsonWriter.h
137
190
  - ext/iCuke/json/SBJsonWriter.m
138
191
  - ext/iCuke/libicuke.dylib
139
- - features/icuke.feature
140
192
  - features/support/env.rb
193
+ - features/uicatalog.feature
141
194
  - iCuke.gemspec
142
195
  - lib/icuke.rb
196
+ - lib/icuke/com.apple.Accessibility.plist
197
+ - lib/icuke/core_ext.rb
143
198
  - lib/icuke/cucumber.rb
199
+ - lib/icuke/headless.rb
144
200
  - lib/icuke/simulate.rb
145
201
  - lib/icuke/simulator.rb
202
+ - lib/icuke/xcode.rb
146
203
  has_rdoc: true
147
204
  homepage: http://github.com/unboxed/iCuke
148
205
  licenses: []
@@ -1,13 +0,0 @@
1
- //
2
- // FlipsideView.h
3
- // iCuke
4
- //
5
- // Created by Rob Holland on 02/03/2010.
6
- // Copyright The IT Refinery 2010. All rights reserved.
7
- //
8
-
9
- @interface FlipsideView : UIView {
10
-
11
- }
12
-
13
- @end
@@ -1,32 +0,0 @@
1
- //
2
- // FlipsideView.m
3
- // iCuke
4
- //
5
- // Created by Rob Holland on 02/03/2010.
6
- // Copyright The IT Refinery 2010. All rights reserved.
7
- //
8
-
9
- #import "FlipsideView.h"
10
-
11
- @implementation FlipsideView
12
-
13
-
14
- - (id)initWithFrame:(CGRect)frame {
15
- if (self = [super initWithFrame:frame]) {
16
- // Initialization code
17
- }
18
- return self;
19
- }
20
-
21
-
22
- - (void)drawRect:(CGRect)rect {
23
- // Drawing code
24
- }
25
-
26
-
27
- - (void)dealloc {
28
- [super dealloc];
29
- }
30
-
31
-
32
- @end
@@ -1,25 +0,0 @@
1
- //
2
- // FlipsideViewController.h
3
- // iCuke
4
- //
5
- // Created by Rob Holland on 02/03/2010.
6
- // Copyright The IT Refinery 2010. All rights reserved.
7
- //
8
-
9
- @protocol FlipsideViewControllerDelegate;
10
-
11
-
12
- @interface FlipsideViewController : UIViewController {
13
- id <FlipsideViewControllerDelegate> delegate;
14
- }
15
-
16
- @property (nonatomic, assign) id <FlipsideViewControllerDelegate> delegate;
17
- - (IBAction)done;
18
-
19
- @end
20
-
21
-
22
- @protocol FlipsideViewControllerDelegate
23
- - (void)flipsideViewControllerDidFinish:(FlipsideViewController *)controller;
24
- @end
25
-
@@ -1,54 +0,0 @@
1
- //
2
- // FlipsideViewController.m
3
- // iCuke
4
- //
5
- // Created by Rob Holland on 02/03/2010.
6
- // Copyright The IT Refinery 2010. All rights reserved.
7
- //
8
-
9
- #import "FlipsideViewController.h"
10
-
11
-
12
- @implementation FlipsideViewController
13
-
14
- @synthesize delegate;
15
-
16
-
17
- - (void)viewDidLoad {
18
- [super viewDidLoad];
19
- self.view.backgroundColor = [UIColor viewFlipsideBackgroundColor];
20
- }
21
-
22
-
23
- - (IBAction)done {
24
- [self.delegate flipsideViewControllerDidFinish:self];
25
- }
26
-
27
-
28
- /*
29
- // Override to allow orientations other than the default portrait orientation.
30
- - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
31
- // Return YES for supported orientations
32
- return (interfaceOrientation == UIInterfaceOrientationPortrait);
33
- }
34
- */
35
-
36
- - (void)didReceiveMemoryWarning {
37
- // Releases the view if it doesn't have a superview.
38
- [super didReceiveMemoryWarning];
39
-
40
- // Release any cached data, images, etc that aren't in use.
41
- }
42
-
43
- - (void)viewDidUnload {
44
- // Release any retained subviews of the main view.
45
- // e.g. self.myOutlet = nil;
46
- }
47
-
48
-
49
- - (void)dealloc {
50
- [super dealloc];
51
- }
52
-
53
-
54
- @end
@@ -1,15 +0,0 @@
1
- //
2
- // MainView.h
3
- // iCuke
4
- //
5
- // Created by Rob Holland on 02/03/2010.
6
- // Copyright The IT Refinery 2010. All rights reserved.
7
- //
8
-
9
- #import <UIKit/UIKit.h>
10
-
11
- @interface MainView : UIView {
12
-
13
- }
14
-
15
- @end
@@ -1,32 +0,0 @@
1
- //
2
- // MainView.m
3
- // iCuke
4
- //
5
- // Created by Rob Holland on 02/03/2010.
6
- // Copyright The IT Refinery 2010. All rights reserved.
7
- //
8
-
9
- #import "MainView.h"
10
-
11
- @implementation MainView
12
-
13
-
14
- - (id)initWithFrame:(CGRect)frame {
15
- if (self = [super initWithFrame:frame]) {
16
- // Initialization code
17
- }
18
- return self;
19
- }
20
-
21
-
22
- - (void)drawRect:(CGRect)rect {
23
- // Drawing code
24
- }
25
-
26
-
27
- - (void)dealloc {
28
- [super dealloc];
29
- }
30
-
31
-
32
- @end
@@ -1,16 +0,0 @@
1
- //
2
- // MainViewController.h
3
- // iCuke
4
- //
5
- // Created by Rob Holland on 02/03/2010.
6
- // Copyright The IT Refinery 2010. All rights reserved.
7
- //
8
-
9
- #import "FlipsideViewController.h"
10
-
11
- @interface MainViewController : UIViewController <FlipsideViewControllerDelegate> {
12
- }
13
-
14
- - (IBAction)showInfo;
15
-
16
- @end
@@ -1,86 +0,0 @@
1
- //
2
- // MainViewController.m
3
- // iCuke
4
- //
5
- // Created by Rob Holland on 02/03/2010.
6
- // Copyright The IT Refinery 2010. All rights reserved.
7
- //
8
-
9
- #import "MainViewController.h"
10
- #import "MainView.h"
11
-
12
-
13
- @implementation MainViewController
14
-
15
-
16
- - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
17
- if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {
18
- // Custom initialization
19
- }
20
- return self;
21
- }
22
-
23
-
24
- /*
25
- // Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
26
- - (void)viewDidLoad {
27
- [super viewDidLoad];
28
- }
29
- */
30
-
31
-
32
- /*
33
- // Override to allow orientations other than the default portrait orientation.
34
- - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
35
- // Return YES for supported orientations
36
- return (interfaceOrientation == UIInterfaceOrientationPortrait);
37
- }
38
- */
39
-
40
-
41
- - (void)flipsideViewControllerDidFinish:(FlipsideViewController *)controller {
42
-
43
- [self dismissModalViewControllerAnimated:YES];
44
- }
45
-
46
-
47
- - (IBAction)showInfo {
48
-
49
- FlipsideViewController *controller = [[FlipsideViewController alloc] initWithNibName:@"FlipsideView" bundle:nil];
50
- controller.delegate = self;
51
-
52
- controller.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
53
- [self presentModalViewController:controller animated:YES];
54
-
55
- [controller release];
56
- }
57
-
58
-
59
-
60
- /*
61
- // Override to allow orientations other than the default portrait orientation.
62
- - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
63
- // Return YES for supported orientations
64
- return (interfaceOrientation == UIInterfaceOrientationPortrait);
65
- }
66
- */
67
-
68
- - (void)didReceiveMemoryWarning {
69
- // Releases the view if it doesn't have a superview.
70
- [super didReceiveMemoryWarning];
71
-
72
- // Release any cached data, images, etc that aren't in use.
73
- }
74
-
75
- - (void)viewDidUnload {
76
- // Release any retained subviews of the main view.
77
- // e.g. self.myOutlet = nil;
78
- }
79
-
80
-
81
- - (void)dealloc {
82
- [super dealloc];
83
- }
84
-
85
-
86
- @end
@@ -1,20 +0,0 @@
1
- //
2
- // iCukeAppDelegate.h
3
- // iCuke
4
- //
5
- // Created by Rob Holland on 02/03/2010.
6
- // Copyright The IT Refinery 2010. All rights reserved.
7
- //
8
-
9
- @class MainViewController;
10
-
11
- @interface iCukeAppDelegate : NSObject <UIApplicationDelegate> {
12
- UIWindow *window;
13
- MainViewController *mainViewController;
14
- }
15
-
16
- @property (nonatomic, retain) IBOutlet UIWindow *window;
17
- @property (nonatomic, retain) MainViewController *mainViewController;
18
-
19
- @end
20
-
@@ -1,33 +0,0 @@
1
- //
2
- // iCukeAppDelegate.m
3
- // iCuke
4
- //
5
- // Created by Rob Holland on 02/03/2010.
6
- // Copyright The IT Refinery 2010. All rights reserved.
7
- //
8
-
9
- #import "iCukeAppDelegate.h"
10
- #import "MainViewController.h"
11
-
12
- @implementation iCukeAppDelegate
13
-
14
- @synthesize window;
15
- @synthesize mainViewController;
16
-
17
- - (void)applicationDidFinishLaunching:(UIApplication *)application {
18
- MainViewController *aController = [[MainViewController alloc] initWithNibName:@"MainView" bundle:nil];
19
- self.mainViewController = aController;
20
- [aController release];
21
-
22
- mainViewController.view.frame = [UIScreen mainScreen].applicationFrame;
23
- [window addSubview:[mainViewController view]];
24
- [window makeKeyAndVisible];
25
- }
26
-
27
- - (void)dealloc {
28
- [mainViewController release];
29
- [window release];
30
- [super dealloc];
31
- }
32
-
33
- @end