README.md in motion-tab-0.1.2 vs README.md in motion-tab-0.2.0
- old
+ new
@@ -1,8 +1,8 @@
# Motion::Tab
-TODO: Write a gem description
+Easily create a UITabBar in a RubyMotion app.
## Installation
Add this line to your application's Gemfile:
@@ -16,10 +16,37 @@
$ gem install motion-tab
## Usage
-TODO: Write usage instructions here
+Basic usage (more documentation is forthcoming):
+
+```ruby
+def application(application, didFinishLaunchingWithOptions:launchOptions)
+ @window = UIWindow.alloc.initWithFrame(UIScreen.mainScreen.bounds)
+
+ tabs = [
+ {
+ systemIcon: UITabBarSystemItemContacts,
+ navigationController: true,
+ viewController: ContactsViewController
+ }, {
+ title: "Custom",
+ icon: "custom.png",
+ navigationController: false,
+ viewController: CustomViewController
+ }, {
+ title: "Settings",
+ icon: "settings.png",
+ navigationController: true,
+ viewController: SettingsViewController
+ }
+ ]
+
+ @window.rootViewController = MotionTab::TabBar.createTabBarControllerFromData(tabs)
+ @window.makeKeyAndVisible
+end
+```
## Contributing
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)