-
Notifications
You must be signed in to change notification settings - Fork 150
Open
Description
Hi,
I've been trying to implement a UIRefreshControl
and bind it to an Action
:
refreshControl.rx.bind(to: viewModel.action, inputTransform: { _ in })
This is being done in the init of the view and before the view appears the action method is executed to populate some info.
The issue is that whenever this screen is opened the refresh control is shown at the top before disappearing after the action finishes executing. This only happens when the view is instantiated and displayed, navigating back to it doesn't trigger this behavior. Executing on viewDidAppear
also doesn't give this issue.
override public func viewWillAppear(_ animated: Bool) {
self.viewModel.action.execute()
super.viewWillAppear(animated)
}
Declaration of the viewModel with the action:
let action: Action<Void, ServiceResponse>
...
public init(...) {
...
getCartAction = Action {
repository.getInfo()
.asObservable()
}
...
}
This is happening on both iPhone and Simulator.
Metadata
Metadata
Assignees
Labels
No labels