Implement the code For iOS8