ProMotion 0.4.1 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. data/.gitignore +0 -1
  2. data/Gemfile +1 -1
  3. data/README.md +336 -92
  4. data/Rakefile +1 -1
  5. data/lib/ProMotion.rb +14 -0
  6. data/lib/ProMotion/app_delegate.rb +63 -0
  7. data/lib/ProMotion/cocoatouch/NavigationController.rb +4 -0
  8. data/lib/ProMotion/cocoatouch/TableViewCell.rb +16 -0
  9. data/lib/ProMotion/cocoatouch/TableViewController.rb +50 -0
  10. data/lib/ProMotion/cocoatouch/ViewController.rb +52 -0
  11. data/lib/ProMotion/helpers/console.rb +24 -0
  12. data/lib/ProMotion/helpers/measure_helper.rb +20 -0
  13. data/lib/ProMotion/helpers/system_helper.rb +29 -0
  14. data/lib/ProMotion/helpers/tab_bar.rb +115 -0
  15. data/lib/ProMotion/helpers/view_helper.rb +39 -0
  16. data/lib/ProMotion/pro_motion.rb +3 -0
  17. data/lib/ProMotion/screen_helpers/_tables/_searchable_table.rb +66 -0
  18. data/lib/ProMotion/screen_helpers/_tables/_sectioned_table.rb +265 -0
  19. data/lib/ProMotion/screen_helpers/_tables/grouped_table.rb +13 -0
  20. data/lib/ProMotion/screen_helpers/_tables/plain_table.rb +14 -0
  21. data/lib/ProMotion/screen_helpers/screen_elements.rb +43 -0
  22. data/lib/ProMotion/screen_helpers/screen_navigation.rb +106 -0
  23. data/lib/ProMotion/screen_helpers/screen_tabs.rb +92 -0
  24. data/lib/ProMotion/screens/_screen_module.rb +222 -0
  25. data/lib/ProMotion/screens/_table_screen_module.rb +30 -0
  26. data/lib/ProMotion/screens/screen.rb +7 -0
  27. data/lib/ProMotion/screens/table_screen.rb +15 -0
  28. data/lib/ProMotion/version.rb +3 -0
  29. metadata +43 -63
  30. data/app/app_delegate.rb +0 -5
  31. data/app/screens/home_screen.rb +0 -21
  32. data/app/screens/test_screen.rb +0 -26
data/app/app_delegate.rb DELETED
@@ -1,5 +0,0 @@
1
- class AppDelegate < ProMotion::AppDelegateParent
2
- def on_load(app, options)
3
- open_tab_bar HomeScreen.new(nav_bar: true), TestScreen.new(nav_bar:true)
4
- end
5
- end
@@ -1,21 +0,0 @@
1
- class HomeScreen < ProMotion::Screen
2
- title "Home Screen"
3
-
4
- def on_load
5
- @label = add_view UILabel.alloc.initWithFrame(CGRectZero), {
6
- text: "Working...",
7
- font: UIFont.systemFontOfSize(18),
8
- textColor: UIColor.blackColor
9
- }
10
-
11
- self.view.backgroundColor = UIColor.whiteColor
12
- self.set_nav_bar_right_button "Test", action: :test_it
13
- end
14
-
15
- def on_appear
16
- end
17
-
18
- def test_it
19
- open TestScreen
20
- end
21
- end
@@ -1,26 +0,0 @@
1
- class TestScreen < ProMotion::Screen
2
- title "Test Screen"
3
-
4
- def on_load
5
- @label = add_element UILabel.alloc.initWithFrame(CGRectMake(5, 5, 320, 30)), {
6
- text: "This is awesome!",
7
- font: UIFont.systemFontOfSize(18)
8
- }
9
- @button = add_element UIButton.alloc.initWithFrame([[5,45], [300, 40]]), {
10
- title: "Button",
11
- "addTarget:action:forControlEvents:" => [self, :hello, UIControlEventTouchUpInside],
12
- backgroundColor: UIColor.whiteColor
13
- }
14
- @button.addSubview(@label)
15
-
16
- set_nav_bar_right_button "Close", action: :close_this if self.parent_screen
17
- end
18
-
19
- def close_this
20
- close
21
- end
22
-
23
- def hello
24
- puts "hello"
25
- end
26
- end