fixed warnings: casted NSInteger to long for format strings. typedef enum -> NS_ENUM