草庐IT

task_scheduler_init

全部标签

iphone - iOs:为什么 IBOutlets 在 [[alloc] init] 之后没有连接,而是在 viewDidUnload 之后连接:已被调用

我有一个简单的UINavigationViewController,当某个项目被选中时,它会创建一个模态视图,其中有一个UIImageView(下面的PostcardViewController)。但是,如果我调用PostcardViewController*postcardViewController=[[PostcardViewControlleralloc]init];postcardViewController.imageView.image=image;[self.navigationControllerpresentModalViewController:postcardV

ios - 运行的应用程序使 iPhone5S 崩溃并强制硬重置,仅在第二次启动时出现错误 "failed to get task for process"

我已经做了好几个小时了,现在我要开始翻转table了。在成功使用此应用程序大约一个月后,这个问题突然出现了。没有更改build设置或构建方案或我能想到的任何内容。如果我在iPhone4上构建和运行该应用程序,我完全没有问题。如果我在iPhone5S上构建并运行该应用程序,它将:第一次尝试:构建成功,似乎在设备上安装应用程序并启动它,但随后失败并显示“错误:无法启动'.../MyApp.app'--未找到”。第二次尝试:构建、运行,有一个愉快的小调试session,一切都完美无缺。第三次尝试:构建成功,开始启动应用程序,然后失败并显示“错误:无法启动‘.../MyApp.app’——无法

ios - 分发配置文件不包括 get-task-allow 权利

在我的项目中,我有三个目标-项目目标、单元测试目标和UI测试目标。在升级到Xcode8时,我遇到了UI测试目标的问题,并显示了错误消息:Provisioningprofiledoesn'tincludetheget-task-allowentitlement.下图显示了我的问题。如何解决这个问题?但是,该警报与实际情况之间存在不匹配: 最佳答案 我遇到了同样的问题,解决方案是在我的权利文件和配置文件中包含get-task-allow。从权利文件中删除它以解决此问题。 关于ios-分发配置

c# - Xamarin IOS : Task delay issue

我使用XamarinForm创建了一个应用程序。在该应用程序中,我创建了一个ExtendedWebView,以便我可以从C#调用javascript函数。在调用我的javascript函数之前,我已经给出了大约50毫秒的延迟。在Android、iOS10、Windows8、Windows8.1和Windows10等所有设备中。一切正常。但是在iOS11中,我调用的javascript函数随着时间的推移变得滞后了。我不知道为什么在ios11中会发生这种情况。在ios11webview中是否有任何更改?我正在使用UIWebview。我试图将它转换为WkWebview但仍然有同样的问题。Ta

ios - 无法结束 BackgroundTask : no background task exists with identifier 4, 或者它可能已经结束

使用XCode4.5.2在后台实现定时器如下UIDevice*device=[UIDevicecurrentDevice];BOOLbackgroundSupported=NO;if([devicerespondsToSelector:@selector(isMultitaskingSupported)]){backgroundSupported=YES;}if(backgroundSupported){bgTask=[[UIApplicationsharedApplication]beginBackgroundTaskWithExpirationHandler:^{[[UIAppli

ios - 如果我们不在 init 方法中检查 "if (self)"会发生什么?

这个问题在这里已经有了答案:InObjective-CwhyshouldIcheckifself=[superinit]isnotnil?(9个回答)关闭8年前。我开始研究我们学长做的代码,我发现init方法总是有代码-(id)init方法。他们通过以下方式使用代码。以下代码用于所有ViewController。self=[superinitWithNibName:@"ViewController"bundle:[NSBundlemainBundle]];returnself;这部分的if(self)和self有什么用?//Andinsomeviewcontrollercontains

objective-c - UITableViewController init 与 initWithStyle

类引用说:如果您使用标准的init方法来初始化UITableViewController对象,则会创建一个普通样式的TableView。我不明白,这种行为是从哪里来的——我想在一些代码中看到我或api但UITableViewController在其api中没有初始化一些基类的init如何知道派生类的合适默认样式?感谢每一个提示 最佳答案 每个对象都有一个init方法,但是很多类都有一个所谓的指定初始化器。这是主要的初始化器,其他的只是调用指定初始化器的便捷方法。根据该文档,在这种情况下,init方法可能看起来像这样:-(id)ini

iphone - 带有自定义 View 选择器的 UIBarButtonItem init 无法正常工作

我花了几个小时尝试让左键正常工作并模仿后退按钮。我创建按钮的代码:UIBarButtonItem*backButton=[selfcustomBarButton:@"back_button"imageHiglighted:@"settings_button_highlighted"x:20y:0widthDivider:2.6heightDivider:2.6];backButton.target=self;backButton.action=@selector(buttonPressed:);self.navigationItem.leftBarButtonItem=backButt

ios - FBSession : No AppID provided; either pass an AppID to init, 或添加字符串值键

当我打开FBSession(FBSDK3.0)时,出现此错误:FBSession:NoAppIDprovided;eitherpassanAppIDtoinit,oraddastringvaluedkeywiththeappropriateidnamedFacebookAppIDtothebundle*.plist我知道我可以在.plist中为FacebookAppID添加一个值,但是我应该使用什么方法来使用AppId初始化FBSession?我尝试过使用[FBSessionsetDefaultAppID],但似乎没有用。 最佳答案

ios - 'init' 不可用 :use 'withMemoryRebound(to:capacity:_)' to temporarily view memory as another layout-compatible type

这是一个错误:'init'isunavailable:use'withMemoryRebound(to:capacity:_)'totemporarilyviewmemoryasanotherlayout-compatibletype.这是我的代码:varinputSignal:[Float]=Array(repeating:0.0,count:512)letxAsComplex=UnsafePointer(inputSignal.withUnsafeBufferPointer{$0.baseAddress})//errorhere为什么?如何解决? 最佳答