2017-04-03 8 views

答えて

0

ReactiveExtensionを作成して解決しました。

extension ReactiveExtensions where Base: UIButton { 
     var Title: Bond<String?> { 
      return bond { button, text in 
       let attributedString = NSAttributedString(string: text!) 
       button.setAttributedTitle(attributedString, for: UIControlState.normal) 
      } 
     } 
    } 
関連する問題