I have class A which has toolbar(created progmatically) & with
property(nonatomic,retain) Ihave added that toolbar as a subview in class A In another class B. I want to make toolbar of class A hidden
How to do that ? i am using but it isn’t working? please give me
solution. I am using Xcode 4.3.1
I am writing this code in class B
But its not Working
ClassA *aobj= [[classA alloc] init];
[aobj.toolbar sethidden:yes];
Add
extern id context;in classA.h then addid context;classA.m (@place where global varriable are declared) andadd context = self;in ViewDidLoad of classA. Then import classA.h in classB and[context.toolbar sethidden:yes];,here you are making object of class a as exernal varriable.This is not a good method.If you need better method pls explain how and where you are creating classB.