Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Access NSError Object in ErrorView #7

Open
mschonvogel opened this issue Apr 24, 2015 · 4 comments
Open

Access NSError Object in ErrorView #7

mschonvogel opened this issue Apr 24, 2015 · 4 comments

Comments

@mschonvogel
Copy link

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.

@aschuch
Copy link
Owner

aschuch commented Apr 25, 2015

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?

@mschonvogel
Copy link
Author

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!

@aschuch
Copy link
Owner

aschuch commented Apr 28, 2015

Perfect. 👍
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.

@jyounus
Copy link

jyounus commented May 19, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants