草庐IT

Contents

全部标签

iphone - 将 UIImage 绘制到 CALayer.contents 中不会渲染图像数据

我正在努力让图像显示在CALayer.contents中。这看起来很简单,但无论我做什么我都无法渲染图像。CALayer渲染良好,因为我可以看到它的背景颜色和圆角半径,但图像不会加载。您在这里看到的是应用了mask的CAGradientLayer子类。内部正方形是我希望显示图像的地方,它被添加为CAGradientLayer子类的子层。设置它的代码非常简单。在init中:self.imageLayer=[CALayerlayer];self.imageLayer.cornerRadius=kDefaultCornerRadius;self.imageLayer.backgroundCo

ios - Xcode "Size to fit contents"禁用

我正在学习关于为iOS开发应用程序的斯坦福讲座,但遇到了一些问题。讲师说要单击文档大纲中的标签,然后转到编辑器>大小以适合内容以删除固定大小限制。但是我的问题是“大小适合内容”被禁用,我无法点击它(见图片)。知道我做错了什么吗? 最佳答案 我通过在标签周围拖动并手动(随机)调整它们的大小解决了这个问题,然后启用了该选项! 关于ios-Xcode"Sizetofitcontents"禁用,我们在StackOverflow上找到一个类似的问题: https://s

swift - 苹果操作系统 : Accessing contents directly from a directory in Swift

我是macOS开发的新手,所以请原谅我的任何基本问题,但相信我,我已经做了很多研究,但仍然有点卡住了。所以我正在尝试访问当前用户桌面的内容。在playground中很简单,只需使用lethomeURL=FileManager.default.homeDirectoryForCurrentUserletdesktopURL=homeURL.appendingPathComponent("Desktop/")letcontents=tryfileManager.contentsOfDirectory(atPath:desktopURL.path)它显示桌面上的所有内容。但是当我在项目中运行

ios - 构建失败,出现错误 Command/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc

我正在使用Xcode8.2.1。我也在我的项目中使用CoreData。当我尝试生成构建或存档时,我看到以下错误。错误中提到的文件有时也会更改。错误::0:error:nosuchfileordirectory:'/Users/anuragparashar/Library/Developer/Xcode/DerivedData/app-drgjxhipxxqdrcatqfdgpayyxnud/Build/Intermediates/app.build/Debug-iphoneos/app.build/DerivedSources/CoreDataGenerated/app/Buildin

ios - Command/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang 退出失败

我在申请中遇到以下错误。clang:error:nosuchfileordirectory:'/Users/madhavadudipalli/Desktop/iosprojects/LittleFlowerPublicSchool/LittleFlowerPublicSchoolIpad/LittleFlowerPublicSchoolHD-Prefix*.pch'clang:error:noinputfilesCommand/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/us

iOS swift : AWS SDK - downloading file from S3 - get contents without saving file

集成开发环境:XCode6/Swift我正在尝试从AWSS3下载文件,我已正确设置所有库,下载代码是(相关部分)..letdownloadFilePath="/Users/user1/myfile.json"//locallysavefilehereletdownloadingFileURL=NSURL.fileURLWithPath(downloadFilePath)...letdownloadRequest=AWSS3TransferManagerDownloadRequest()downloadRequest.bucket=s3BucketNamedownloadRequest.

ios - 错误——Command/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc 失败,退出代码为 1

我正在使用自定义键盘,如果我在类里面包含这段代码,我会收到错误消息:letisPad=UIDevice.currentDevice().userInterfaceIdiom==UIUserInterfaceIdiom.PadError-Command/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftcfailedwithexitcode1我需要这段代码,因为当用户在iPad上运行iPhone应用程序(如instagram)时,我需要加载iPhone键盘预

ios - Xcode 10.0 错误 "Command/Applications/Xcode 10.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 1"

当我在XCode版本10.0上编译我的代码时,我得到一个导致编译失败的错误:我会尝试所有的可能性但无法解决错误清理我的项目alt+Shift+Command+K删除~/Library/Developer/Xcode/DerivedDataPod更新 最佳答案 如果您查看错误上方,XCode会告诉您哪个类被添加/声明了两次,导航到它并删除引用。构建,一切顺利。 关于ios-Xcode10.0错误"Command/Applications/Xcode10.app/Contents/Devel

ios - 错误 : Unable to load contents of file list: '/Target Support Files/Pods-xx/Pods-xx-frameworks-Debug-input-files.xcfilelist' (in target 'xx' )

XCode版本10.2.1error:Unabletoloadcontentsoffilelist:'/TargetSupportFiles/Pods-SMarket/Pods-SMarket-frameworks-Debug-input-files.xcfilelist'(intarget'SMarket')error:Unabletoloadcontentsoffilelist:'/TargetSupportFiles/Pods-SMarket/Pods-SMarket-frameworks-Debug-output-files.xcfilelist'(intarget'SMark

ios - Xcode 7 失败,Command/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc 失败,退出代码为 1

我正在将我的swift项目更新到Xcode7上的Swift2.0。xcode在构建项目时报告了以下错误:命令/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc失败,退出代码为1这发生在SwiftyJSON或SwiftSpinner框架上(编译器似乎首先随机选择一个并失败,因此错误会间歇性地在其中一个或另一个上报告)。我已经将这些框架更新到它们的xcode7/swift2兼容分支,但项目仍然无法编译。只是想知道这是否是其他人在使用cocoapods框架依