簡體   English   中英

嘗試使用UITextField運行簡單的應用程序-模擬器崩潰

[英]Trying to run a simple app with UITextField - Simulator is crashing

我在應用程序中有兩個UITextFields作為IBOutlets,並且已經建立了文件所有者與這些文件的連接...當我運行Build and Go時,iPhone模擬器崩潰了……並且在控制台中(調試后)...我在...

2009-08-22 18:11:40.869 Control_Fun[1138:20b] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UIViewController _loadViewFromNibNamed:bundle:] loaded the "Control_FunViewController" nib but the view outlet was not set.'

但是,我沒有將任何插座(IBOutlet)明確定義為view ...這是隱藏的東西嗎? 當我控制單擊“文件的所有者”並將其拖動到UITextFields時,它在灰色彈出菜單中為我提供了三個選項以連接到

1. nameField (declared as IBOutlet property in the header file)
2. numberField (declared as IBOutlet property in the header file)
3. view (where is this coming from?)

謝謝

弄清楚了-這是我從那里開始的基於View的應用程序模板,因此有一個父View定義為出口(默認情況下),並且仍需要設置它(在這種情況下,使用File's Owner)。現在工作。

暫無
暫無

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

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