From dd1906f9c69bfd27e5aac462d48a2d5349eb3e24 Mon Sep 17 00:00:00 2001 From: Andrew Havens Date: Wed, 28 Mar 2018 10:08:15 -0700 Subject: [PATCH 1/8] Remove deprecated method set_nav_bar_left_button and set_nav_bar_right_button --- lib/ProMotion/screen/nav_bar_module.rb | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lib/ProMotion/screen/nav_bar_module.rb b/lib/ProMotion/screen/nav_bar_module.rb index ec0da65a..495bf8ed 100644 --- a/lib/ProMotion/screen/nav_bar_module.rb +++ b/lib/ProMotion/screen/nav_bar_module.rb @@ -35,12 +35,6 @@ def set_nav_bar_buttons(side, buttons=[]) self.navigationItem.setRightBarButtonItems(buttons) if side == :right end - # TODO: In PM 2.1+, entirely remove this deprecated method. - def set_nav_bar_left_button(title, args={}) - mp "set_nav_bar_right_button and set_nav_bar_left_button have been removed. Use set_nav_bar_button :right/:left instead.", force_color: :yellow - end - alias_method :set_nav_bar_right_button, :set_nav_bar_left_button - def set_toolbar_items(buttons = [], animated = true) if buttons self.toolbarItems = Array(buttons).map{|b| b.is_a?(UIBarButtonItem) ? b : create_toolbar_button(b) } From 80ea4595e1c7d3c252ac5304c9ebcb79b5cc8d7c Mon Sep 17 00:00:00 2001 From: Andrew Havens Date: Thu, 29 Mar 2018 14:38:36 -0700 Subject: [PATCH 2/8] Add warning when trying to configure bar button with both a title and system item. --- lib/ProMotion/screen/nav_bar_module.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/ProMotion/screen/nav_bar_module.rb b/lib/ProMotion/screen/nav_bar_module.rb index 495bf8ed..0ada2f78 100644 --- a/lib/ProMotion/screen/nav_bar_module.rb +++ b/lib/ProMotion/screen/nav_bar_module.rb @@ -75,7 +75,10 @@ def create_toolbar_button(args = {}) def bar_button_item(button_type, args) return mp("`system_icon:` no longer supported. Use `system_item:` instead.", force_color: :yellow) if args[:system_icon] return button_type if button_type.is_a?(UIBarButtonItem) - return bar_button_item_system_item(args) if args[:system_item] + if args[:system_item] + mp("Nav bar button specified both `system_item:` and `title:`. Title will be ignored.", force_color: :yellow) if args[:title] + return bar_button_item_system_item(args) + end return bar_button_item_image(button_type, args) if button_type.is_a?(UIImage) return bar_button_item_string(button_type, args) if button_type.is_a?(String) return bar_button_item_custom(button_type) if button_type.is_a?(UIView) From 6e35313a7ac97083f5e7d8b0514adca7cd480e93 Mon Sep 17 00:00:00 2001 From: Andrew Havens Date: Thu, 29 Mar 2018 14:38:43 -0700 Subject: [PATCH 3/8] Warn when trying to use deprecated constants. --- lib/ProMotion/screen/nav_bar_module.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/ProMotion/screen/nav_bar_module.rb b/lib/ProMotion/screen/nav_bar_module.rb index 0ada2f78..6875492e 100644 --- a/lib/ProMotion/screen/nav_bar_module.rb +++ b/lib/ProMotion/screen/nav_bar_module.rb @@ -108,6 +108,7 @@ def bar_button_item_custom(custom_view) end def map_bar_button_system_item(symbol) + mp("Nav bar button stytem item `:page_curl` has been deprecated.", force_color: :yellow) if symbol == :page_curl { done: UIBarButtonSystemItemDone, cancel: UIBarButtonSystemItemCancel, @@ -132,14 +133,15 @@ def map_bar_button_system_item(symbol) fast_forward: UIBarButtonSystemItemFastForward, undo: UIBarButtonSystemItemUndo, redo: UIBarButtonSystemItemRedo, - page_curl: UIBarButtonSystemItemPageCurl + page_curl: UIBarButtonSystemItemPageCurl # DEPRECATED }[symbol] || UIBarButtonSystemItemDone end def map_bar_button_item_style(symbol) + mp("Nav bar button style `:bordered` has been deprecated.", force_color: :yellow) if symbol == :bordered { plain: UIBarButtonItemStylePlain, - bordered: UIBarButtonItemStyleBordered, + bordered: UIBarButtonItemStyleBordered, # DEPRECATED done: UIBarButtonItemStyleDone }[symbol] || UIBarButtonItemStyleDone end From e3c878e83daa3f5d36bfb8f12f117bb4f461c198 Mon Sep 17 00:00:00 2001 From: Andrew Havens Date: Thu, 29 Mar 2018 16:31:16 -0700 Subject: [PATCH 4/8] Update status bar usage to support newer versions of iOS. Add ability to hide/show status bar. --- lib/ProMotion/delegate/delegate_module.rb | 43 +++++++------ lib/ProMotion/screen/screen_module.rb | 46 +------------- lib/ProMotion/screen/status_bar_module.rb | 77 +++++++++++++++++++++++ 3 files changed, 102 insertions(+), 64 deletions(-) create mode 100644 lib/ProMotion/screen/status_bar_module.rb diff --git a/lib/ProMotion/delegate/delegate_module.rb b/lib/ProMotion/delegate/delegate_module.rb index eaecd5a0..47b8cc8e 100644 --- a/lib/ProMotion/delegate/delegate_module.rb +++ b/lib/ProMotion/delegate/delegate_module.rb @@ -12,7 +12,6 @@ def application(application, willFinishLaunchingWithOptions:launch_options) end def application(application, didFinishLaunchingWithOptions:launch_options) - apply_status_bar on_load application, launch_options # Requires 'ProMotion-push' gem. check_for_push_notification(launch_options) if respond_to?(:check_for_push_notification) @@ -66,37 +65,43 @@ def open(screen, args={}) alias :open_screen :open alias :open_root_screen :open_screen + # DEPRECATED def status_bar? - UIApplication.sharedApplication.statusBarHidden + mp "The default behavior of `status_bar?` has changed. Calling `status_bar?` on AppDelegate may not return the correct result.", force_color: :yellow + self.class.status_bar_style != :hidden end - private + def status_bar_style + self.class.status_bar_style + end - def apply_status_bar - self.class.send(:apply_status_bar) + def status_bar_animation + self.class.status_bar_animation end public module ClassMethods - def status_bar(visible = true, opts={}) - @status_bar_visible = visible - @status_bar_opts = opts + def status_bar(visible = true, opts = {}) + info_plist_setting = NSBundle.mainBundle.objectForInfoDictionaryKey('UIViewControllerBasedStatusBarAppearance') + if info_plist_setting == false && visible == false + mp "The default behavior of `status_bar` has changed. Calling `status_bar` will have no effect until you remove the 'UIViewControllerBasedStatusBarAppearance' setting from info_plist.", force_color: :yellow + end + @status_bar_style = case visible + when false then :hidden + when true then :default + else visible + end + @status_bar_animation = opts[:animation] || :default end - def apply_status_bar - @status_bar_visible = true if @status_bar_visible.nil? - @status_bar_opts ||= { animation: :none } - UIApplication.sharedApplication.setStatusBarHidden(!@status_bar_visible, withAnimation:status_bar_animation(@status_bar_opts[:animation])) + def status_bar_style + @status_bar_style end - def status_bar_animation(opt) - { - fade: UIStatusBarAnimationFade, - slide: UIStatusBarAnimationSlide, - none: UIStatusBarAnimationNone - }[opt] || UIStatusBarAnimationNone + def status_bar_animation + @status_bar_animation end def tint_color(c) @@ -110,12 +115,10 @@ def tint_color=(c) def get_tint_color @tint_color || nil end - end def self.included(base) base.extend(ClassMethods) end - end end diff --git a/lib/ProMotion/screen/screen_module.rb b/lib/ProMotion/screen/screen_module.rb index 0eee32dd..c28b705e 100644 --- a/lib/ProMotion/screen/screen_module.rb +++ b/lib/ProMotion/screen/screen_module.rb @@ -4,6 +4,7 @@ module ScreenModule include ProMotion::ScreenNavigation include ProMotion::Styling include ProMotion::NavBarModule + include ProMotion::StatusBarModule include ProMotion::Tabs include ProMotion::SplitScreen if UIDevice.currentDevice.userInterfaceIdiom == UIUserInterfaceIdiomPad || (UIDevice.currentDevice.systemVersion.to_i >= 8 ) @@ -41,7 +42,6 @@ def view_did_load def view_will_appear(animated) super - resolve_status_bar self.will_appear self.will_present if isMovingToParentViewController @@ -179,38 +179,12 @@ def resolve_title end end - def resolve_status_bar - case self.class.status_bar_type - when :none - status_bar_hidden true - when :light - status_bar_hidden false - status_bar_style UIStatusBarStyleLightContent - when :dark - status_bar_hidden false - status_bar_style UIStatusBarStyleDefault - else - return status_bar_hidden true if UIApplication.sharedApplication.isStatusBarHidden - status_bar_hidden false - global_style = NSBundle.mainBundle.objectForInfoDictionaryKey("UIStatusBarStyle") - status_bar_style global_style ? Object.const_get(global_style) : UIStatusBarStyleDefault - end - end - def add_nav_bar_buttons self.class.get_nav_bar_button.each do |button_args| set_nav_bar_button(button_args[:side], button_args) end end - def status_bar_hidden(hidden) - UIApplication.sharedApplication.setStatusBarHidden(hidden, withAnimation:self.class.status_bar_animation) - end - - def status_bar_style(style) - UIApplication.sharedApplication.setStatusBarStyle(style) - end - def apply_properties(args) reserved_args = [ :nav_bar, :hide_nav_bar, :hide_tab_bar, :animated, :close_all, :in_tab, :in_detail, :in_master, :to_screen, :toolbar ] set_attributes self, args.dup.delete_if { |k,v| reserved_args.include?(k) } @@ -227,7 +201,6 @@ def check_ancestry end end - # Class methods module ClassMethods def title(t=nil) if t && t.is_a?(String) == false @@ -253,22 +226,6 @@ def title_view(t) @title_type = :view end - def status_bar(style=nil, args={}) - if NSBundle.mainBundle.objectForInfoDictionaryKey('UIViewControllerBasedStatusBarAppearance').nil? - mp "status_bar will have no effect unless you set 'UIViewControllerBasedStatusBarAppearance' to false in your info.plist", force_color: :yellow - end - @status_bar_style = style - @status_bar_animation = args[:animation] if args[:animation] - end - - def status_bar_type - @status_bar_style || :default - end - - def status_bar_animation - @status_bar_animation || UIStatusBarAnimationSlide - end - def nav_bar(enabled, args={}) @nav_bar_args = ({ nav_bar: enabled }).merge(args) end @@ -291,6 +248,7 @@ def get_nav_bar_button def self.included(base) base.extend(ClassMethods) + base.extend(StatusBarModule::ClassMethods) base.extend(TabClassMethods) # TODO: Is there a better way? end end diff --git a/lib/ProMotion/screen/status_bar_module.rb b/lib/ProMotion/screen/status_bar_module.rb new file mode 100644 index 00000000..e98a2026 --- /dev/null +++ b/lib/ProMotion/screen/status_bar_module.rb @@ -0,0 +1,77 @@ +module ProMotion + module StatusBarModule + def preferredStatusBarStyle + styles = { + light: UIStatusBarStyleLightContent, + dark: UIStatusBarStyleDefault, + default: UIStatusBarStyleDefault + } + styles[self.class.status_bar_style || app.delegate.status_bar_style] || styles[:default] + end + + def preferredStatusBarUpdateAnimation + animations = { + none: UIStatusBarAnimationNone, + fade: UIStatusBarAnimationFade, + slide: UIStatusBarAnimationSlide, + default: UIStatusBarAnimationFade + } + animations[self.class.status_bar_animation || app.delegate.status_bar_animation] || animations[:default] + end + + def prefersStatusBarHidden + style = self.class.status_bar_style || app.delegate.status_bar_style + [:none, :hidden].include?(style) + end + + def hide_status_bar(opts = {}) + @previous_status_bar_style = self.class.status_bar_style + self.class.status_bar_style(:hidden) + update_status_bar_appearance(opts) + end + + def show_status_bar(opts = {}) + new_style = case @previous_status_bar_style + when nil, :hidden, :none + opts[:style] || app.delegate.status_bar_style || :default + else + @previous_status_bar_style + end + self.class.status_bar_style(new_style) + update_status_bar_appearance(opts) + end + + def update_status_bar_appearance(opts = {}) + if opts[:animated] == true + UIView.animateWithDuration(0.3, animations: -> { setNeedsStatusBarAppearanceUpdate }) + else + setNeedsStatusBarAppearanceUpdate + end + end + + module ClassMethods + def status_bar(style = nil, args = {}) + info_plist_setting = NSBundle.mainBundle.objectForInfoDictionaryKey('UIViewControllerBasedStatusBarAppearance') + if info_plist_setting == false + mp "The default behavior of `status_bar` has changed. Calling `status_bar` will have no effect until you remove the 'UIViewControllerBasedStatusBarAppearance' setting from info_plist.", force_color: :yellow + end + @status_bar_style = style + @status_bar_animation = args[:animation] if args[:animation] + end + + def status_bar_style(val = nil) + @status_bar_style = val if val + @status_bar_style + end + + def status_bar_animation(val = nil) + @status_bar_animation = val if val + @status_bar_animation + end + end + + def self.included(base) + base.extend(ClassMethods) + end + end +end From bd4e03ee280188a17d41f2cb2bd4dd6371d3976e Mon Sep 17 00:00:00 2001 From: Andrew Havens Date: Thu, 29 Mar 2018 16:55:53 -0700 Subject: [PATCH 5/8] Remove status bar tests that have become obsolete. --- Rakefile | 3 +-- spec/unit/screen_spec.rb | 38 -------------------------------------- 2 files changed, 1 insertion(+), 40 deletions(-) diff --git a/Rakefile b/Rakefile index c115a23a..6c477057 100644 --- a/Rakefile +++ b/Rakefile @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- $:.unshift("/Library/RubyMotion/lib") +$:.unshift("~/.rubymotion/rubymotion-templates") require 'motion/project/template/ios' require 'bundler' Bundler.setup @@ -10,8 +11,6 @@ require 'motion_print' Motion::Project::App.setup do |app| app.name = 'ProMotion' app.device_family = [ :ipad ] # so we can test split screen capability - app.detect_dependencies = false - app.info_plist["UIViewControllerBasedStatusBarAppearance"] = false app.deployment_target = "8.0" # Adding file dependencies for tests diff --git a/spec/unit/screen_spec.rb b/spec/unit/screen_spec.rb index 4d23e24c..6b1c6d35 100644 --- a/spec/unit/screen_spec.rb +++ b/spec/unit/screen_spec.rb @@ -34,44 +34,6 @@ HomeScreen.title.should != 'instance method' end - it "should set the UIStatusBar style to :none" do - @screen.class.status_bar :none - @screen.view_will_appear(false) - UIApplication.sharedApplication.isStatusBarHidden.should == true - end - - it "should set the UIStatusBar style to :light" do - @screen.class.status_bar :light - @screen.view_will_appear(false) - UIApplication.sharedApplication.isStatusBarHidden.should == false - UIApplication.sharedApplication.statusBarStyle.should == UIStatusBarStyleLightContent - end - - it "should set the UIStatusBar style to :dark" do - UIApplication.sharedApplication.statusBarStyle = UIStatusBarStyleLightContent - @screen.class.status_bar :dark - @screen.view_will_appear(false) - UIApplication.sharedApplication.isStatusBarHidden.should == false - UIApplication.sharedApplication.statusBarStyle.should == UIStatusBarStyleDefault - end - - it "should default to a global UIStatusBar style" do - NSBundle.mainBundle.mock!(:objectForInfoDictionaryKey) do |key| - "UIStatusBarStyleLightContent" - end - @screen.class.status_bar :default - @screen.view_will_appear(false) - UIApplication.sharedApplication.isStatusBarHidden.should == false - UIApplication.sharedApplication.statusBarStyle.should == UIStatusBarStyleLightContent - end - - it "should default to a hidden UIStatusBar if already hidden" do - UIApplication.sharedApplication.setStatusBarHidden(true, withAnimation: UIStatusBarAnimationNone) - @screen.class.status_bar :default - @screen.view_will_appear(false) - UIApplication.sharedApplication.isStatusBarHidden.should == true - end - it "should set the tab bar item with a system item" do @screen.set_tab_bar_item system_item: :contacts comparison = UITabBarItem.alloc.initWithTabBarSystemItem(UITabBarSystemItemContacts, tag: 0) From 768ba5edc17323c368ed21b1fc9d57e1a894cd8e Mon Sep 17 00:00:00 2001 From: Andrew Havens Date: Thu, 29 Mar 2018 16:50:09 -0700 Subject: [PATCH 6/8] Rename TabClassMethods to Tabs::ClassMethods. --- lib/ProMotion/screen/screen_module.rb | 2 +- lib/ProMotion/tabs/tabs.rb | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/ProMotion/screen/screen_module.rb b/lib/ProMotion/screen/screen_module.rb index c28b705e..edddee7a 100644 --- a/lib/ProMotion/screen/screen_module.rb +++ b/lib/ProMotion/screen/screen_module.rb @@ -249,7 +249,7 @@ def get_nav_bar_button def self.included(base) base.extend(ClassMethods) base.extend(StatusBarModule::ClassMethods) - base.extend(TabClassMethods) # TODO: Is there a better way? + base.extend(Tabs::ClassMethods) end end end diff --git a/lib/ProMotion/tabs/tabs.rb b/lib/ProMotion/tabs/tabs.rb index 3b1b2bed..c1a52fa7 100644 --- a/lib/ProMotion/tabs/tabs.rb +++ b/lib/ProMotion/tabs/tabs.rb @@ -105,7 +105,7 @@ def map_tab_symbol(symbol) @_tab_symbols[symbol] || symbol end - module TabClassMethods + module ClassMethods def tab_bar_item(args={}) @tab_bar_item = args end @@ -116,8 +116,7 @@ def get_tab_bar_item end def self.included(base) - base.extend(TabClassMethods) + base.extend(ClassMethods) end - end end From 852ba78b3be848efdd458cc027ae20844cc0925e Mon Sep 17 00:00:00 2001 From: Andrew Havens Date: Fri, 30 Mar 2018 09:05:46 -0700 Subject: [PATCH 7/8] Update status bar documentation. --- docs/Reference/ProMotion Delegate.md | 28 +++++++++++++++++++----- docs/Reference/ProMotion Screen.md | 32 +++++++++++++++++++++++++--- 2 files changed, 52 insertions(+), 8 deletions(-) diff --git a/docs/Reference/ProMotion Delegate.md b/docs/Reference/ProMotion Delegate.md index 6b51b8dd..4006e7fe 100644 --- a/docs/Reference/ProMotion Delegate.md +++ b/docs/Reference/ProMotion Delegate.md @@ -12,7 +12,7 @@ The PM::Delegate gives you ProMotion's nice API for your AppDelegate class. ```ruby # app/app_delegate.rb class AppDelegate < PM::Delegate - status_bar false, animation: :none + status_bar :dark, animation: :none def on_load(app, options) open HomeScreen @@ -25,7 +25,7 @@ If you need to inherit from a different AppDelegate superclass, do this: ```ruby class AppDelegate < JHMyParentDelegate include PM::DelegateModule - status_bar false, animation: :none + status_bar :dark, animation: :none def on_load(app, options) open HomeScreen @@ -148,20 +148,38 @@ end #### status_bar -Class method that allows hiding or showing the status bar. Setting this to `false` will hide it throughout the app. +This class method allows you to configure the default setting of whether or not to show the status bar and whether you want the status bar text to appear light or dark. You may also optionally specify the animation style when hiding/showing the status bar. These will become the default setting throughout the app. Note that if you specify `:light` as the status bar style, and the current screen uses a navigation bar, the bar style must have a dark style in order for the status bar to have white text. + +**Style Options:** +- `:dark` (default) +- `:light` +- `:hidden`/`:none` + +**Animation Options:** +- `:fade` (default) +- `:slide` +- `:none` ```ruby class AppDelegate < PM::Delegate - status_bar true, animation: :none # :slide, :fade + status_bar :light, animation: :fade end ``` -If you want the status bar to be hidden on the splash screen you must set this in your rakefile. +**Configuring status bar appearance during app launch** + +If you want the status bar to be initially hidden when the app launches, you must set this `info_plist` setting in your rakefile. ```ruby app.info_plist['UIStatusBarHidden'] = true ``` +To configure the style (light or dark text) of the status bar during app launch, you can configure the `status_bar_style` project config setting in your rakefile. + +```ruby +app.status_bar_style = :light_content # or :default (dark) +``` + #### tint_color Class method that allows you to set the application's global tint color for iOS 7 apps. diff --git a/docs/Reference/ProMotion Screen.md b/docs/Reference/ProMotion Screen.md index fee8e37a..25fdafe7 100644 --- a/docs/Reference/ProMotion Screen.md +++ b/docs/Reference/ProMotion Screen.md @@ -611,20 +611,46 @@ end #### status_bar(style=nil, args={animation: UIStatusBarAnimationSlide}) -Set the properties of the application's status bar. Options for style are: `:none`, `:light`, `:dark`, and `:default`. If a screen doesn't call `status_bar` and a `UIStatusBarStyle` is set on the application bundle, then that style will be used. Otherwise, `UIStatusBarStyleDefault` will be used. The animation argument should be a `UIStatusBarAnimation` (or `:none` / `:fade` / `:slide`) and is used to hide or show the status bar when appropriate and defaults to `:slide`. If `status_bar` is set to `false` in the app delegate this will default to hidden as well. +This method allows you to specify whether or not to show the status bar and whether you want the status bar text to appear light or dark. You may also optionally specify the animation style when hiding/showing the status bar. These settings will only affect the status bar for this screen. Note that if you specify `:light` as the status bar style, and the current screen uses a navigation bar, the bar style must have a dark style in order for the status bar to have white text. + +**Style Options:** +- `:dark` (default) +- `:light` +- `:hidden`/`:none` + +**Animation Options:** +- `:fade` (default) +- `:slide` +- `:none` ```ruby class MyScreen < PM::Screen - status_bar :none, {animation: :fade} + status_bar :hidden # ... end class MyScreenWithADarkColoredNavBar < PM::Screen - status_bar :light + status_bar :light, animation: :fade # ... end ``` +#### hide_status_bar(args={animated: false}) + +If the status bar is currently displayed, but you want to hide it some time after the screen has already rendered, call `hide_status_bar`. You may optionally specify that the hiding should be animated. This will use the animation style that you already specified (either on the screen or globally on your AppDelegate). If you did not already specify an animation style, the default is `:fade`. + +```ruby +hide_status_bar(animated: true) +``` + +#### show_status_bar(args={style: nil, animated: false}) + +If the status bar is currently hidden and the screen has already rendered, but now you want want to display it, call `show_status_bar`. You may optionally specify the status bar style (light or dark). If you do not specify a style, then the default style that you specified (either on the screen or globally on your AppDelegate) will be used. You may also optionally specify that the showing should be animated. This will use the animation style that you already specified (either on the screen or globally on your AppDelegate). If you did not already specify an animation style, the default is `:fade`. + +```ruby +show_status_bar(style: :light, animated: true) +``` + #### nav_bar(enabled, nav_bar_options={}) Add a navigation bar (and UINavigationController wrapper) to the current screen whenever it's opened. From d3e43bc0f4fd3bc3a1dabdc2275ca35585881ceb Mon Sep 17 00:00:00 2001 From: Andrew Havens Date: Fri, 30 Mar 2018 10:19:32 -0700 Subject: [PATCH 8/8] Remove the `:page_curl` system item as a valid option since it has been deprecated. --- docs/Reference/ProMotion Screen.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/Reference/ProMotion Screen.md b/docs/Reference/ProMotion Screen.md index 25fdafe7..ce3e5c45 100644 --- a/docs/Reference/ProMotion Screen.md +++ b/docs/Reference/ProMotion Screen.md @@ -300,7 +300,7 @@ Runs just before the screen rotates. #### set_nav_bar_button(side, args = {}) -Set a nav bar button. `args` can be `image:`, `title:`, `system_item:`, `button:`, `custom_view:`. +Set a nav bar button. `args` can be `image:`, `title:` or `system_item:` (not both), `tint_color:`, `button:`, or `custom_view:`. You can also set arbitrary attributes in the hash and they'll be applied to the button. @@ -318,7 +318,7 @@ set_nav_bar_button :left, { ```ruby :done,:cancel,:edit,:save,:add,:flexible_space,:fixed_space,:compose, :reply,:action,:organize,:bookmarks,:search,:refresh,:stop,:camera, -:trash,:play,:pause,:rewind,:fast_forward,:undo,:redo,:page_curl +:trash,:play,:pause,:rewind,:fast_forward,:undo,:redo ``` `custom_view` can be any custom `UIView` subclass you initialize yourself