orientation fuctions for ios and android