UITapGestureRecognizer没有打开网址

时间:2016-02-04 10:28:29

标签: ios swift

我在点按图片以在导航器中打开网址时创建了一个操作,但是当我点击它时,没有任何内容打开。这是我的代码:

This text
This text is
This text is about
This text is about my
This text is about my wish
This text is about my wish to
This text is about my wish to test
This text is about my wish to test it
 text is
 text is about
 text is about my
 text is about my wish
 text is about my wish to
 text is about my wish to test
 text is about my wish to test it
 is about
 is about my
 is about my wish
 is about my wish to
 is about my wish to test
 is about my wish to test it
 about my
 about my wish
 about my wish to
 about my wish to test
 about my wish to test it
 my wish
 my wish to
 my wish to test
 my wish to test it
 wish to
 wish to test
 wish to test it
 to test
 to test it
 test it

1 个答案:

答案 0 :(得分:1)

检查一次yourImagename.userInteractionEnabled = truefalse如果错误,则启用一次,此后所有其他功能都会自动触发

yourImagename.userInteractionEnabled  = true