Upgrade to Pro — share decks privately, control downloads, hide ads and more …

wwdc19

 wwdc19

Shigure Shimotori

June 25, 2019
Tweet

More Decks by Shigure Shimotori

Other Decks in Programming

Transcript

  1. λΠจࣈ໰୊;ͨͨͼ จࣈͷେ͖͞ʢਅʣΛௐ΂Δ ▸ Core TextΛ࢖͑͹ਖ਼֬ͳେ͖͕͞Θ͔Δ let word = "ประเทศญี่ปุ่น" let

    attributedString = NSAttributedString(string: word) let line = CTLineCreateWithAttributedString(attributedString) let rect = CTLineGetBoundsWithOptions(line, .useGlyphPathBounds)
  2. μʔΫϞʔυରԠɺ։ນ dynamic imageͷͭ͘Γ͔ͨ ▸ UIImageAssetΛ࡞Ε͹͍͚Δʂ let imageAsset = UIImageAsset() imageAsset.register(lightImage,

    with: lightTraitCollection) imageAsset.register(darkImage, with: darkTraitCollection) let image = imageAsset.image(with: UITraitCollection.current)