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.
- data/.gitignore +0 -1
- data/Gemfile +1 -1
- data/README.md +336 -92
- data/Rakefile +1 -1
- data/lib/ProMotion.rb +14 -0
- data/lib/ProMotion/app_delegate.rb +63 -0
- data/lib/ProMotion/cocoatouch/NavigationController.rb +4 -0
- data/lib/ProMotion/cocoatouch/TableViewCell.rb +16 -0
- data/lib/ProMotion/cocoatouch/TableViewController.rb +50 -0
- data/lib/ProMotion/cocoatouch/ViewController.rb +52 -0
- data/lib/ProMotion/helpers/console.rb +24 -0
- data/lib/ProMotion/helpers/measure_helper.rb +20 -0
- data/lib/ProMotion/helpers/system_helper.rb +29 -0
- data/lib/ProMotion/helpers/tab_bar.rb +115 -0
- data/lib/ProMotion/helpers/view_helper.rb +39 -0
- data/lib/ProMotion/pro_motion.rb +3 -0
- data/lib/ProMotion/screen_helpers/_tables/_searchable_table.rb +66 -0
- data/lib/ProMotion/screen_helpers/_tables/_sectioned_table.rb +265 -0
- data/lib/ProMotion/screen_helpers/_tables/grouped_table.rb +13 -0
- data/lib/ProMotion/screen_helpers/_tables/plain_table.rb +14 -0
- data/lib/ProMotion/screen_helpers/screen_elements.rb +43 -0
- data/lib/ProMotion/screen_helpers/screen_navigation.rb +106 -0
- data/lib/ProMotion/screen_helpers/screen_tabs.rb +92 -0
- data/lib/ProMotion/screens/_screen_module.rb +222 -0
- data/lib/ProMotion/screens/_table_screen_module.rb +30 -0
- data/lib/ProMotion/screens/screen.rb +7 -0
- data/lib/ProMotion/screens/table_screen.rb +15 -0
- data/lib/ProMotion/version.rb +3 -0
- metadata +43 -63
- data/app/app_delegate.rb +0 -5
- data/app/screens/home_screen.rb +0 -21
- data/app/screens/test_screen.rb +0 -26
data/app/app_delegate.rb
DELETED
data/app/screens/home_screen.rb
DELETED
@@ -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
|
data/app/screens/test_screen.rb
DELETED
@@ -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
|