Photographing in Morocco is not easy at all, and it is also a well-known thing.
People hate being photographed. A Moroccan once yelled at me: "hey! I'm not an exhibition!".
Around it is believed that photography steals the soul. Looking at the Moroccans I think back to my Sicilian grandmother, who never wanted to be photographed with pleasure, she told me: "Don't photograph me! I'm not dead!". Indeed, once in Sicily it was used to photograph mainly the dead, and funerals. In Morocco they believe more or less the same things.
In addition, the medinas are labyrinths, one often feels confused, not at ease. What's more, you know that by taking a picture, someone might get seriously angry.
All the photos I took I took with a bit of cunning, I know it is a bad method, also not respectful. But the beauty of this country is reckless, how can you pretend nothing has happened and take nothing? It is a risk worth taking, after all you, unlike them, know that you are not stealing their soul, but you are only showing it to others.