问题描述
如何将 UITextView 的委托"出口连接到实现 UITextViewDelegate 协议的类?
How do you connect the "delegate" outlet of a UITextView to a class that implements UITextViewDelegate protocol?
我似乎找不到示例 在文档中
奇怪的是 UITextView 的代表"插座有拖放界面的东西,就像你可以将它连接到 另一个小部件但当然,我不想连接它到一个小部件,我想把它连接到一个现有的类.
The weird thing is the UITextView's "delegate" outlet has that drag 'n drop interface thingy, like you can wire it up to another widget but of course, I don't want to wire it up to a widget, I want to wire it up to an existing class.
推荐答案
如果您的意思是我如何将使用代码创建的对象作为我的文本视图的委托",只需设置委托属性(这就是拖动在 Interface Builder 中将为您做):
If you mean "how do I make an object that is created with code the delegate for my text view", just set the delegate property (this is what dragging in Interface Builder will do for you):
textView.delegate = yourDelegateObject;
这篇关于您如何连接“代表"?UITextView 的出口到实现 UITextViewDelegate 协议的类?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!


大气响应式网络建站服务公司织梦模板
高端大气html5设计公司网站源码
织梦dede网页模板下载素材销售下载站平台(带会员中心带筛选)
财税代理公司注册代理记账网站织梦模板(带手机端)
成人高考自考在职研究生教育机构网站源码(带手机端)
高端HTML5响应式企业集团通用类网站织梦模板(自适应手机端)