Should I put IBActions in the header file or not?

后端 未结 3 1270
梦如初夏
梦如初夏 2021-01-21 01:53

Given that iOS SDK 6.1 is used in Xcode 4.6.3 , does it make a difference to declare the method signature of IBAction in a header file or not?

Without putti

3条回答
  •  情书的邮戳
    2021-01-21 02:20

    Only declare it in the .h file if you want to connect it in your storyboard/interfaz builder or you want to make it public for other classes to call it.

    If you just want to make it private and only use it inside your class, there's no need of declaring it in the header file.

    There's no memory or performance difference.

提交回复
热议问题