我想在html <a href="...">text</a>
中创建超链接。是否可以在Xcode中超链接标签?
答案 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
}