我收到此错误"预期的标识符或("在我的代码中,我在" {"之前 - (void)viewDidAppear在m文件中,我在考虑是否错过了像支架或类似的东西..
h文件
#import <UIKit/UIKit.h>
#import <MapKit/MapKit.h>
#import <CoreLocation/CoreLocation.h>
@interface WalkingTableViewController: UIViewController <MKMapViewDelegate>
@property (weak, nonatomic) IBOutlet MKMapView *MKMapView;
@end
m文件
#import "WalkingTableViewController.h"
@interface UITableViewController ()
@end
@implementation WalkingTableViewController
- (IBAction)StopButton:(id)sender
{
}
- (IBAction)StartButton:(id)sender
{
}
@end
{
- (void)viewDidAppear:(BOOL)animated
{
[super viewDidLoad]
self.MKMapView.showsUserLocation=YES;
self.MKMapView.delegate = self;
[self.MKMapView setUserTrackingMode:MKUserTrackingModeFollow animated:YES];
[super viewDidAppear:animated]
CLLocationManager* tempLocationManager = [[CLLocationManager alloc] init];
MKCoordinateRegion tRegion = MKCoordinateRegionMakeWithDistance([tempLocationManager.location coordinate], 1000,1000);
[self.MKMapView setRegion:tRegion animated:animated];
}
@end
答案 0 :(得分:2)
是的,这是假的,应该删除:
@end
{