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.
Adds an
onTapped
method forTabChildItem
s that can be passed through the property wrapper and indicate whether the tab was just tapped through theisRepeat
parameter:false
if the tab was just selected andtrue
if it was previously selected and was selected again. The coordinator used along with the tab item is passed to the function for whatever behavior, like popping to the root of a navigation view which I provided in the sample app.A probable solution to #56 is to have an internal notification fire when the tab is repeated and the corresponding view listens to that notification as I don't think that a
ScrollView/List
or any other information can be grabbed just by being passed aCoordinator
orView
. I would have to look more into that.There is a small undesirable behavior where at least a few (3-4) views/coordinators are pushed, and then
popToRoot()
is called, instead of a single push occurring a few of the views/coordinators pop one at a time. I don't know if this was previous behavior withpopToRoot()
but was just an observation of mine.I'm only iffy in the
using
function onContent
by implicitly setting_output
and force unwrapping it inonTapped
. I just quickly took this shortcut asusing
is implicitly called when aTabChildItem
is created but I would want to move setting_output
toinit
. Let me know if this is requested and I'll readily make the change.