-2

I have CurrentType as enum in a class like following:

typedef enum {
        login = 0,
        Details,
        SendImages,
       UpdateDetails,

}CurrentType;

Now In another ViewController,I want to use this CurrentType as parameter like as follows:

-(void)getLoginUserDetails:(NSData *)response :(CurrentType)service{

But when I write the following in method body

service==UpdateDetails

it gives error

How can I use this CurrentType as parameter ???

rmaddy
  • 314,917
  • 42
  • 532
  • 579
FreshStar
  • 193
  • 1
  • 1
  • 10

1 Answers1

-3

Concerning your subject: Enums in (Objective-)C are of an integral type like intor long. You can't assign or cast enums to strings directly, but rather have to implement your own conversion function.

Community
  • 1
  • 1
clemens
  • 16,716
  • 11
  • 50
  • 65