草庐IT

DEPRECATED_MACRO

全部标签

ios - Base64Encoding 已弃用 : first deprecated in iOS 7. 0

我已经从GitHub下载了Base64库。我在我的项目中使用它来解码来自网络服务器的图像。我为iOS7.0制作了这个项目使用base64得到的警告是:'base64Encoding'isdeprecated:firstdeprecatediniOS7.0.提前致谢。 最佳答案 从iOS7SDK开始,NSDataclass现在有一些方法可以帮助编码/解码base64数据和字符串对象,方法如下:-(instancetype)initWithBase64EncodedData:(NSData*)base64Dataoptions:(NSD

ios - 'initWithFrame :reuseIdentifier' is deprecated

我试图重新创建一个Xcode项目,但我遇到了一个错误“'initWithFrame:reuseIdentifier'isdeprecated”。这是代码:-(id)initWithFrame:(CGRect)framereuseIdentifier:(NSString*)reuseIdentifier{if(self=[superinitWithFrame:framereuseIdentifier:reuseIdentifier]){UIView*myContentView=self.contentView;self.todoPriorityImageView=[[UIImageVie

ios - addressDictionary 已弃用 : first deprecated in iOS 11. 0 - 使用@properties

我正在使用获取位置和地址。因为我已成功获取位置,但在获取地址时我收到类似警告,'addressDictionary'isdeprecated:firstdeprecatediniOS11.0-Use@properties有什么解决办法吗... 最佳答案 在swift5中//letlocation:CLLocation=CLLocation(latitude:16.511131,longitude:80.658725)//Convertlat&lngintoCLLocationletgeocoder=CLGeocoder()geoco

Plugin mysql_native_password reported: ‘‘mysql_native_password‘ is deprecated and will be removed i

 Pluginmysql_native_passwordreported:''mysql_native_password'isdeprecatedandwillberemovedinafuturerelease.Pleaseusecaching_sha2_passwordinstead' showvariableslike'default_authentication%';  selecthost,user,plugin,authentication_stringfrommysql.user;1.参考初步分析中的方案,将应用的连接配置修改为正确的用户信息;2.可以在mysql数据库中通过参数将

ios - Xcode 7.3 : "Ambiguous expansion of macro" when re-defining macro in prefix file

我正在使用Xcode7.3,并且收到“宏扩展不明确”的警告,这是针对在Foundation中定义的宏,但我在前缀文件中未定义和重新定义的宏。我启用了模块。重现:在build设置中将“启用模块(C和Objective-C)”设置为"is"使用以下前缀文件:#import#undefassert#defineassert(e)NSLog(@"hi")//implementationisnotimportant使用下面的主要源文件:intmain(){assert(42);return0;}然后在Xcode中构建。它在源文件中使用“断言”宏的行上显示“宏‘断言’的扩展不明确”警告。“Expa

iphone - Cocos2d - animationwithframes :delay: deprecated

我想知道我应该用什么来代替animationWithFrames:delay:和actionWithAnimation:restoreOriginalFrame:因为他们给出了他们已被弃用的警告。 最佳答案 Cocos2d2.0使用CC动画+(id)animationWithSpriteFrames:(NSArray*)framesdelay:(float)delayCC动画+(id)actionWithAnimation:(CCAnimation*)anim文档:http://www.cocos2d-iphone.org/api-

swift - "The Selector keyword has been deprecated in future versions of Swift"如何在没有编辑菜单的对话框中创建键盘快捷键

Cut/Copy/Paste/SelectAll/Undo/Redo的Swift2.1解决方案是here,但这现在会在Xcode7.3/Swift2.2中产生6个警告。Selector关键字在Swift的future版本中已被弃用。这是一个部分解决方案,它编译时没有针对剪切/复制/粘贴/全选的警告:ifNSApp.sendAction(Selector("cut:"),to:nil,from:self){returntrue}成为ifNSApp.sendAction(#selector(NSText.cut(_:)),to:nil,from:self){returntrue}不过Und

ios - '子字符串(来自 : )' is deprecated: Please use String slicing subscript with a ' partial range from' operator. Swift 4 错误

这个问题在这里已经有了答案:HowcanIuseStringsubstringinSwift4?'substring(to:)'isdeprecated:PleaseuseStringslicingsubscriptwitha'partialrangefrom'operator(21个答案)关闭5年前。我正在将我现有的应用程序从Swift3转换为Swift4。它给出了错误:'substring(from:)'isdeprecated:PleaseuseStringslicingsubscriptwitha'partialrangefrom'operator.和'characters'i

swift - 在 Swift 3.1 中,UnsafeMutablePointer.initialize(from :) is deprecated

在Swift3.1中,不推荐使用UnsafeMutablePointer.initialize(from:)。Xcode建议我改用UnsafeMutableBufferPointer.initialize(from:)。我有一个看起来像这样的代码块:letpointer=UnsafeMutablePointer.allocate(capacity:64)pointer.initialize(from:repeatElement(0,count:64))由于弃用,代码给了我一个编译时警告。所以我要把它改成:letpointer=UnsafeMutablePointer.allocate(

ios - Firebase 存储警告 : downloadURL( )' is deprecated: Use ` StorageReference. downloadURLWithCompletion()

我刚刚将我的项目更新到最新版本的FirebaseStorage,现在我收到一条警告:downloadURL()已弃用:使用StorageReference.downloadURLWithCompletion()获取当前下载URL。我查看了Firebase图片上传文档,但它仍然引用了现在已弃用的downloadURL()。在下面的代码中,我将图像的下载URL作为字符串获取。代码有效,但现在要更新,因为downloadURL()已贬值uploadProfilePicTask.observe(.success){snapshotinguardletprofilePicStringURL=sn