草庐IT

deprecation

全部标签

ios - 数据任务与请求 :completionHandler: is deprecated

我在我的项目中使用AFNetworking从RESTapi获取数据。但是当我使用Github中描述的方法时,我收到了警告。这是我的代码:NSURLSessionConfiguration*configuration=[NSURLSessionConfigurationdefaultSessionConfiguration];AFURLSessionManager*manager=[[AFURLSessionManageralloc]initWithSessionConfiguration:configuration];NSURL*URL=[NSURLURLWithString:@"ht

iphone - 应用内购买 : Stuck at paymentWithProductIdentifiers - which is deprecated

我无法设置我的应用内购买。我无法做到这一点:SKPayment*paymentRequest=[SKPaymentpaymentWithProduct:@"co.za.nideo.100shotsbuybeer"];我从SKPayment*paymentRequest=[SKPaymentpaymentWithProductIdentifiers:@"co.za.nideo.100shotsbuybeer"];但这似乎已被弃用。我怎样才能让第一段代码工作?似乎需要一个SKProduct,但我不知道如何创建/初始化这样的对象。 最佳答案

ios - NSDictionary 初始化(contentsOfFile :) is deprecated so now what?

最近(从iOS11开始),NSDictionary中的init(contentsOfFile:)已弃用。我想成为一个有远见的公民,所以我寻找另一种方法来将属性列表(plist)加载到NSDictionary类型中。我唯一能找到的是PropertyListSerialization,但比较麻烦。这是我想出的区别:funcdealWithFakeConf(atPathpath:String){//Soeasy!letmyD:Dictionary=NSDictionary.init(contentsOfFile:path)as!Dictionaryletl=myD["location"]as

ios - 'UIPopoverController' 已弃用 : first deprecated in iOS 9. 0

这个问题在这里已经有了答案:HowcanIfixthe"UIPopoverControllerisdeprecated"warning?(4个答案)关闭6年前。我开发了一个显示错误的项目:'UIPopoverController'isdeprecated:firstdeprecatediniOS9.0-UIPopoverControllerisdeprecated.PopoversarenowimplementedasUIViewControllerpresentations.UseamodalpresentationstyleofUIModalPresentationPopovera

iOS 7 - UIPopoverController : deprecated arrows?

我正在使我的应用程序适应iOS7,在阅读文档时,我阅读了这一行,位于thislink的popoverArrowDirection下。:"(Deprecated.PopoversdonotusearrowsiniOS7andlater.)"这很奇怪,因为我的弹出窗口在iOS7中似乎仍然有箭头。我只是理解错了吗? 最佳答案 这看起来像是文档中的错误。箭头可能被设计师放在砧板上,但在可用性测试中恢复了这个决定。如果您查看UIPopoverController.h,您没有看到任何弃用属性(例如NS_AVAILABLE_IOS或NS_DEPR

iphone - authenticateWithCompletionHandler : is deprecated: first deprecated in iOS 6. 0

我正在开发使用GameCenter的游戏,但我收到了下一个警告;...'authenticateWithCompletionHandler:'已弃用:首先在iOS6.0中弃用好的,我搜索了一下,发现有新的验证本地用户的代码,所以我替换了旧代码:-(void)authenticateLocalUser{if(!gameCenterAvailable)return;NSLog(@"Authenticatinglocaluser...");if([GKLocalPlayerlocalPlayer].authenticated==NO){[[GKLocalPlayerlocalPlayer]a

ios - MKPolylineView initWithPolyLine : is deprecated in iOS 7

我收到以下错误:initWithPolyline:isdeprecated:firstdeprecatediniOS7.0MKPolylineView*lineView=[[MKPolylineViewalloc]initWithPolyline:overlay];insteadofthis的替换方法是什么? 最佳答案 您应该使用(MKOverlayRenderer*)类型委托(delegate)而不是(MKOverlayView*)类型委托(delegate)。并返回MKPolylineRenderer而不是MKPolylineV

Android logcat 被 "W/Google Maps Android API: GLHudOverlay deprecated; draw(): no-op"淹没

当我在具有Googlemapfragment的Activity上拖动map时,我的logcat充满了"W/Google Maps Android API:GLHudOverlaydeprecated;draw():no-op".Googlemap版本build.gradle(应用程序):编译'com.google.android.gms:play-services-maps:9.2.1' 最佳答案 更新(2016年9月26日):我刚刚检查了play-services-maps9.6.1中的修复compile'com.google.a

Android logcat 被 "W/Google Maps Android API: GLHudOverlay deprecated; draw(): no-op"淹没

当我在具有Googlemapfragment的Activity上拖动map时,我的logcat充满了"W/Google Maps Android API:GLHudOverlaydeprecated;draw():no-op".Googlemap版本build.gradle(应用程序):编译'com.google.android.gms:play-services-maps:9.2.1' 最佳答案 更新(2016年9月26日):我刚刚检查了play-services-maps9.6.1中的修复compile'com.google.a

ios - swift ,让我在这个 : interfaceOrientation was deprecated in iOS 8. 0

这不是生死攸关的事情,但我没有运气破解它。谢谢。ifsession.canAddInput(videoDeviceInput){session.addInput(videoDeviceInput)self.videoDeviceInput=videoDeviceInputdispatch_async(dispatch_get_main_queue(),{//ERRORHEREletorientation:AVCaptureVideoOrientation=AVCaptureVideoOrientation(rawValue:self.interfaceOrientation.rawVa