簡體   English   中英

無法將圖像添加到Xcode中的圖像按鈕

[英]Unable to add images to image button in Xcode

我是macOS應用程序開發的新手,我試圖在視圖中添加圖像按鈕,我想在文本后看到圖像,因此我將圖像按鈕拖放到視圖控制器中並寫標題,然后在圖像部分我選擇我的形象。

但是我的問題是,如果我選擇系統映像,則我的項目可以正常運行,但是如果我要通過單擊項目名稱>將文件添加到..,然后將png,jpg,jpeg文件導入到我的項目中,然后選擇此映像,Xcode會給我導入文件這個錯誤;

CodeSign build/Debug/test.app
    cd /Users/feora/Documents/apps/test
    export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate

Signing Identity:     "-"

    /usr/bin/codesign --force --sign - --entitlements /Users/feora/Documents/apps/test/build/test.build/Debug/test.build/test.app.xcent --timestamp=none /Users/feora/Documents/apps/test/build/Debug/test.app

/Users/feora/Documents/apps/test/build/Debug/test.app: resource fork, Finder information, or similar detritus not allowed
Command /usr/bin/codesign failed with exit code 1

此頁面有問題,但我找不到哪一個

那是因為當您添加圖像文件時,您還添加了一些與該圖像相關的Finder元數據。 如果你搜索錯誤你至少得到一點點,你會發現喜歡回答這個

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM