ios - Compare a enum type in a If -


i'm having problems comparing enum type.

this enum:

    enum typeson {folder, service};     enum typeson *type; 

and have 1 method on class return method type.

-(void) settype: (enum typeson) t; -(enum typeson) gettype; 

and if this, works:

nslog(@"object type: %d", [[[actualnode sons] objectatindex:indexpath.row] gettype]); 

it returns 1 or 0 depends on type. problem when this:

if (![[[actualnode sons] objectatindex:indexpath.row] gettype]==service) {     nslog(@"this service type"); } 

it doesn't work. have tried change 'service' 1, '1'... nothing happens. thanks

//  ! shouldn't there. //  v if (![[[actualnode sons] objectatindex:indexpath.row] gettype]==service) {     nslog(@"this service type"); } 

Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -