As I can see many have already answered this question. I would therefore do it in a slightly different way by sharing my own experience.
Sometime back, I had an opportunity to interview some prospective candidates for the position of a senior mobile developer. I don’t expect the candidates to recite codes. It’s easy to memorize code snippets, but that doesn’t make a good developer. As an interviewer, you must find the right candidate by their attitude.
Try the following:
1. Look for a portfolio, and review the samples.
2. Ask questions about troubleshooting.
3. Ask them to write a random code in front of you.