1

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

4

2 回答 2

0

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

于 2013-06-10T18:24:23.590 回答
-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
    }
于 2013-02-18T23:12:07.723 回答