How do you connect the “delegate” outlet of a UITextView to a class that implements UITextViewDelegate protocol?

后端 未结 3 1391
耶瑟儿~
耶瑟儿~ 2021-01-05 03:38

How do you connect the \"delegate\" outlet of a UITextView to a class that implements UITextViewDelegate protocol?

I can\'t seem to find an example in the docs

3条回答
  •  伪装坚强ぢ
    2021-01-05 04:24

    This is a pretty old question, but I had trouble with it as well and figured I'd share an up-to-date Xcode 5 solution.

    You should be able to drag the delegate to the yellow circle with the white square inside of it that's down in that black bar below the view controller on your storyboard. This is not at all obvious, so I've provided a screenshot

    enter image description here

提交回复
热议问题