A man accused of painting a swastika on a chemist's shop wall has pleaded guilty to resisting arrest when police confronted him.