iPhone Problem comparing course value for cllocation
- by zebra
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!