【发布时间】:2010-09-22 04:52:48
【问题描述】:
@起初我以为它没有开火,但看到this
所以我等待,现在我得到了未处理的异常:MonoTouch.Foundation.You_Should_Not_Call_base_In_This_Method:抛出了“MonoTouch.Foundation.You_Should_Not_Call_base_In_This_Method”类型的异常。在失败的处理程序中。
我已经定义了一个 CLLocationManager,这里是 FinishedLaunching & CLLocationManagerDelegate
public override bool FinishedLaunching (UIApplication app, NSDictionary options)
{
// If you have defined a view, add it here:
// window.AddSubview (navigationController.View);
_locationManager = new CLLocationManager();
_locationManager.Delegate = new LocationManagerDelegate(this);
_locationManager.StartUpdatingLocation();
window.MakeKeyAndVisible ();
return true;
}
private class LocationManagerDelegate : CLLocationManagerDelegate
{
private AppDelegate _appd;
public LocationManagerDelegate(AppDelegate appd)
{
_appd = appd;
Console.WriteLine("Delegate created");
}
public override void UpdatedLocation(CLLocationManager manager
, CLLocation newLocation, CLLocation oldLocation)
{
Console.WriteLine("Lat: " + newLocation.Coordinate.Latitude.ToString());
}
public override void Failed (CLLocationManager manager, NSError error)
{
//_appd.labelInfo.Text = "Failed to find location";
Console.WriteLine("Failed to find location");
base.Failed (manager, error);
}
}
我正在使用最新的 monodevelop、monotouch、xcode 和 iphone SDK,几天前刚刚安装了一个 coupla。有什么建议吗?
问候
_埃里克
【问题讨论】: