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

stackViewを使ってボタンをつくった話

Avatar for sun54907 sun54907
November 28, 2017

 stackViewを使ってボタンをつくった話

potatotips #45 で話したものです。

Avatar for sun54907

sun54907

November 28, 2017
Tweet

More Decks by sun54907

Other Decks in Programming

Transcript

  1. ςΩετ ࢖͍ํ let buttonView = ComponentButtonView.instantiate( data: .init(text: “Ϙλϯϥϕϧ”), style:

    .medium(.fill), colorType: .primary ) stackView.addArrangedSubview(buttonView)
  2. ςΩετ ໰୊఺ ▸ ৭ͷࢦఆ͕୯৭͔͠ରԠͯ͠ͳ͍ͷͰɺόϦΤʔγϣϯΛͭ ͚͍ͨ ▸ λοϓͯ͠৭͕มΘΔͷ͸ɺnormal, highlighted, disableͷ3 ύλϯ͔͠ͳ͍ͷͰɺશ෦ʹରԠ͍ͨ͠

    ▸ ໊લ͕͋Μ·Γؾʹೖͬͯͳ͍ ▸ xib͔Βੜ੒ͯ͠Δ͕ɺશ෦ίʔυͰੜ੒ͨ͠ํ͕࢖͍қͦ͏ ▸ ެ։ͯ͠Δ͚Ͳɺ·ͩಈ͔ͳ͍