0

I have multiple ViewControllers all linked to an initial ViewController. Each of the extra ViewControllers acts as a 'tennis court', with player1 and player2's names entered into UITextFields, and then stored in an array.

Is it possible, using a UISearchBar on the initial ViewController, to search the name of a player stored in one of the various variables, and then for that result to link to the ViewController within which it appears?

1 Answer 1

1

Recall MVC.

You never store your data or model in any viewControllers. You store them in a model that may be an array, dictionary, or plist or even a database.

So you need to search from the model using your UISearchBar.

*If you show your code, we can correct them.

Sign up to request clarification or add additional context in comments.

1 Comment

I don't understand, what is a 'model' in this context?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.