quattro_4 scribble

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

MotionInMotion Episode 21 - My Process, Custom Forms, and Date Fields

My Process, Custom Forms, and Date Fields - MotionInMotion

  • MIMInputToolbar
    • gem 'MIMInputToolbar'
    • キーボードにPrevious, Next, Done (to dismiss)があって、inputs間を移動できる
  • TPKeyboardAvoiding
    • pod 'TPKeyboardAvoiding'
    • handy
    • キーボードとスクロールをいい感じにしてくれる
  • refactor text field
    • move layer border to subclass of UITextField
    • self.layer.borderColor = UIColor.grayColor.CGColor
  • replace datepicker with date field
    • class DateField < TextField
      • @date_picker = UIDatePicker.new.tap do |v|
        • v.addTarget(self, action: 'pick_date:', forControlEvents: UIControlEventValueChanged)
      • def date=(date)
        • @date_picker.date = date
        • self.text = MHPrettyDate.prettyDateFromDate(date, withFormat: MHPrettyDateFormatWithTime)
  • class TaskView < TPKeyboardAvoidingScrollView
    • @field_bar = MIMInputToolbar.new
    • self.date_field = DateField.new.tap do |v|
      • v.inputAccessoryView = @field_bar
  • vim
    • :e file
    • :tabe file
      • tabを開いてedit