( myScrollView.delegate = self;
) の下の行に警告があります: Local declaration of 'myScrollView' hides instance variable
。私の質問は、なぜこれが起こっているのですか?
myViewController.h
@interface myViewController : UIViewController
{
UIScrollView *myScrollView;
}
myViewController.m
UIScrollView *myScrollView = [[UIScrollView alloc] initWithFrame:self.view.bounds];
myScrollView.delegate = self; // Warning: Local declaration of 'myScrollView' hides instance variable