ios - Is any UIKit element declared in .h file public or protected in objective c? -
i newbie in ios development , have doubt if declare uikit element such uilabel *label in some.h file not in .m file, protected or public other classes if import class class , access using class instance?
#import <uikit/uikit.h> @interface latestnews_viewcontroller : uiviewcontroller @property (strong, nonatomic) iboutlet uiimageview *latestnewsbackimg; @property (strong, nonatomic) iboutlet uiimageview *latestnewsdateimg; @property (strong, nonatomic) iboutlet uilabel *latestnewsdate;
is latestnewsdate public or protected??
1). properties in code can accessed class importing "latestnews_viewcontroller". i.e. public classes.
2). can make private property in class
example:
@interface latestnews_viewcontroller : uiviewcontroller { nsstring *latestnewsbackimg; //private nsstring *latestnewsdateimg; //private } nsarray *array; //public @end
Comments
Post a Comment