Skip to content

Instantly share code, notes, and snippets.

RxSwift

Traits

Single Maybe Completable
Type ObservableType ObservableType ObservableType
呼び出し subscribe subscribe subscribe
import UIKit
import RxSwift
import RxCocoa
import SVProgressHUD

final class ViewController: UIViewController {
    
 @IBOutlet weak private var button: UIButton!
import UIKit
import RxSwift
import RxCocoa

final class ViewController: UIViewController {
    
import UIKit
import RxSwift
import RxCocoa

final class ViewController: UIViewController {
    
    @IBOutlet weak private var textField: UITextField!
    @IBOutlet weak private var button: UIButton!
  • UIColorのalphaを設定する
extension UIColor {
    
    func alpha(_ value: CGFloat) -> UIColor {
        return withAlphaComponent(value)
    }
}