使用Xcode時遇到的一些小問題

2021-07-04 16:00:52 字數 2431 閱讀 3791

今天在用xcode寫**的時候突然發現了乙個問題,於是就準備寫乙個文章來記錄和總結一下在xcode裡面遇到的問題。這篇文章會經常補充。
'nsinvalidargumentexception', reason: '-[test.viewcontroller didclicktestbutton:]: unrecognized selector sent to instance 0x7feff247a680'

*** first throw call stack:

( 0 corefoundation 0x0000000108d3cc65 __exceptionpreprocess + 165

1 libobjc.a.dylib 0x000000010a8a7bb7 objc_exception_throw + 45

2 corefoundation 0x0000000108d440ad -[nsobject(nsobject) doesnotrecognizeselector:] + 205

3 corefoundation 0x0000000108c9a13c ___forwarding___ + 988

4 corefoundation 0x0000000108c99cd8 _cf_forwarding_prep_0 + 120

6 uikit 0x00000001096ee50a -[uicontrol _sendactionsforevents:withevent:] + 467

7 uikit 0x00000001096ed8d9 -[uicontrol touchesended:withevent:] + 522

8 uikit 0x0000000109629958 -[uiwindow _sendtouchesforevent:] + 735

9 uikit 0x000000010962a282 -[uiwindow sendevent:] + 682

13 corefoundation 0x0000000108c70431 __cfrunloop_is_calling_out_to_a_source0_perform_function__ + 17

14 corefoundation 0x0000000108c662fd __cfrunloopdosources0 + 269

15 corefoundation 0x0000000108c65934 __cfrunlooprun + 868

16 corefoundation 0x0000000108c65366 cfrunlooprunspecific + 470

17 graphicsservices 0x000000010cd10a3e gseventrunmodal + 161

19 test 0x0000000108b554e7 main + 135

20 libdyld.dylib 0x000000010afdd145 start + 1

21 ??? 0x0000000000000001

0x0 + 1

)libc++abi.dylib: terminating with uncaught exception

oftype

n***ception

這是因為缺少了某個控制項的關聯,如圖:

我們只需要消除掉這個關聯,然後重新新增關聯即可。

func givepeoplescore(fornumber num: int, andscore score: int)
(其中roll[num].score 為double型,roll[num].callcount為int型。)警示的根源其實在於double型和int型相乘, *運算子無法做到。所以只要型別轉換即可, 即:

func givepeoplescore(fornumber num: int, andscore score: int)

vsftpd配置虛擬使用者時遇到的一些小問題

不久前接手了學校一些伺服器的管理,其中有一台ftp伺服器 經過檢查配置檔案發現是虛擬使用者的許可權沒有配置。在 etc vsftpd下建立virtual目錄來儲存虛擬使用者配置,建立以虛擬使用者登入名命名的相應配置檔案,然後 在vsftpd配置檔案中加入 user config dir etc vs...

使用GridView時遇到的一些小問題及解決方法

最近一直在用asp.net做 做後台的時候想偷懶,所以就使用現成的控制項了,資料繫結當然要選用最強大的gridview了。原本以為這個控制項很簡單,只需要設定一下屬性,寫很少幾行 就可以搞定。gridview使用起來,簡單倒是挺簡單的,不過還是遇到了一些問題。首先說明我的表的主鍵是 recommen...

輸入mysql語句時遇到的一些小問題

持續更新中。遇到的一些單詞 cascade 級聯 constraint約束 duplicates副本,多重記錄 desc 降序 asc 公升序 遇到的一些錯誤 error 121 這是外關鍵字名字重複的錯誤,即使是在不同的表中,外關鍵字的名字也不能重複。error 150 這類錯誤包括3種情況 1....