finish updating the code for IOS7.0, all functions work well