Deleting email on gmail from iOS Mail

I don't know how old this is, or how well known this is but I just figured this out so I'm putting it out there.

Deleting email from Gmail normally archives it (I have configured gmail as exchange so this post maybe irrelevant for some)

but if you go to Gmail web mail, go to settings - Forwarding and POP/IMAP under IMAP Access select auto expunge ooff

Then the option below it which says "when a message is marked as deleted…" will become activated change it to move the message to trash.