Xcode 6 competabile

After a request i made the code now work on Xcode 6