2015-07-11 58 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()会导致此问题。 确保只使用后面的语法