0.0
No commit activity in last 3 years
No release in over 3 years
Rubymotion helpers for building UI elements with support for pixate styleId and styleClass attributes
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

MAML

Maml (rubyMotion HAML) lets you create UI elements using a haml-style tag#id.class_name syntax. Maml is best-friends-forever with the Pixate engine.

Maml (rubyMotion HAML) allows you to create UI elements with Haml syntax.

label = UI("label#buy.green")

# Equivalent to
label = UILabel.alloc.init
label.styleId = "buy"
label.styleClass = "green"

It accepts a hash of attributes that will be assigned to the element.

UI("label#buy", :frame => [[0,0],[100,0]], :text => "Hello")

Installation

Install gem

gem install motion-maml

In Gemfile

gem "motion-maml", '~> 0.1.1'

Supported elements

{
  'action-sheet'    => UIActionSheet,
  'activity-indicator-view' => UIActivityIndicatorView,
  'bar-button-item' => UIBarButtonItem,
  'button'          => UIButton,
  'collection-view' => UICollectionView,
  'collection-view-cell' => UICollectionViewCell,
  'date-picker'     => UIDatePicker,
  'image-view'      => UIImageView,
  'label'           => UILabel,
  'navigation-bar'  => UINavigationBar,
  'page-control'    => UIPageControl,
  'picker-view'     => UIPickerView,
  'refresh-control' => UIRefreshControl,
  'scroll-view'     => UIScrollView,
  'search-bar'      => UISearchBar,
  'segmented-control' => UISegmentedControl,
  'slider'          => UISlider,
  'stepper'         => UIStepper,
  'switch'          => UISwitch,
  'tab-bar'         => UITabBar,
  'tab-bar-item'    => UITabBarItem,
  'progress-view'   => UIProgressView,
  'table-view'      => UITableView,
  'table-view-headerfooter-view' => UITableViewHeaderFooterView,
  'text-field'      => UITextField,
  'text-view'       => UITextView,
  'toolbar'         => UIToolbar,
  'view'            => UIView,
  'web-view'        => UIWebView,
  'table-view-cell' => UITableViewCell
}