草庐IT

my_instance

全部标签

ios - NSInvalidArgumentException -[__NSCFString unsignedLongLongValue] : unrecognized selector sent to instance

在使用JSONModel解析我的模型时,我发现了这个异常。NSInvalidArgumentException-[__NSCFStringunsignedLongLongValue]:unrecognizedselectorsenttoinstance0x1782210c0问题出现在JSONModel.m中,因为它依赖于[NSObjectsetValue:forKey:]。我找到了一种轻松复制它的方法。@propertyNSUIntegeruintegerProperty;[...][selfsetValue:@"1"forKey:@"uintegerProperty"];这适用于32

ios - ARC 和 UIAlertView : unrecognized selector sent to instance

这是我如何显示UIAlertView和委托(delegate)clickedButtonAtIndex-UIAlertView*alert=[[UIAlertViewalloc]initWithTitle:@"title"message:@"message"delegate:selfcancelButtonTitle:@"Cancel"otherButtonTitles:@"Continue",nil];[alertshow];-(void)alertView:(UIAlertView*)alertViewclickedButtonAtIndex:(NSInteger)buttonIn

iOS 8 : -[UITableViewWrapperView textField]: unrecognized selector sent to instance

您好:我一直在iOS6、7和现在的8(测试版5)上测试我的应用程序。我的带有自定义UITableViewCell的UITableView在6和7上运行良好。但是,在iOS8上,当我尝试访问subview(文本字段)时出现崩溃)的细胞。我知道在iOS7的单元格层次结构中有另一个View。奇怪的是,在iOS8中似乎不是这种情况。这是我使用的代码://GetthecellCustomCell*cell=nil;//NOTE:GradingTableViewCell>UITableViewCellScrollView(iOS7+ONLY)>UITableViewCellContentView>

ios - 带有 Xcode 工作区的 Team City CI - 方案 "My Scheme"未配置为运行

我有一个工作区,其中包含一些必须构建为静态库的项目,并且我有针对它们的测试方案。我想配置TeamCity来构建和测试这些库中的每一个,但它不起作用并出现以下错误:.../Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild-workspacecode/MyApplication/MyFramework.xcworkspace-schemeOneOfTestsTEST_AFTER_BUILD=YEScleanbuild-configurationDebug-sdkiphonesimulator6.1indirectory

ios - 我应该在 presentationIndexForPageViewController : for my UIPageViewControllerDataSource? 中返回什么

presentationIndexForPageViewController:返回值的文档说:Returnstheindexoftheselecteditemtobereflectedinthepageindicator.然而,这是模糊的。当用户滚动页面ViewController时,它会调用此方法并期望正确的索引吗?此外,无法保证何时pageViewController:viewControllerBeforeViewController:和pageViewController:viewControllerAfterViewController:.文档只是提到:[An]object[

ios - X代码 4.5/iOS6 : orientation issue with my iPad app in Landscape mode

我刚刚在XCode4.5上打开了我的iPad项目。我的应用程序设计为在横向模式下运行。它在以前版本的XCode上完美运行。但是在XCode4.5上,它旋转了90°(四分之一圈),屏幕右侧有一个空白区域(我的View大小正确,但超出了屏幕)。它看起来像这样:我检查了以下帖子但没有帮助:orientationissueinios6ios6RotationissuefromlandscapetoportraitmodeSetorientationtolandscapemodeinxcode4.5GMIOS6有人遇到过这个问题吗?如有任何帮助,我们将不胜感激! 最佳

ios - 如何解析 "no known instance method for selector ' performSelector :withObject:afterDelay :'" when migrating to ARC?

ARC迁移工具在开始迁移之前拒绝接受此代码:[self.delegateperformSelector:@selector(overlayDismissed:)withObject:selfafterDelay:0];委托(delegate)被强制使用协议(protocol)实现这个方法,它应该可以正常工作:@protocolOverlayDelegate-(void)overlayDismissed:(Overlay*)overlay;@end@interfaceOverlay:UIImageView{iddelegate;}@property(nonatomic,assign)id

ios - Cordova : sharing browser URL to my iOS app (Clipper ios share extension)

我要什么在Iphone上,当在Safari或Chrome中访问网站时,可以将内容共享给其他应用程序。在这种情况下,您可以看到我可以将内容(基本上是URL)共享到名为Pocket的应用程序。有可能这样做吗?特别是Cordova? 最佳答案 编辑:迟早一个简单的移动网站可能能够接收从native应用程序共享的内容。检查WebShareTarget协议(protocol)我正在回答我自己的问题,因为我们终于成功地为Cordova应用程序实现了iOS共享扩展。首先共享扩展系统仅适用于iOS>=8然而,将它集成到Cordova项目中有点痛苦,

iPhone/iOS : How can I get a list of localized strings in all the languages my app is localized in?

我需要向我的服务器发送特定字符串的本地化列表。意思是,如果我的应用程序有一个字符串Foo,在英语中本地化为@"Foo",在俄语中本地化为@"Фу",我想向服务器发送如下列表:字符串富:英语:“Foo”俄语:“Фу”我认为我需要能够做的是:为我的应用本地化的每种语言枚举本地化字符串获取每种语言的Foo本地化版本我该怎么做(1),我该怎么做(2)? 最佳答案 您可以通过将English.lproj/Localizable.strings作为字典读取并获取其键来检索所有字符串键:NSString*stringsPath=[[NSBundl

ios - -[WelcomeUI _setViewDelegate :]: unrecognized selector sent to instance 0xc061110

这里是错误:2013-09-3017:59:23.212TheSolver[422:a0b]-[WelcomeUI_setViewDelegate:]:unrecognizedselectorsenttoinstance0xc0611102013-09-3017:59:23.222TheSolver[422:a0b]***Terminatingappduetouncaughtexception'NSInvalidArgumentException',reason:'-[WelcomeUI_setViewDelegate:]:unrecognizedselectorsenttoinsta