<分区>
标签 ios objective-c
<分区>
我在我的代码中收到此错误“Expected identifier or (”,我在“{”之前收到它 -(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
最佳答案
是的,这是虚假的,应该删除:
@end
{
关于ios - 预期标识符或 ( 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25850747/
相关文章:
iOS 将 ARSCNView 推送到 UINavigationController 并从中返回
iphone - IOS - 如何检查 SBJson 创建的 JSON NSData?
ios - UIGestureRecognizerState.Cancelled 与 UIGestureRecognizerState.Failed
iphone - 我不应该为 UIViewController 属性使用 (nonatomic, weak) 吗?
ios - SVProgressHUD 1.0 不调光和错误的样式
iphone - 使用 UISwipeGestureRecognizer 滑动 View
objective-c - 使用 addSubview 动态添加 UITextField 的 UITableViewCell - 如何在 'return' 击中键盘时获取 UITextField 值