LoginSignup
1
0

More than 5 years have passed since last update.

【Swift3】Rxswiftの記法変更に伴って

Last updated at Posted at 2017-09-20

RxSwiftの記法がSwift3で変更されている

swift2まで

.subscribeNext( { } )
rx_response
switch observedEvent {
        case .Next(let value):
            ()

        case .Error(let error):
            ()

        case .Completed:
            ()
        }


swift3

.subscribe(onNext: { } )
rx.response
switch observedEvent {
        case .next(let value):
            ()

        case .error(let error):
            ()

        case .completed:
            ()
        }



自動変換では対応してくれないので注意

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0