quattro_4 scribble

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

MotionInMotion Episode 13 - Dynamic Type

Dynamic Type - MotionInMotion

フォントサイズの変更

  • PostsControllerTableViewDataSource
    • app/data_sources/PostsControllerTableViewDataSource.rb
    • cell.textLabel.font = UIFont.preferredFontForTextStyle(UIFontTextStyleHeadline)
      • Headline, SubHeadline, Body, Footnote, Caption1, Caption2
  • Settings > General > Font Size
  • PostsControllerTableViewDelegate
    • tableView(tableView, heightForRowAtIndexPath:
      • ("Reference Text".sizeWithFont(UIFont.preferredFontForTextStyle(UIFontTextStyleHeadline)).height * 1.5)
  • NSNotificationCenter.defaultCenter
    • .addObserver font_changed UIContentSizeCategoryDidChangeNotification
    • controller
      • include PostsControllerTableViewDataSource
      • include PostsControllerTableViewDelegate
      • font_changed
        • self.tableView.reloadData
    • view
      • font_changed
        • self.contentView.font = UIFont.preferredFontForTextStyle(UIFontTextStyleBody)
        • self.authorAreaLabel.font = UIFont.preferredFontForTextStyle(UIFontTextStyleHeadline)