Open mschonvogel opened 9 years ago
Hi, thanks for the suggestion.
I was thinking about a generic PlaceholderViewProtocol
that every placeholder view can optionally adopt. The protocol gets called whenever the view
willAppear
didAppear
willDisappear
didDisappear
Optionally, the current state (including any errors) might be passed with these calls. Would that be sufficient in your case?
Yes, that would be sufficient. One more thing: In some of my ViewControllers, I would like the StatefulView not to cover the whole screen. I would like to set an y-offset or a custom constraint. Is there a non-hacky way to achieve that? Thanks!
Perfect. :+1: Not sure when I will start to tackle this issue, if you want to hack on it feel free to open a pull request any time.
Regarding your question: A quick solution would be to use a transparent view as one of your placeholder views. However, this will block the UI behind it.
Alternatively, we could look into the possibility to provide a delegate method (on the view or the controller) to return the constraints for specific views.
Any updates on exposing the NSError object inside the error view? I would really like to give a better explanation to the user why the operation failed, instead of a generic message.
In order to give the user a more concrete info than just "Something went wrong.", it would be straightforward to have access to the NSError object in the view.