0

速度を上げるために uilabel の整数を更新したいのですが、うまくいかないようです。 . 私のuilabelはspeedViewと呼ばれています

- (void)viewDidLoad {
    [super viewDidLoad];

    CLController = [[CoreLocationController alloc] init];
    CLController.delegate = self;
    [CLController.locMgr startUpdatingLocation];

}
- (void)locationUpdate:(CLLocation *)location {
    NSNumber *speedCount = [NSNumber numberWithInt:1];
    [speedView setText: [NSString stringWithFormat:@"number is %@d",speedCount]];
    }

- (void)locationError:(NSError *)error {
    speedView.text = [error description];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation {
    return YES;
}

- (void)viewDidUnload {
}

- (void)dealloc {
    [CLController release];
    [super dealloc];
}


@end

@interface MainViewController : UIViewController <LoginDelegate,WEPopoverParentView,PopoverControllerDelegate,MainMenuDelegate,MKMapViewDelegate,UIActionSheetDelegate, CLLocationManagerDelegate>
{
    AppDelegate *appDelegate;
    IBOutlet MKMapView *userMap;
    IBOutlet UILabel *speedView;
}

@property (strong, nonatomic) IBOutlet UILabel *speedView;
@property(nonatomic) int speedCount;
- (void)setSpeedView:(UILabel *)speedView;

誰かが私にアイデアを提案してくれますか? 私は考えました.価値が伝わらない理由はありますか?

4

1 に答える 1