框架中的方法不响应方法调用 [英] methods in a framework not responding to method calls

查看:36
本文介绍了框架中的方法不响应方法调用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通过引用此链接.我能够成功创建一个框架.现在,我已将此框架导入到一个新项目中,并尝试在其中调用方法.但是,任何这些方法都没有响应.即使这些方法中的NSLog语句也不会被打印.也没有错误.这非常令人沮丧.谁能帮我解决我要去哪里...

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;

推荐答案

我已经将此框架导入了一个新项目

i have imported this framework into a new project

您还在使用调用方法的特定类中为其添加了#import吗?

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

这篇关于框架中的方法不响应方法调用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆