<bdo id='dkTLr'></bdo><ul id='dkTLr'></ul>
  • <i id='dkTLr'><tr id='dkTLr'><dt id='dkTLr'><q id='dkTLr'><span id='dkTLr'><b id='dkTLr'><form id='dkTLr'><ins id='dkTLr'></ins><ul id='dkTLr'></ul><sub id='dkTLr'></sub></form><legend id='dkTLr'></legend><bdo id='dkTLr'><pre id='dkTLr'><center id='dkTLr'></center></pre></bdo></b><th id='dkTLr'></th></span></q></dt></tr></i><div id='dkTLr'><tfoot id='dkTLr'></tfoot><dl id='dkTLr'><fieldset id='dkTLr'></fieldset></dl></div>

    1. <small id='dkTLr'></small><noframes id='dkTLr'>

        <tfoot id='dkTLr'></tfoot>
        <legend id='dkTLr'><style id='dkTLr'><dir id='dkTLr'><q id='dkTLr'></q></dir></style></legend>

      1. BOOL 的默认值

        Default value of BOOL(BOOL 的默认值)
        • <bdo id='MfV9m'></bdo><ul id='MfV9m'></ul>

          • <i id='MfV9m'><tr id='MfV9m'><dt id='MfV9m'><q id='MfV9m'><span id='MfV9m'><b id='MfV9m'><form id='MfV9m'><ins id='MfV9m'></ins><ul id='MfV9m'></ul><sub id='MfV9m'></sub></form><legend id='MfV9m'></legend><bdo id='MfV9m'><pre id='MfV9m'><center id='MfV9m'></center></pre></bdo></b><th id='MfV9m'></th></span></q></dt></tr></i><div id='MfV9m'><tfoot id='MfV9m'></tfoot><dl id='MfV9m'><fieldset id='MfV9m'></fieldset></dl></div>

              <tbody id='MfV9m'></tbody>
            <legend id='MfV9m'><style id='MfV9m'><dir id='MfV9m'><q id='MfV9m'></q></dir></style></legend>
          • <tfoot id='MfV9m'></tfoot>

            <small id='MfV9m'></small><noframes id='MfV9m'>

                1. 本文介绍了BOOL 的默认值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  Objective-C 中 BOOL 变量的默认值是多少?

                  What is the default value of a BOOL variable in Objective-C?

                  推荐答案

                  没有写默认值

                  -(void)somemethod {
                    BOOL x;  // <--- no default value
                  

                  它被初始化为垃圾.

                  但是,对于 BOOL ivar,它将被初始化为 NO,因为在初始化时整个实例都被填充为 0.

                  However, for a BOOL ivar, it will be initialized to NO, as the whole instance is filled with 0 on initialization.

                  (注意:启用ARC后,本地对象指针将始终有一个默认值nil,但是像BOOL这样的非对象类型的局部变量仍然会被初始化垃圾.请参阅 局部变量设置为零?(Objective-C).)

                  (Note: When ARC is enabled, local object pointers will always be have a default value nil, but local variables of non-object types like BOOL are still initialized to garbage. See Local variables set to nil? (Objective-C).)

                  这篇关于BOOL 的默认值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  quot;Auto Layout still required after executing -layoutSubviewsquot; with UITableViewCell subclass(“执行 -layoutSubviews 后仍需要自动布局带有 UITableViewCell 子类)
                  How do I animate constraint changes?(如何为约束更改设置动画?)
                  How to change the preferred language of an iPhone app in iOS 4(如何在 iOS 4 中更改 iPhone 应用程序的首选语言)
                  NSLocale currentLocale always returns quot;en_USquot; not user#39;s current language(NSLocale currentLocale 总是返回“en_US;不是用户当前的语言)
                  How can I wait for a NSURLConnection delegate to finish before executing the next statement?(在执行下一条语句之前,如何等待 NSURLConnection 委托完成?)
                  handle when callback to a dealloced delegate?(何时回调已解除分配的委托?)
                2. <small id='MeXaG'></small><noframes id='MeXaG'>

                  1. <tfoot id='MeXaG'></tfoot>
                    • <legend id='MeXaG'><style id='MeXaG'><dir id='MeXaG'><q id='MeXaG'></q></dir></style></legend>

                          <i id='MeXaG'><tr id='MeXaG'><dt id='MeXaG'><q id='MeXaG'><span id='MeXaG'><b id='MeXaG'><form id='MeXaG'><ins id='MeXaG'></ins><ul id='MeXaG'></ul><sub id='MeXaG'></sub></form><legend id='MeXaG'></legend><bdo id='MeXaG'><pre id='MeXaG'><center id='MeXaG'></center></pre></bdo></b><th id='MeXaG'></th></span></q></dt></tr></i><div id='MeXaG'><tfoot id='MeXaG'></tfoot><dl id='MeXaG'><fieldset id='MeXaG'></fieldset></dl></div>
                            <bdo id='MeXaG'></bdo><ul id='MeXaG'></ul>
                              <tbody id='MeXaG'></tbody>