Releases: jamonholmgren/ProMotion
Releases · jamonholmgren/ProMotion
Version 2.0.1
- Now works with RubyMotion 2.32
- Multiple minor bugfixes (read the commit history if you're really interested)
Version 2.0.0
Overview: In ProMotion 2.0, we removed deprecated APIs, refactored and cleaned up a ton of code, pulled PushNotification and MapScreen into their own gems, and simplified the API. It now builds 55% faster and is 20%+ lighter.
Follow our Migration Guide for a painless upgrade.
API changes
- Extracted
PM::MapScreeninto ProMotion-map - Extracted
PM::PushNotificationinto ProMotion-push - You can't pass a UIImage or UIView into a
titleanymore. Instead, pass a string intotitle_image(it'll fetch the image for you and create a UIImageView) or pass any arbitrary view intotitle_view. Now,titleonly takes a string title. on_createhas been renamedscreen_initto avoid confusion with Android'sonCreatemethod. It may be reintroduced in a future version of ProMotion as an alias ofonCreate. We recommend usingon_initinstead.set_nav_bar_right_buttonandset_nav_bar_left_buttonhave been removed. Useset_nav_bar_button :rightand:leftinstead.- Added
NSString#to_urlandNSURL#to_urlhelper methods to help clean up a lot of code. present_modal_view_controllernow takes two arguments: the ViewController and an argument hash. You shouldn't have been using it in the first place.open_in_tabnow properly opens screens in tabs that didn't have a nav_bar. This is probably the closest thing to a new feature in PM 2.0 that we have, even though it should have worked before.- Cell hash arbitrary values are no longer applied directly to the cell. Instead, use the style: hash to apply arbitrary attributes. Example here.
- Removed cell hash
:subviewsattribute. Instead, subclassPM::TableViewCelland add your own subviews there. - Actually, there is one new feature. It's called
longpressable. By addinglongpressableat the top of yourPM::TableScreenand then supplying along_press_action:in your cell hash, you can implement a different action for long presses on table cells. - We no longer insert the cell hash into the arguments hash passed into your cell tap action. If you need that data, pass it in manually.
- Removed
add_element,add_view,remove_element,remove_viewaliases foraddandremove. on_loadnow fires onviewDidLoadinstead ofloadView. Added a newload_viewhook for that method & you can set your own view in there. If you don't implementload_view, one will be created for you (per Apple's recommendations). This change shouldn't change much in your app except that if you're settingself.view = something, you should do it inload_view.
Internal changes:
- Removed
motion-require. ProMotion now relies entirely on RubyMotion's built-in dependency detector. - Removed
rake spec:unit,rake spec:func,rake spec:single filename. We don't really use these for development anymore. - Moved many files around into a more logical, simpler structure.
- Removed
PM::Conversions. The only helper we were using was theobjective_c_method_namemethod, and that was only used inPM::Styling. So we moved it there. - New module,
PM::NavBarModule. Moved any navigation controller methods into this module, cleaning up thePM::ScreenModulequite a bit. - Lots of code refactoring -- CodeClimate went from 2.47 to 3.35 GPA.
- Much cleaner
opencode! - Converted several slow functional tests into fast unit tests with the same coverage.
Version 2.0.0.rc4
- Bugfixes
Version 2.0.0.rc3
- Bugfixes
Version 2.0.0.rc1
Version 2.0.0.rc1
Overview: In ProMotion 2.0, we removed deprecated APIs, refactored and cleaned up a ton of code, pulled PushNotification and MapScreen into their own gems, and simplified the API. It now builds 55% faster and is 20%+ lighter.
Check out our PM 2.0 Migration Guide.
API changes
- Extracted
PM::MapScreeninto ProMotion-map - Extracted
PM::PushNotificationinto ProMotion-push - You can't pass a UIImage or UIView into a
titleanymore. Instead, pass a string intotitle_image(it'll fetch the image for you and create a UIImageView) or pass any arbitrary view intotitle_view. Now,titleonly takes a string title. on_createhas been renamedscreen_initto avoid confusion with Android'sonCreatemethod. It may be reintroduced in a future version of ProMotion as an alias ofonCreate. We recommend usingon_initinstead.set_nav_bar_right_buttonandset_nav_bar_left_buttonhave been removed. Useset_nav_bar_button :rightand:leftinstead.- Added
NSString#to_urlandNSURL#to_urlhelper methods to help clean up a lot of code. present_modal_view_controllernow takes two arguments: the ViewController and an argument hash. You shouldn't have been using it in the first place.open_in_tabnow properly opens screens in tabs that didn't have a nav_bar. This is probably the closest thing to a new feature in PM 2.0 that we have, even though it should have worked before.- Cell hash arbitrary values are no longer applied directly to the cell. Instead, use the style: hash to apply arbitrary attributes. Example here.
- Removed cell hash
:subviewsattribute. Instead, subclassPM::TableViewCelland add your own subviews there. - Actually, there is one new feature. It's called
longpressable. By addinglongpressableat the top of yourPM::TableScreenand then supplying along_press_action:in your cell hash, you can implement a different action for long presses on table cells. - We no longer insert the cell hash into the arguments hash passed into your cell tap action. If you need that data, pass it in manually.
- Removed
add_element,add_view,remove_element,remove_viewaliases foraddandremove. on_loadnow fires onviewDidLoadinstead ofloadView. Added a newload_viewhook for that method & you can set your own view in there. If you don't implementload_view, one will be created for you (per Apple's recommendations). This change shouldn't change much in your app except that if you're settingself.view = something, you should do it inload_view.
Internal changes:
- Removed
motion-require. ProMotion now relies entirely on RubyMotion's built-in dependency detector. - Removed
rake spec:unit,rake spec:func,rake spec:single filename. We don't really use these for development anymore. - Moved many files around into a more logical, simpler structure.
- Removed
PM::Conversions. The only helper we were using was theobjective_c_method_namemethod, and that was only used inPM::Styling. So we moved it there. - New module,
PM::NavBarModule. Moved any navigation controller methods into this module, cleaning up thePM::ScreenModulequite a bit. - Lots of code refactoring -- CodeClimate went from 2.47 to 3.42 GPA.
- Much cleaner
opencode! - Converted several slow functional tests into fast unit tests with the same coverage.
Version 1.2.1
- Minor bugfixes
- Updated dependency versions
Version 1.2.0
- Now uses motion-require for better compatibility with other libraries 6046dd7f4
- SplitScreen: New option
swipe:allows you to specify if a splitscreen master screen can be opened with a swipe. ffbb76caf - FormotionScreen: Removed
PM::FormotionScreenand the Formotion testing dependency. Use ProMotion-formotion instead. - Styling: Added a
content_widthhelper to PM::Styling (similar tocontent_height) 08a984815 - TableScreen: Removed SDWebImage in favor of similar but more reliable JDImageCache 59ed747e9
- Screen: Allow custom views (including images) for
titlesetting #415
Version 1.1.2
- Fixed a bug with PM::FormotionScreen where
submitwould not be bound after callingupdate_table_data. Thanks to @robertjwhitney for the patch. - Updated gem dependencies
Version 1.1.1
Bugfix: Correct git url for cloning default template (thanks to @joefiorini for the patch).
Version 1.1.0
What's New:
- Added a ProMotion executable called
promotion. You can typepromotion new <myapp>and it will create a ProMotion-specific app. We will be adding more functionality in the future. - Can now pass a symbol to
add,add_to, andset_attributesto call a method with that name to get styles. - Added
button_title:toopen_split_screento customize the auto-generated button title - Updates to set_tab_bar_button
- Added to PM::Delegate
on_open_url(args = {})whereargscontains:url,:source_app, and:annotation - Added to PM::Delegate
tint_colorto customize the application-wide tint color - Added to PM::MapScreen annotations the ability to set an image
- Removed legacy
navigation_controllerreferences which were causing confusion. - Allowed setting a
custom_viewforbar_button_items. - Added
will_begin_searchandwill_end_searchcallbacks to PM::TableScreen. - Added
title_viewandtitle_view_heightto sections in PM::TableScreen. - Updated screenshots for iOS 7
- Refactored code and lots of new passing tests