ios - Possible to check segue from which viewcontroller then do something? -
ios - Possible to check segue from which viewcontroller then do something? -
for illustration have 3 views:
savecontactview (tableview - editable) detailedcontactview (view - display only) listcontactview (tableview - display list)listcontactview contains dynamic records of customers. tap on cell segue detailedcontactview.
listcontactview contains 'add' button segue savecontactview.
savecontactview when user save go detailedcontactview.
detailedcontactview, user can 'edit' , goes savecontactview
this question: listcontactview detailedcontactview or savecontactview detailedcontactview on viewdidload on detailedcontactview possible phone call different methods/functions when comes view?
i not want create redundant duplicated 'alike' view. there best approach?
you can apply check in viewdidload
of detailedcontactview
parent of view. if using force segue check parent view controller of view controller in uinavigationcontroler stack
.
if modally present
detailedcontactview
find [self presentingviewcontroller]
, take appropriate action.
or set flag lastly page distinguish between parents.
may help you.
ios objective-c iphone uitableview segue
Comments
Post a Comment