Fixed dozens of compile errors caused by ios8 beta-> 8.1 syntax changings.