Hi… I’m following this fantastic book written on an excellent topic! I tried typing in the following example in an ordinary ViewController class in my project with Rx. These lines come from page 34.
UIDevice.rx.orientation
.subscribe(onNext: { current in
switch current {
case .landscape:
... re-arrange UI for landscape
case .portrait:
... re-arrange UI for portrait
}
})
Error is: Type Reactive has no member orientation.
A question or two:
- If the book is outdated, how do I go about finding what the real code should be?
- How should this code be written today?
Thank you ver much and I look forward to progressing through the book – hopefully with more compilable examples!