uiviewcontroller - Use of undeclared identifier in VC but its declared in the Custom UIImageView -
i'm having trouble use of undeclared identifier. have created custom uiimageview , in have declared @property uilabel 'answelbl'. have imported custom uiimageview.h file viewcontroller.h file whenever try use 'answerlbl' comes error 'use of undeclared identifier'. how stop problem, need use 'answerlbl' in viewcontroller?
this viewcontroller.h
#import <uikit/uikit.h> #import "numberpadimageview.h" @interface viewcontroller : uiviewcontroller { numberpadimageview *numberkeyboard; }
and here custom uiiimageview => numberpadimageview.h
#import <uikit/uikit.h> @interface numberpadimageview : uiimageview { uilabel *answerlbl; uibutton *onebtn; uibutton *twobtn; uibutton *threebtn; uibutton *fourbtn; uibutton *fivebtn; uibutton *sixbtn; uibutton *sevenbtn; uibutton *eightbtn; uibutton *ninebtn; uibutton *zerobtn; uibutton *backbtn; uibutton *periodbtn; uibutton *clearanswerfieldbtn; } @property (nonatomic, strong) iboutlet uilabel *answerlbl; -(ibaction)buttonpressed:(uibutton *)sender; -(ibaction)backspace:(id)sender; -(ibaction)clearanswerlbl:(id)sender;
@property (nonatomic, strong) numberpadimageview *imageview;
in viewdidload,
self.imageview = [[numberpadimageview alloc]init];
access by,
self.imageview.answerlbl
and declare answerlbl property,
@property (nonatomic, strong) uilabel *answerlbl;
Comments
Post a Comment