iPhone Problem comparing course value for cllocation

Posted by zebra on Stack Overflow See other posts from Stack Overflow or by zebra
Published on 2010-04-12T13:19:58Z Indexed on 2010/04/12 13:23 UTC
Read the original article Hit count: 559

Filed under:
|
|
|
|

hi all,

i'm writing some code for getting some values including course

    -(void) locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation   *)newLocation fromLocation:(CLLocation *)oldLocation {
    //somecode
    NSString *dirString = [[NSString alloc] initWithFormat:@"%d", newLocation.course];
    int myInt = [dirString intValue];
    if ((myInt >= 0) || (myint  < 90)) {course.text =@ "N";}
    if ((myInt >= 90) || (myint  < 180)) {course.text =@ "E";}

and so on, but i always retrieve the first value, "N".

where's my mistake?

Thank's!

© Stack Overflow or respective owner

Related posts about iphone

Related posts about cllocationmanager