quattro_4 scribble

scribble 落書き (調べた事をただ落書きする)

MotionInMotion Episode 23 - MotionKit Basics and AutoLayout

MotionKit Basics and AutoLayout - MotionInMotion

motion-kitでレイアウト

  • gem install 'motion-kit'
    • new gem for styling
    • good-bye teacup
  • class ExampleLayout < MotionKit::Layout
    • add UIView, :header do
      • background_color UIColor.darkGrayColor
      • add UILabel, :main_text do
        • text_alignment UITextAlignmentCenter
        • text_color UIColor.whiteColor
        • target.numberOfLines = 0
    • def add_constraints
      • constraints(:main) do
        • top.equals(:header, NSLayoutAttributeBottom).plus(20)
        • width.equals(:header).divided_by(2).minus(10)
  • dependency