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

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -