iOS TTTAttributedLabel委托didSelectLinkWithURL未被调用 [英] iOS TTTAttributedLabel Delegate didSelectLinkWithURL not getting called

查看:417
本文介绍了iOS TTTAttributedLabel委托didSelectLinkWithURL未被调用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在项目中设置TTTAttributedLabel时遇到问题。

I'm having problems setting up the TTTAttributedLabel within my project.

我在头文件中设置了协议委托

I have set the protocol delegate in my header file

@interface TwitterFeedControlleriPad : UIViewController <TTTAttributedLabelDelegate, UICollectionViewDataSource, UICollectionViewDelegate, UICollectionViewDelegateWaterfallLayout>

我已将ViewController设置为它(不是零,我已经检查过了。)

I have set the ViewController to it (is not nil, I checked already).

cell.tweetLabel.delegate = self;

它显示标签中的所有链接,但是当我点击它们时它不会调用该函数。 / p>

It's showing all the links right in the label but when I tap them it's not calling the function.

- (void)attributedLabel:(TTTAttributedLabel *)label didSelectLinkWithURL:(NSURL *)url

我之前已经成功使用它,它的代码完全一样!这让我发疯了!

I've already used it before with success and it's exactly the same code!! It's driving me crazy!

推荐答案

解决了!问题是CollectionViewCell中的User Interaction Enabled复选框......它被禁用了!我花了4个小时才想出来!不管怎样,谢谢你!

Solved! The problem was the "User Interaction Enabled" Checkbox in the CollectionViewCell... It was disabled! it took me 4 hours to figured it out!! Thank you anyway!

这篇关于iOS TTTAttributedLabel委托didSelectLinkWithURL未被调用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆