Fix the screen title for each request in the sample app #3494
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Goals ⚽
Fix the title of the
DetailViewController, in the iOS sample app. It permanently displays the following title: No request created yet., even after the test request is performed (more context in the gif files).This happens because the
titleis changed too early, before the internalURLRequestgets configured (which is used in thedescriptionproperty).To fix this issue, the controller now assigns a closure to the
onURLRequestCreationmethod on theRequesttype. Inside this closure, it updates its title.Before the change:
After the change: