我試圖使用alertviewstyle
來使用用戶的文本輸入。 當我在不改變樣式的情況下顯示alertview
時,它可以工作。設置alertviewstyle時的應用程序崩潰
當我改變風格UIAlertViewStylePlainTextInput
我得到這個錯誤:
error: address doesn't contain a section that points to a section in a object file.
我使用的後續代碼:
nameAlertView =
[[UIAlertView alloc] initWithTitle:[langFile objectForKey:@"sequenceTitel"]
message:[langFile objectForKey:@"sequenceTitel"]
delegate:self
cancelButtonTitle:[langFile objectForKey:@"cancel"]
otherButtonTitles:[langFile objectForKey:@"save"], nil];
nameAlertView.alertViewStyle = UIAlertViewStylePlainTextInput;
[nameAlertView show];
[nameAlertView release];
編輯
我使用的是iOS 5.1並且我有來自調試器的跟隨反饋:
Training Tool(2332,0x3f080d98) malloc: * mmap(size=1342177280) failed (error code=12) error: can't allocate region ** set a breakpoint in malloc_error_break to debug
很奇怪,因爲在我看來,在完成相同的動作時,有時它的工作原理
你確定langFile有足夠的數據嗎? –
我確定,這是langFile中的一個問題 –
當我使用其他文本@「文本」時,它就是一樣! – Thomas