Question: I'm working on an iOS Game and I found a piece of code on this site that I **really** want to use, and don't want to waste time studying and writing my own similar one that follows the same basic idea. Am I allowed to directly copy the code for my game?

Thanks in advance.

Answer: 
Yes. Any code posted on Stackoverflow is for the benefit, help, and use of others. If you use a ton of code give credit where credit is due.
In short: **Yes**

I see no reason you couldn't use it as a template for your own work or even copy sections directly, after all building on top of things other people have created is totally normal.

*However*, you'll probably find you get more from doing it yourself. Plus it's often more fun.

See: [Do I have to worry about copyright issues for code posted on Stack Overflow?](https://meta.stackexchange.com/questions/12527/do-i-have-to-worry-about-copyright-issues-for-code-posted-on-stack-overflow) for a fuller answer around copyright etc.

*Edit: Didn't notice the 'this site part', have clarified*