rubymotion_generators 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -22,12 +22,15 @@ module RubymotionGenerators
22
22
  when 'cell'
23
23
  generate_table_view_cell
24
24
  when 'tbapp'
25
- generate_tab_bar_app_delegate name
25
+ generate_tab_bar_app_delegate
26
26
  generate_view_controller 'first'
27
27
  generate_view_controller 'second'
28
28
  when 'tvapp'
29
29
  generate_table_view_app_delegate
30
30
  generate_table_view_controller 'example'
31
+ when 'svapp'
32
+ generate_single_view_app_delegate
33
+ generate_view_controller 'example'
31
34
  else
32
35
  puts "Invalid template name '#{template_name}'"
33
36
  exit 1
@@ -74,6 +77,11 @@ module RubymotionGenerators
74
77
  template('templates/table_view_app_delegate.rb', output_path)
75
78
  end
76
79
 
80
+ def generate_single_view_app_delegate
81
+ output_path = "app/app_delegate.rb"
82
+ template('templates/single_view_app_delegate.rb', output_path)
83
+ end
84
+
77
85
  def self.source_root
78
86
  File.dirname(__FILE__)
79
87
  end
@@ -1,3 +1,3 @@
1
1
  module RubymotionGenerators
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
@@ -0,0 +1,41 @@
1
+ class AppDelegate
2
+
3
+ def application(application, didFinishLaunchingWithOptions:launchOptions)
4
+ @window = UIWindow.alloc.initWithFrame(UIScreen.mainScreen.bounds)
5
+ #Override point for customization after application launch.
6
+ @viewController = ExampleViewController.alloc.init
7
+ @window.rootViewController = @viewController
8
+ @window.makeKeyAndVisible
9
+ true
10
+ end
11
+
12
+ def applicationWillResignActive(application)
13
+ # Sent when the application is about to move from active to inactive state. This can occur for certain types of
14
+ # temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application
15
+ # and it begins the transition to the background state. Use this method to pause ongoing tasks, disable timers, and
16
+ # throttle down OpenGL ES frame rates. Games should use this method to pause the game.
17
+ end
18
+
19
+ def applicationDidEnterBackground(application)
20
+ # Use this method to release shared resources, save user data, invalidate timers, and store enough application
21
+ # state information to restore your application to its current state in case it is terminated later.If your
22
+ # application supports background execution, this method is called instead of applicationWillTerminate: when the
23
+ # user quits.
24
+ end
25
+
26
+ def applicationWillEnterForeground(application)
27
+ # Called as part of the transition from the background to the inactive state; here you can undo many of the
28
+ # changes made on entering the background.
29
+ end
30
+
31
+ def applicationDidBecomeActive(application)
32
+ # Restart any tasks that were paused (or not yet started) while the application was inactive. If the application
33
+ # was previously in the background, optionally refresh the user interface.
34
+ end
35
+
36
+ def applicationWillTerminate(application)
37
+ # Called when the application is about to terminate. Save data if appropriate. See also
38
+ # applicationDidEnterBackground
39
+ end
40
+ end
41
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubymotion_generators
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-06-02 00:00:00.000000000 Z
12
+ date: 2012-11-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: thor
@@ -59,6 +59,7 @@ files:
59
59
  - Rakefile
60
60
  - lib/rubymotion_generators.rb
61
61
  - lib/rubymotion_generators/version.rb
62
+ - lib/templates/single_view_app_delegate.rb
62
63
  - lib/templates/tab_bar_app_delegate.rb
63
64
  - lib/templates/table_view_app_delegate.rb
64
65
  - lib/templates/table_view_cell.rb
@@ -92,3 +93,4 @@ signing_key:
92
93
  specification_version: 3
93
94
  summary: RubyMotion generators
94
95
  test_files: []
96
+ has_rdoc: