iphone - ARC Semantic Issue: No Visible @Interface for 'UIViewController' declares the selector 'loginResult:' -
i have made lot of googling title above not solutions want. have project arc uses static library service calls. when click login button credentials passed library , gets response login view controller, problems occurs. not able pass data view controller send request. here code error occurs:
- (void)loginresult:(logindata *)logdata { [viewctrl loginresult:logdata]; ->no visible @interface 'uiviewcontroller' declares selector 'loginresult:' }
in .h (static library class)
#import <uikit/uikit.h> @interface mobilewebmethods : nsobject { uiviewcontroller *viewctrl; } @property (nonatomic, retain) uiviewcontroller *viewctrl; - (void)loginresult:(logindata *)logdata;
apologies didn't notice nsobject class, there logical error here in doing.
you have created class mobilewebmethods, of type nsobject, not uiviewcontroller. need inside separate viewcontroller import file , create instance of it:
mobilewebmethods *webmethods = [[mobilewebmethods alloc] init];
then call:
[webmethods loginresult: ... ];
Comments
Post a Comment