草庐IT

first-class

全部标签

objective-c - 苹果错误 - "_OBJC_CLASS_$_TFHpple"

我的应用程序使用Hpple。我包括了TFHpple.h、TFHpple.m、TFHppleElement.h、TFHppleElement.m、XPathQuery.h和XPathQuery.m。还包括${SDKROOT}/usr/include/libxml2和-lxml2。我有这么一小段代码:NSData*data=[[NSDataalloc]initWithContentsOfFile:@"example.html"];TFHpple*xpathParser=[[TFHpplealloc]initWithHTMLData:data];当我尝试运行它时,我收到此错误:"_OBJC_

ios - Objective-C : how to inherit category methods loaded in a parent class?

在我的项目中,我使用了NSObject+Properties.h类别(参见aqtoolkit:https://github.com/AlanQuatermain/aqtoolkit/blob/master/Extensions/NSObject%2BProperties.h)然后我有一个我声明为的类#import#import"NSObject+Properties.h"@interfaceGFDictionaryInitiable:NSObject...然后我有几个GFDictionaryInitiable的子类,例如GFRestaurant:#import#import"GFDic

ios - 在 xcode 5 中隐藏 "*** First throw call stack"

在Xcode5中调试时,有没有办法隐藏调用堆栈并仅显示错误日志,或者手动打开和关闭它?我只想要这样的错误日志:TestProject[31643:70b]***Terminatingappduetouncaughtexception'NSGenericException',reason:'Couldnotfindanavigationcontrollerforsegue'SecondViewController'.PushseguescanonlybeusedwhenthesourcecontrollerismanagedbyaninstanceofUINavigationContro

ios - 所有子类的 class_copyPropertyList 也

这里是解释ListofclasspropertiesinObjective-C如何使用class_copyPropertyList在运行时获取类的所有属性。我已经测试过了,它工作正常。我注意到它只会从该类获取属性,而不是它的子类。代码:@interfaceJustForThisUT:NSObject@propertyNSUIntegerpublic_access;@end@interfaceJustForThisUT()@propertyNSUIntegerprivate_access;@end@implementationJustForThisUT@end@interfaceJust

ios - NSDate 是 MemberOfClass : [NSDate class] returns false?

这个问题在这里已经有了答案:usageofisMemberOfClass;returningfalse(3个答案)关闭7年前。这很奇怪。以下if语句失败。有什么问题吗?NSDate*date=[NSDatedate];if([dateisMemberOfClass:[NSDateclass]]){//Notexecuted.}

ios - 将 "class"消息发送到类的实例是什么意思

在Facebook登录代码中https://developers.facebook.com/docs/facebook-login/ios/advanced,他们要求我们执行以下序列通过Storyboard声明将要显示的View属于“FBSDKLoginButton”类。在应用委托(delegate)didFinishLaunchingWithOptions中执行以下行。[FBSDKLoginButtonclass];向对象发送“类”消息是什么意思? 最佳答案 用于调用FBSDKLoginButton的initialize方法。+(

ios - 覆盖函数错误!方法不会覆盖其父类(super class)中的任何方法

overridefunctouchesBegan(touches:Set,withEventevent:UIEvent){}overridefuncsupportedInterfaceOrientations()->Int{}这里我有一个错误。它说Methoddoesnotoverrideanymethodfromitssuperclass.多次出现,我无法修复。你知道吗? 最佳答案 错误来了,因为你的方法签名与实际的不同。您应该使用确切的方法签名进行覆盖(您应该使用Xcode中提供的自动完成功能或引用文档)TouchesBegan

objective-c - "This class is not key value > coding-compliant for the key previewB"但我已经删除了 previewB

我从nib文件中删除了一个按钮。我还删除了与该按钮关联的socket和IBAction。我已经清理了我的项目并卸载了该应用程序。但是我仍然收到以下错误消息:Terminatingappduetouncaughtexception'NSUnknownKeyException',reason:'[setValue:forUndefinedKey:]:thisclassisnotkeyvaluecoding-compliantforthekeypreviewB.'但是如果我在我的工作区中搜索previewB,我找不到任何东西。我已将其从ComposerViewController中删除。谢谢

iphone - iOS5 ARC 应用程序 : __NSAutoreleaseNoPool(): of class NSCFNumber autoreleased with no pool in place - just leaking

我最近为我的应用程序项目切换到ARC。我正在使用iOS5SDK。运行一台iPod4g设备我没有收到任何警告。但是尝试在iPod2g上运行我的应用程序时,我收到了很多警告:***__NSAutoreleaseNoPool():Object0x258070ofclassDataModelautoreleasedwithnopoolinplace-justleaking***__NSAutoreleaseNoPool():Object0x2530a0ofclass__NSArrayMautoreleasedwithnopoolinplace-justleaking***__NSAutorel

ios - 锁定 Objective-C 中的整个类(class)

我有一个非常简单的问题,我希望有人能为我指出正确的方向。我是一名Java开发人员,试图找出正确的Objective-C方法来实现全局锁定。我有一个在几个地方实例化的类。每个实例读取和写入一个公共(public)文件。因此,我需要确保此类中的所有方法调用都是原子的。在Java中,这将按如下方式完成:staticObjectlockpublicvoidwriteToFile(){synchronized(lock){//threadsafecodegoeshere}}静态标识符意味着锁对象在所有实例之间共享,因此是线程安全的。不幸的是,由于iOS没有以相同方式提供的类变量,我不确定实现此功