2

それで、iPhoneアプリが私を嫌う理由を数時間探してきました。これは私が得るエラーです: 警告: 'speedView' のローカル宣言はインスタンス変数を隠します。ここに私の.mファイルがあります

@implementation MainViewController
@synthesize speedCount;
@synthesize speedView;
@synthesize popoverController;

- (void)setspeedView:(UILabel *)speedView
{
    [speedView setText: [NSString stringWithFormat:@"%d",speedCount]];
    speedCount = 0;
    speedCount++;
}

.h ファイル

#import <UIKit/UIKit.h>
#import <MapKit/MapKit.h>
@interface MainViewController : UIViewController <LoginDelegate,WEPopoverParentView,PopoverControllerDelegate,MainMenuDelegate,MKMapViewDelegate,UIActionSheetDelegate,UIAccelerometerDelegate, CLLocationManagerDelegate>
{
    AppDelegate *appDelegate;
    IBOutlet MKMapView *userMap;
    IBOutlet UILabel *speedView;
    CLLocationManager *locationManager;
}

@property (strong, nonatomic) IBOutlet UILabel *speedView;
@property(nonatomic) int speedCount;

インスタンス変数を隠していると言う理由が本当にわかりません。

4

1 に答える 1