ProMotion

ProMotion 是 RubyMotion gem,能让 iPhone 开发更像 Ruby 而不是 Objective-C。「ProMotion is a RubyMotion gem that makes iPhone development less like Objective-C and more like Ruby.」

  • 所有者: jamonholmgren/ProMotion
  • 平台:
  • 許可證: MIT License
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

ProMotion

Gem Version

ProMotion was created by me, Jamon Holmgren. While you're welcome to use ProMotion, please note that it's no longer maintained!

iPhone Apps, Ruby-style

ProMotion is a RubyMotion gem that makes iOS development more like Ruby and less like Objective-C.
It introduces a clean, Ruby-style syntax for building screens that is easy to learn and remember and
abstracts a ton of boilerplate UIViewController, UINavigationController, and other iOS code into a
simple, Ruby-like DSL.

# app/app_delegate.rb
class AppDelegate < PM::Delegate
  status_bar true, animation: :fade

  def on_load(app, options)
    open RootScreen
  end
end

# app/screens/root_screen.rb
class RootScreen < PM::Screen
  title "Root Screen"
  nav_bar true

  def on_load
    set_nav_bar_button :right, title: "Help", action: :open_help_screen
  end

  def open_help_screen
    open HelpScreen
  end
end

# app/screens/help_screen.rb
class HelpScreen < PM::TableScreen
  title "Table Screen"

  def table_data
    [{
      title: "Help",
      cells: [
        { title: "About this app", action: :tapped_about },
        { title: "Log out", action: :log_out }
      ]
    }]
  end

  def tapped_about(args={})
    open AboutScreen
  end

  def log_out
    # Log out!
  end
end

Features

Screens Navigation Bars Tab Bars
ProMotion Screen ProMotion Nav Bar ProMotion Tabs
Table Screens Grouped Tables Searchable Refreshable
ProMotion TableScreen Grouped Table Screen Searchable Refreshable
SplitScreens Map Screens Web Screens
ProMotion SplitScreens MapScreen ProMotion WebScreen

...and much more.

Getting Started

  1. Check out the Getting Started Guide
  2. Watch the excellent MotionInMotion screencast about ProMotion (very reasonably priced subscription required)
  3. Follow a tutorial: Building an ESPN app using RubyMotion, ProMotion, and TDD
  4. Read the Documentation

Changelog

See Releases page

Apps built on ProMotion

Apps built on ProMotion

Your app

Open a pull request! We love adding new ProMotion-built apps.

API Reference

We have comprehensive documentation with code examples, usage examples, and API reference.

ProMotion Documentation

Screencasts

Help

We're no longer supporting ProMotion and it's mostly retired. If you need help, feel free to file an issue, but I may not see it.

Contributing

See CONTRIBUTING.md.

Core Team (inactive)

Other Contributors

主要指標

概覽
名稱與所有者jamonholmgren/ProMotion
主編程語言Ruby
編程語言Ruby (語言數: 2)
平台
許可證MIT License
所有者活动
創建於2012-08-30 16:35:59
推送於2025-02-04 15:14:50
最后一次提交2025-02-04 07:14:49
發布數41
最新版本名稱v3.0.0 (發布於 2020-03-04 16:43:38)
第一版名稱v0.2 (發布於 2013-04-25 07:55:48)
用户参与
星數1.3k
關注者數62
派生數144
提交數1.8k
已啟用問題?
問題數431
打開的問題數25
拉請求數320
打開的拉請求數0
關閉的拉請求數72
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?