I have established a representative for my class 'hot airview', but there are problems in implementing it. Any ideas below for my class code? Thanks
HotRequest.h
#import & lt; Foundation / Foundation. H & gt; @protocol HotRequestDelegate; @Inteface HotRequest: NSOBs {NSSTING * RequestString; Id & lt; HotRequestDelegate & gt; Representative; } @property (nontomic, write) NSString * requestString; @protecti (nanatomic, assign) id & lt; HotRequestDelegate & gt; Representative; - (id) initWithRequestOptions: (NSDictionary *) dict; @end @protocol HotRevicesDelaget & lt; NSObject & gt; @required - (zero) request complete; @end
HotRequest.m
#import "HotRequest.h" @ implementation HotRequest @ synthesis request string, delegate; - (id) initWithRequestOptions: (NSDictionary *) for dict {if ((self = [super init])) {{[all APIs in NSTIR * key} {requeststring = [format with nssstring string: @ "% @ And% @ =% @ ", request string, key, [dic Octofforaki: key]]; } NSLog (@ "% @", request string); } [Delegate request completed]; Self return; } @end
WelcomeViewController.h
#import & lt; UIKit / UIKit.h & gt; #import "HotRequest.h" @ Interface Wellcome Controller: UIViewController & lt; HotRequestDelegate & gt; {HotRequest * myRequest; } @ Property (nontomic, raten) hotridge * myrequest; @end
WelcomeViewController.m
#import "WelcomeViewController.h" #import "HotRequest.h" @EmploymentViewViewController @MyRequest Synthesize; - (zero) viewDidoadload [[Super Viewedload]; NSDictionary * mydict = [[NSDictionary alloc] initWithObjectsAndKeys: @ "2", @ "1", @ "4", @ "3", zero]; MyRequest = [[Hotridge Alok] initWithRequestOptions: mydict]; [[Self Myridge] Set Deliaget: Self]; } - (zero) request complete {nslog (@ "request complete"); } @end
rep
still zero Is
in initWithRequestOptions:
. Before setting up the representative you are trying to call the representative method.
Comments
Post a Comment