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

  • <small id='pIhJH'></small><noframes id='pIhJH'>

      1. <tfoot id='pIhJH'></tfoot>

      2. <legend id='pIhJH'><style id='pIhJH'><dir id='pIhJH'><q id='pIhJH'></q></dir></style></legend>

        什么是委托和委托方法

        What is Delegate and Delegate Methods(什么是委托和委托方法)
          <tbody id='7pnne'></tbody>

            <small id='7pnne'></small><noframes id='7pnne'>

              <bdo id='7pnne'></bdo><ul id='7pnne'></ul>

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

                1. <legend id='7pnne'><style id='7pnne'><dir id='7pnne'><q id='7pnne'></q></dir></style></legend>

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

                  问题描述

                  任何人都请告诉我代表和代表之间的区别委托方法及其区别和用法???

                  Guys anyone please let me know difference between Delegate & Delegate Methods and its differences and its usages ???

                  推荐答案

                  很难解释,但是委托代表另一个对象执行方法.当您在列表中选择一个项目时,表视图不知道该做什么.相反,它必须向委托对象询问一个问题,特别是 didSelectRowAtIndexPath.tableview 知道的唯一信息是用户点击了哪个部分和行.因此,表格视图通过本质上说嘿,用户在第 0 节中点击了第 4 行.做某事"来向委托对象提供此信息.

                  It's hard to explain, but a delegate performs methods on behalf of another object. A Table View doesn't know what to do when you pick an item in the list. Instead, it has to ask the delegate object a question, specifically, didSelectRowAtIndexPath. The only information the tableview knows is which section and row the user tapped. So the table view gives this information to the delegate object by essentially saying that "Hey, the user tapped Row 4 in Section 0. Do something."

                  委托对象找到didSelectRowAtIndexPath方法并执行里面的代码.

                  The delegate object finds the didSelectRowAtIndexPath method and executes the code inside.

                  对于许多不同的对象,有许多 Delegate 方法.例如,Text Field 对象不能自己做任何事情.相反,它使用委托来执行操作.如果您按下屏幕键盘上的 Enter 键,文本字段会要求委托对象执行特定方法 textFieldShouldReturn.如果您为文本字段设置的委托没有 textFieldShouldReturn 方法,那么当您按下回车按钮时,文本字段将不知道该做什么.

                  There are lots of Delegate methods for many different objects. For instance, the Text Field object can't do anything on its own. Instead, it uses a delegate to perform actions. If you press the enter key on the on screen keyboard, the text field asks the delegate object to perform a specific method, textFieldShouldReturn. If the delegate you set for your text field does not have a textFieldShouldReturn method, the text field will not know what to do when you press the enter button.

                  这有意义吗?

                  这篇关于什么是委托和委托方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  How to pass a #39;tap#39; to UIButton that is underneath UIView with UISwipeGestureRecognizer?(如何使用 UISwipeGestureRecognizer 将“点击传递给 UIView 下方的 UIButton?)
                  How can i increase the button width dynamically depends on the text size in iphone?(如何根据 iphone 中的文本大小动态增加按钮宽度?)
                  What#39;s the difference between UIControlStateHighlighted and UIControlStateSelected?(UIControlStateHighlighted 和 UIControlStateSelected 有什么区别?)
                  UIButton label text is being clipped(UIButton 标签文本被剪裁)
                  IOS data notifications with FCM(带有 FCM 的 IOS 数据通知)
                  NSNotificationCenter vs delegation - which is faster?(NSNotificationCenter 与委托 - 哪个更快?)

                    <bdo id='6ZylW'></bdo><ul id='6ZylW'></ul>
                            <tbody id='6ZylW'></tbody>

                            <tfoot id='6ZylW'></tfoot>
                            <i id='6ZylW'><tr id='6ZylW'><dt id='6ZylW'><q id='6ZylW'><span id='6ZylW'><b id='6ZylW'><form id='6ZylW'><ins id='6ZylW'></ins><ul id='6ZylW'></ul><sub id='6ZylW'></sub></form><legend id='6ZylW'></legend><bdo id='6ZylW'><pre id='6ZylW'><center id='6ZylW'></center></pre></bdo></b><th id='6ZylW'></th></span></q></dt></tr></i><div id='6ZylW'><tfoot id='6ZylW'></tfoot><dl id='6ZylW'><fieldset id='6ZylW'></fieldset></dl></div>
                          1. <legend id='6ZylW'><style id='6ZylW'><dir id='6ZylW'><q id='6ZylW'></q></dir></style></legend>
                          2. <small id='6ZylW'></small><noframes id='6ZylW'>