草庐IT

container_class

全部标签

iphone - ARC 语义问题 : No visible @interface for Class declares the selector

非常基本的东西,但我无法解决问题所在。在我的项目中,我有一个名为“TheFeedStore”的类,它具有以下两种方法:-(BOOL)hasItemBeenRead:(RSSItem*)item{............}-(void)markItemAsRead:(RSSItem*)item{.........}我正在使用以下类方法,以便其他类可以使用它访问这些方法:+(TheFeedStore*)sharedStore{staticTheFeedStore*feedStore=nil;if(!feedStore){feedStore=[[TheFeedStorealloc]init]

ios - XCode 用户界面测试 : Unable to find test runner app containing test bundle path

我已经在XCode7.3.1中针对专用目标编写了UI测试。我可以记录一个UI测试,但如果我尝试启动它(所有测试或单个测试),我会收到以下错误:Unabletofindtestrunnerappcontainingtestbundlepath/Users/dle/Library/Developer/Xcode/DerivedData/Keecoach-exynmciqyehgmxcfxhkpksrqifsb/Build/Products/Debug-iphonesimulator/DemoKeecoachUITests-Runner.app/PlugIns/DemoKeecoachUIT

ios - 在 Objective C 中调用父类(super class)方法的时机是否重要?

首先还是最后调用父类(superclass)的方法有关系吗?例如-(void)didReceiveMemoryWarning{/*doabunchofstuff*/[superdidReceiveMemoryWarning];}对比-(void)didReceiveMemoryWarning{[superdidReceiveMemoryWarning];/*doabunchofstuff*/}其他方法如viewWillAppear、willRotateToInterfaceOrientation等的相同问题我正在寻找有意义的差异,而不仅仅是风格上或哲学上的差异(尽管我们也欢迎这些差异)

ios - NSPredicate 匹配 "any entry in an NSDatabase with value that contains a string"

我有一个字典数组,类似于以下内容:({Black="?";Date="????.??.??";Result="*";SourceDate="2007.10.24";White="Matingpattern#1";},{Black="?";Date="????.??.??";Result="*";SourceDate="2008.10.24";White="AboutthisPublication";})Iwanttooffertheusertheabilitytosearchfortexteitherwithinjustthe"White"and"Black"fields,orwith

iphone - 我可以观看另一个类(class)的 NSNotification 吗?

我正在努力了解NSNotificationCenter。如果我的AppDelegate中有这样的东西:[[NSNotificationCenterdefaultCenter]addObserver:selfselector:@selector(something:)name:@"something"object:nil];------(void)something:(NSNotification*)notification{//dosomething}我能以某种方式在另一个ViewController中观看吗?就我而言,我想在带有表格的ViewController中观看它,然后在收到通

ios - 抑制链接器警告 : "Meta method X in category from Y overrides method from class in Z"

我有意使用类别来覆盖我知道已经在主类上实现的方法。我知道这通常是设计薄弱的标志——请不要讲课——但在这种情况下我不能干净地子类化。我知道swizzling也可能是一种选择。但是现在,我该如何抑制这个警告?llvm抛出一个编译器警告,我可以禁用它(diagnosticignored"-Wobjc-protocol-method-implementation")。但随后链接器也会提示。Thisasksasimilarquestionbutwaslookingforadifferentanswer.我怎样才能告诉链接器不要提示?谢谢。 最佳答案

ios - App Store 团队在提交申请后报错 "your app contains bitcode"

我以前从未听说过bitcode这个术语,我什至不知道从哪里开始寻找如何解决这个问题。我正在使用Xcode7beta3并且我已经成功上传了我的应用程序3次,但是每次我上传它时,它都会将状态更改为invalidbinary我收到了AppStore团队发来的一封电子邮件"InvalidExecutable-Theexecutable'ESUHSD.app/ESUHSD'containsbitcode."我不知道您需要了解有关该应用程序的哪些信息,所以我希望您能提供任何帮助! 最佳答案 首先,我认为您不能提交使用Beta版Xcode构建的任

ios - 发生崩溃是因为 "CALayer bounds contains NaN: [nan 0; nan 15.1]"

我遇到以下崩溃:CALayerInvalidGeometryCALayerInvalidGeometryCALayerboundscontainsNaN:[nan0;nan15.1]在此代码的最后一行:CGRectbounds=self.bounds;bounds.size=CGSizeMake(fabsf(self.width),self.height);self.bounds=bounds;其中self.width派生自平移手势识别器:CGPointpanGestureRecognizerTranslationPoint=[panGestureRecognizertranslati

SpringBoot项目启动失败报错Annotation-specified bean name ‘xx‘ for bean class [xxx] conflicts with existing

问题描述:项目启动就会报:Annotation-specifiedbeanname‘xx’forbeanclass[xxx]conflictswithexisting,non-compatiblebeandefinitionofsamenameandclass[xxx]意思是说注入的bean冲突了解决方法:首先查找代码中相同类名的类,找一找有没有重复的,如果有的话就改掉;也有可能是注入的依赖和本地包中的方法冲突了,在报错信息中找到发生冲突的类名,或者整个包都有冲突找包名,然后再启动项的扫描包注解添加配置@ComponentScan(value=“需要扫描的包名”,excludeFilters=

iphone - NSManagedObject 异常 “this class is not key value coding-compliant” 并在 ios 6 中使应用程序崩溃,但适用于 ios 5

我的应用程序因以下异常而崩溃:ABC[1936:c07]*由于未捕获的异常“NSUnknownKeyException”而终止应用程序,原因:“[valueForUndefinedKey:]:此类不符合键值编码keyID。”此异常的奇怪问题是它不会在使用iOS5时发生。请查看下面发生异常的代码:-(void)viewWillAppear:(BOOL)animated{[superviewWillAppear:animated];if((self.sectionInfoArray==nil)||([self.sectionInfoArraycount]!=[selfnumberOfSec