diff --git a/README.md b/README.md index 6ab17d0..6a32245 100644 --- a/README.md +++ b/README.md @@ -448,29 +448,26 @@ end ## Reference +### Screen +
| Class or Module | Method | Description |
|---|---|---|
| Screen | is_modal? | Returns if the screen was opened in a modal window. |
| self | Returns the Screen which is a subclass of UIViewController or UITableViewController | |
| has_nav_bar? | Returns if the screen is contained in a navigation controller. | |
| set_tab_bar_item(args) |
Creates the tab that is shown in a tab bar item. @@ -478,14 +475,12 @@ end |
|
| on_appear |
Callback for when the screen appears. |
|
| will_appear |
Callback for before the screen appears. @@ -494,21 +489,18 @@ end |
|
| will_disappear |
Callback for before the screen disappears. |
|
| will_rotate(orientation, duration) |
Callback for before the screen rotates. |
|
| on_opened **Deprecated** |
Callback when screen is opened via a tab bar. Please don't use this, as it will be removed in the future @@ -516,14 +508,12 @@ end |
|
| set_nav_bar_left_button(title, args = {}) |
Set a left nav bar button. |
|
| set_nav_bar_right_button(title, args = {}) |
Set a right nav bar button. @@ -531,7 +521,6 @@ end |
|
| should_autorotate |
(iOS 6) return true/false if screen should rotate. @@ -539,21 +528,18 @@ end |
|
| should_rotate(orientation) |
(iOS 5) Return true/false for rotation to orientation. |
|
| title |
Returns title of current screen. |
|
| title=(title) |
Sets title of current screen. @@ -570,10 +556,6 @@ end |
|
|
- ScreenElements - Included in Screen by default - |
add(view, attrs = {}) |
Adds the view to the screen after applying the attributes. @@ -587,7 +569,6 @@ end |
| remove(view) |
Removes the view from the superview and sets it to nil @@ -595,96 +576,78 @@ end |
|
| bounds |
Accessor for self.view.bounds |
|
| frame |
Accessor for self.view.frame |
|
| view |
The main view for this screen. |
|
|
- SystemHelper - Included in Screen by default - |
ios_version |
Returns the iOS version that is running on the device |
| ios_version_greater?(version) |
Returns true if 'ios_version' is greater than the version passed in, false otherwise |
|
| ios_version_greater_eq?(version) |
Returns true if 'ios_version' is greater than or equal to the version passed in, false otherwise |
|
| ios_version_is?(version) |
Returns true if 'ios_version' is equal to the version passed in, false otherwise |
|
| ios_version_less?(version) |
Returns true if 'ios_version' is less than the version passed in, false otherwise |
|
| ios_version_less_eq?(version) |
Returns true if 'ios_version' is less than or equal to the version passed in, false otherwise |
|
| ScreenNavigation - included in Screen - |
app_delegate |
Returns the AppDelegate |
| close(args = {}) |
Closes the current screen, passes args back to the previous screen's on_return method |
|
| open_root_screen(screen) |
Closes all other open screens and opens screen as the root view controller. |
|
| open(screen, args = {}) |
Pushes the screen onto the navigation stack or opens in a modal @@ -699,37 +662,37 @@ end |
|
| open_tab_bar(*screens) |
Open a UITabBarController with the specified screens as the root view controller of the current app |
|
| open_tab(tab) |
Opens the tab where the "string" title matches the passed in tab |
| TableScreen | -- | *Has all the methods of Screen* | +Method | +Description |
|---|---|---|---|---|
| self | Returns the current UITableViewController (not UITableView) | |||
| searchable(placeholder: "placeholder text") | Class method to make the current table searchable. | |||
table_dataMethod that is called to get the table's cell data and build the table.@@ -788,16 +751,22 @@ end |
||||
| update_table_data |
Causes the table data to be refreshed, such as when a remote data source has
been downloaded and processed. |
|||
| Method | +Description | +|
|---|---|---|
| Console | log(log, with_color:color) |
Class method to output a colored console message. |