我正在编写一些代码来获取一些值,包括课程
-(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";}
依此类推,但我总是检索第一个值“N”。
我的错在哪里?
谢谢!