with "super" you access your base class, the one your current class has inherited from
to do what you've explained, you need to access a property of your parent view, which is rather complicated since this will most likely end with both classes trying to reference each other.
thus you will most likely have to create a delegate pattern, looking somewhat like this
ParentView.h
@protocol IAmYourFatherAndMotherProtocol
@class ChildView;
@interface ParentView : UIViewController <IAmYourFatherAndMotherProtocol>
{
NSInteger statusID;
}
@property (nonatomic) NSInteger statusID;
@protocol IAmYourFatherAndMotherProtocol
@property (nonatomic) NSInteger statusID;
@end
@end
in ChildView.h
#import "ParentView.h"
@interface ChildView : UIViewController
{
id<IAmYourFatherAndMotherProtocol> delegate;
}
@property (nonatomic, assign) id <IAmYourFatherAndMotherProtocol> delegate;
when creating your ChildView in ParentView.m, you have to set "self" as delegate, eg:
ChildView *newChild = [[ChildView alloc] init];
newChild.delegate = self;
by doing so, you can access "statusID" of your ParentView in ChildView.m like this:
delegate.statusID = 1337;
hope this helps
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…