草庐IT

deprecation-warning

全部标签

ios - 单元测试 : Warning Presenting View on View whose View is not in window hierachy

我有一个带有UICollectionView的UIViewController,它不是我的应用程序的根,而是通过segue到达的。这个UICollectionView有UICollectionViewCells,它有一个带有UITapGestureRecognizer的imageView,在触发时帮助呈现UIAlertViewController。当我收到此警告时,我一直无法测试我的showalert方法:“尝试在View不在窗口层次结构中的*上呈现!”下面是我的代码片段classViewControllerTests:XCTestCase{varvc:ViewController!o

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

解决运行js代码报错—Warning: To load an ES module, set “type“: “module“ in the package.json or use the .mjs

目录❌报错信息🎈解决方案✔️执行结果❌报错信息vscode运行js代码报错:(node:20452)Warning:ToloadanESmodule,set"type":"module"inthepackage.jsonorusethe.mjsextension. #查看报错信息Warning:ToloadanESmodule,set"type":"module"inthepackage.jsonorusethe.mjsextension.警告:加载ES模块时,在package.json包中设置“type”:“module”或使用.mjs扩展名。🎈解决方案#解决方法1、安装新版node.js2

vue.runtime.esm.js?2b0e:619 [Vue warn]: Error in v-on handler (Promise/async): “Error: 失败“found in

造成上方报错的原因可能有两种:    1.发请求时传递的参数没有正确传递(例如要传递的参数可能没有正确的获取,以至于向服务器传递的其实是空,可以在传递前先打印一下要传递的参数是否正确)    2.发请求时请求的路径可能没有正确填写,建议核对一下请求地址是否正确,是否携带参数,参数格式是否正确。

服务器使用U盘安装linux Centos 7报错Warning:dracut-initqueue timeout-starting timeout scripts

文章目录一、报错图片二、解决方法1.查看自己U盘的名称2.将U盘插到服务器上正常安装Linux系统——到了如图所示页面——按e键3.修改盘符名称——鼠标光标移动到对应的位置删除多余的信息即可3.修改完盘符名后按Ctrl+x键即可总结一、报错图片>报错——Warning:dracut-initqueuetimeout-startingtimeoutscripts二、解决方法1.查看自己U盘的名称将U盘插到Windows电脑上查看U盘的名称2.将U盘插到服务器上正常安装Linux系统——到了如图所示页面——按e键Usethe🔼and🔽keystochangetheselection.Press‘e

Java HotSpot(TM) 64-Bit Server VM warning: Sharing is only supported for boot loader classes解决方法

1、问题翻译:JavaHotSpot(TM)64位服务器虚拟机警告:共享仅支持引导加载程序类,因为已附加引导程序类路径2、IDEA解决方法IDEA中—>file—>Settings—>Buinde—>AsyncStackTraces—>Instrumenting...  

ios - Swift iOS -CMTimeMakeWithSeconds : warning: error of -0. 433 由于时间尺度非常短而引入

我正在使用AVPlayer播放视频。我跟着这个视频教程Let'sBuildThatApp我使用UISlider/scrubber来配合视频的当前帧/时间。我有一个10.43秒的视频,我使用快进功能将我带到最后。@objcfileprivatefuncfastForwardButtonTapped(){guardletplayerItem=playerItemelse{return}guardletplayer=playerelse{return}letduration:Float64=CMTimeGetSeconds(playerItem.duration)letseekTime:CM

-bash: warning: setlocale: LC_ALL: cannot change locale (zh_CN.utf-8)

项目场景:centos7问题描述:centos7,连接时出现-bash:warning:setlocale:LC_ALL:cannotchangelocale(zh_CN.utf-8)/bin/sh:warning:setlocale:LC_ALL:cannotchangelocale(zh_CN.utf-8)并且运行日志中文变问号解决方案:1.运行以下命令来查看可用的语言环境列表:locale-a确保 zh_CN.utf-8 在列表中。2.如果 zh_CN.utf-8 不在列表中,你需要安装中文语言包。运行以下命令以安装 zh_CN.utf-8 语言包:yumgroupinstall"Chi

ios - swift 包管理器中的 "warning: no targets to build in package"错误

我正在尝试使用swift包管理器将SocketIO安装到我的swift4iOS项目中。Package.swift文件如下所示://swift-tools-version:4.0//Theswift-tools-versiondeclarestheminimumversionofSwiftrequiredtobuildthispackage.importPackageDescriptionletpackage=Package(name:"MyApp",dependencies:[.package(url:"https://github.com/socketio/socket.io-cli