我正在寫一些代碼得到一些價值當然也包括iPhone問題當然比較值cllocation
-(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 [email protected] "N";}
if ((myInt >= 90) || (myint < 180)) {course.text [email protected] "E";}
等等,但我始終檢索的第一個值,「N」。
我的錯誤在哪裏?
謝謝!
感謝的jasarien, 謝謝,我已經明白了這個錯誤 – zebra 2010-04-12 15:51:15