1

コアロケーション フレームワークを使用しています。ソーシャル ネットワーク アプリケーションで使用するために現在地を偽装することは可能ですか? はいの場合、どのように?

助けてください。

前もって感謝します。

:: 編集済み ::

もう少しサーフィンした後、そのためのコードを作成しましたが、クラス CLLocationManager のオーバーライド メソッドを使用して変更される可能性があります。次のようなコード:

@interface MyHeading : CLHeading
        -(CLLocationDirection) newHeading;
-(CLLocationDirection) new1Heading;
@end

@implementation MyHeading
-(CLLocationDirection) newHeading { return 55; }
-(CLLocationDirection) new1Heading { return 56; }
@end

@implementation CLLocationManager (LF)
- (void)setFLocation {
    CLLocation *location = [[CLLocation alloc] initWithLatitude:40.778023 longitude:-73.981935];
    [[self delegate] locationManager:self didUpdateToLocation:location fromLocation:nil];

    id heading  = [[MyHeading alloc] init];
    [[self delegate] locationManager:self didUpdateHeading: heading];
}

-(void)startUpdatingHeading {
    [self performSelector:@selector(setFLocation) withObject:nil afterDelay:0.1];
}

- (void)startUpdatingLocation {
    [self performSelector:@selector(setFLocation) withObject:nil afterDelay:0.1];
}
@end

共有していただきありがとうございます。再度、感謝します。

4

1 に答える 1

0

次のフレームワークを試してみてください。

于 2012-06-08T08:52:34.170 に答える