Xcode链接标签

时间:2013-02-18 22:57:06

标签: iphone ios xcode hyperlink

我想在html <a href="...">text</a>中创建超链接。是否可以在Xcode中超链接标签?

2 个答案:

答案 0 :(得分:0)

我建议使用Round Rect Button,然后将背景图像设置为与视图背景颜色相同的图像。

答案 1 :(得分:-1)

只需将tapGestureRecognizer添加到该标签

即可
    UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(labelTapped:)];
    tapGesture.numberOfTapsRequired = 1;
    self.theLabel.userInteractionEnabled = YES;//Since by default, UILabel is not interaction enabled 
    [self.theLabel addGestureRecognizer:tapGesture];


    //Some where in the code
    -(void)labelTapped:(UIGestureRecognizer *)sender
    {
        //Do some stuff
    }