methods in a framework not responding to method calls

青春壹個敷衍的年華 提交于 2019-12-12 05:26:36

问题


i have created a framework from an existing codebase by referring this link "How to create a framework in iOS". I was able to create a framework successfully. Now, i have imported this framework into a new project and tried to call the methods in it. But, there is no response from any of these methods. Even the NSLog statements in these methods are also not getting printed. There are no erros either. this is very frustrating. Can anyone help me out as to where i am going worng...

#import <framework/FIClassA.h>----> this is frame work import

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions


self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
self.viewController = [[[TrailOneViewController alloc] initWithNibName:@"TrailOneViewController" bundle:nil] autorelease];
FIClassA *objA = [[FIClassA alloc] init];  //----> creating a object for a class in the framework
[objA methodA];   //----> calling a method in the framework

self.window.rootViewController = self.viewController;
[self.window makeKeyAndVisible];
return YES;

回答1:


i have imported this framework into a new project

Have you also added an #import for it in the particular class where you are using the methods you're calling?



来源:https://stackoverflow.com/questions/8427285/methods-in-a-framework-not-responding-to-method-calls

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!