ios - Error: Use of undeclared identifier 'label' -
i have @property
label
in header .h file in .m file. trying - [self.view bringsubviewtofront: label];
error: use of undeclared identifier 'label'; did mean '_label'?
here's .m file
#import "viewcontroller.h" @interface viewcontroller () @property (strong, nonatomic) iboutlet uiwebview *webview; @property (weak, nonatomic) iboutlet uiwebview *webview2; @end @implementation viewcontroller @synthesize scrollview; - (void)viewdidload { [super viewdidload]; // additional setup after loading view, typically nib. draw1 = 0; scrollview.frame = cgrectmake(0, 300, 480, 55); [scrollview setcontentsize:cgsizemake(480, 55)]; openmenu.frame = cgrectmake(220, 270, 60, 30); // stuff************************************************************************************************************************ [super viewdidload]; uiwebview *webview=[[uiwebview alloc]initwithframe:cgrectmake(0, 0, self.view.frame.size.width,self.view.frame.size.height)]; nsstring *url=@"http://test.bithumor.co/test26.php"; nsurl *nsurl=[nsurl urlwithstring:url]; nsurlrequest *nsrequest=[nsurlrequest requestwithurl:nsurl]; [webview loadrequest:nsrequest]; [self.view addsubview:webview]; webview.scrollview.bounces = no; // additional setup after loading view, typically nib. uiwebview *webview2=[[uiwebview alloc]initwithframe:cgrectmake(0, 0, self.view.frame.size.width,self.view.frame.size.height)]; nsstring *url2=@"http://google.com"; nsurl *nsurl2=[nsurl urlwithstring:url2]; nsurlrequest *nsrequest2=[nsurlrequest requestwithurl:nsurl2]; [webview2 loadrequest:nsrequest2]; webview2.scrollview.bounces = no; [self.view bringsubviewtofront:webview]; [self.view bringsubviewtofront: openmenu]; [self.view bringsubviewtofront: scrollview]; [self.view bringsubviewtofront: label];
and here .h file
#import <uikit/uikit.h> @interface viewcontroller : uiviewcontroller{ iboutlet uiscrollview *scrollview; iboutlet uibutton *openmenu; int draw1; } - (ibaction)openmenu:(id)sender; @property (retain, nonatomic) iboutlet uiscrollview *scrollview; @property (weak, nonatomic) iboutlet uilabel *label; @end
how rid , fix error?
say self.label
instead of label
.
[self.view bringsubviewtofront: self.label];
Comments
Post a Comment