草庐IT

optional_argument

全部标签

ios - iCloud 同步失败并显示 "CoreData: Ubiquity: Invalid option: the value for NSPersistentStoreUbiquitousContentNameKey should not contain periods"

CoreData:Ubiquity:Invalidoption:thevalueforNSPersistentStoreUbiquitousContentNameKeyshouldnotcontainperiods:com.YashwantChauhan.Outis-PFUbiquitySwitchboardEntryMetadatasetUseLocalStorage::CoreData:Ubiquity:mobile~20BF44C9-C39F-48DC-A8A1-B45FC82C7E20:com.YashwantChauhan.Outis我在与iCloud同步时遇到问题。上面这两

iphone - 打开 + UIDocumentInteractionController : how to filter options in SDK iOS 6 (canPerformActions is deprecated)

自从发布新的SDK(iOS6)以来,UIDocumentInteractionControllerDelegate的委托(delegate)方法documentInteractionController:canPerformAction:已弃用。使用该方法,您可以防止出现print:和copy:等默认操作。该方法在当前版本的iOS6中被调用,但在未来的版本中将不会调用该方法并且我的应用程序将显示我不想支持的操作。我阅读了UIDocumentInteractionController及其委托(delegate)的可用文档,但我无法找到另一种方法来执行我在canPerformAction方

iphone - 显示大量 RichText : Choosing the best option

显示大量RichText(HTML格式)的最佳方式是什么目前我正在为一个论坛开发一个应用程序。正如您所期望的,网站上的帖子有很多HTML格式、列表、图像粗体文本、彩色文本等...现在我可以想到几个选项(不是很理想,如果您想到任何其他选项,请在评论中发布):自定义单元格使用NSAttributedString+HTML+DTAttributedTextView每个帖子?问题:我在其他地方的应用程序中使用了NSAttributedString+HTML类别,但它不太理想,即使是少量创建NSAttributedString似乎也非常昂贵(缓慢)。对于10篇以上的文章,每篇文章的长度都可能是整

ios - 安装失败 : Invalid Argument -iOS Extension

https://imgur.com/vFn0S7g我即将从现有项目构建watch应用程序目标。我在完成构建时遇到了一个奇怪的错误,无法正常运行watch应用程序。这是随附的屏幕截图。环境操作系统10.10XCode6.2测试版模拟器iPhone6iOS8.2当我尝试创建新的watch应用程序项目并试用Lister演示应用程序时,它们工作正常。所以我怀疑我现有的项目有问题但不确定是什么,因为错误消息并不是真正的解释。感谢您抽出宝贵时间提供任何线索或帮助。编辑:经过几次调查后发现扩展也不起作用。 最佳答案 我遇到了同样的问题。这个顺序对

ios - 如何识别 PHAsset 是否未完全从 iCloud 下载(因此我需要使用 options.networkAccessAllowed 再次请求)

文档说:PHImageResultIsInCloudKey:ABooleanvalueindicatingwhetherthephotoassetdataisstoredonthelocaldeviceormustbedownloadedfromiCloud.(NSNumber)IfYES,noimagewasprovided,becausetheassetdatamustbedownloadedfromiCloud.Todownloadthedata,submitanotherrequest,andspecifyYESforthenetworkAccessAllowedoption.

ios - Xcode 7,Obj-C, "Null passed to a callee that requires a non-null argument"

在Xcode7中,我收到此警告:Nullpassedtoacalleethatrequiresanon-nullargument..从这个NSMutableArray的nil初始化...sectionTitles=[[NSMutableArrayalloc]initWithObjects:nil];我发现我应该改用removeAllObjects。[sectionTitlesremoveAllObjects];但是,这不允许我计算sectionTitles.count==0。我确实尝试了sectionTitles==nil,但是除非我使用iniWithObjects,否则我以后无法添加

ios - typedef NS_OPTIONS 检查像 UIViewAutoresizing

简短介绍一下我想用它实现的目标:我有一个自定义的UIView,我想让箭头可见,例如在底部和左侧。我认为可以采用与UIViewAutoresizing相同的方式执行此操作。所以我为我的自定义View创建了一个类似的typedef:typedefNS_OPTIONS(NSUInteger,Arrows){ArrowNone=0,ArrowRight=1同样在我的自定义View头文件中,我添加了:@property(nonatomic)Arrowsarrows;一切正常,现在我可以设置属性了:customview.arrows=(ArrowBottom|ArrowLeft);这将返回6。现在

ios - NSURLConnection : JSON text did not start with array or object and option to allow fragments not set

我从NSURLConnectionconnectionDidFinishLoading得到以下错误"Theoperationcouldn’tbecompleted.(Cocoaerror3840.)"(JSONtextdidnotstartwitharrayorobjectandoptiontoallowfragmentsnotset.)UserInfo=0x7b71dbb0{NSDebugDescription=JSONtextdidnotstartwitharrayorobjectandoptiontoallowfragmentsnotset.}我使用了以下代码:-(void)co

iphone - 是什么原因导致 "NSScanner: nil string argument"?

我在将数据保存到核心数据时收到此消息。NSScanner:nilstringargument我没有使用任何NSScanner方法。从哪里来的?这是一个错误?我应该用它做什么?谢谢帮助,谢谢。 最佳答案 根据经验,我可以说-[NSDecimalNumberinitWithString:]或+[NSDecimalNumberdecimalNumberWithString:]与nil字符串是一个导致该日志消息的事情。在-[NSScannerinitWithString:]上设置断点以开始;如果你没有那样理解它,那么打破你可能创建扫描器的其

iphone - 正确使用 transitionFromViewController :toViewController:duration:options:animations:completion:

我似乎找不到关于如何正确使用transitionFromViewController:toViewController:duration:options:animations:completion:的好例子。这是正确的吗?(假设我想用另一个VC交换)//AssumefromVCandtoVCviewcontrollersaredefinedandfromVCisalreadyaddedasachildviewcontroller[selfaddChildViewController:toVC];[selftransitionFromViewController:fromVCtoView