2015-07-11 53 views
0

由於標題說我有彈出打印對話框的問題(就像我按了⌘P)。但是我從來不會在代碼中調用任何會導致這種行爲的函數。viewDidLoad()後意外的打印對話框

是否有任何配置可以打開/關閉故事板文件中的鏈接(對於OS X 10.10),我可能會意外設置這些鏈接?

有一些彙編代碼執行打印命令時,它顯示:

0x7fff917c4acb <+554>: xorl %r12d, %r12d 
    0x7fff917c4ace <+557>: movq $-0x1, %rdx 
    0x7fff917c4ad5 <+564>: movl $0x1, %r9d 
    0x7fff917c4adb <+570>: movq -0x30(%rbp), %rdi 
    0x7fff917c4adf <+574>: movq -0x13d1b42e(%rip), %rsi ; "nextEventMatchingMask:untilDate:inMode:dequeue:" 
    0x7fff917c4ae6 <+581>: movq %rax, %rcx 
    0x7fff917c4ae9 <+584>: movq -0x50(%rbp), %r8 
-> 0x7fff917c4aed <+588>: callq *-0x13f3fcdb(%rip)  ; (void *)0x00007fff92ff30c0: objc_msgSend 
    0x7fff917c4af3 <+594>: movq %r14, %r13 
    0x7fff917c4af6 <+597>: xorl %r12d, %r12d 
    0x7fff917c4af9 <+600>: callq 0x7fff920e2dfa 

我還搜查了我的打印命令和設置的項目,但我無法找到發生了什麼事的任何引用。

+0

比較http://stackoverflow.com/questions/30955889/selecting-global-or-object-function。 –

回答

1

在Swift 1.2中使用print()而不是println()會導致此問題。 確保只使用後面的語法