1.
nsmutableattributedstring *content = [[nsmutableattributedstringalloc]initwithstring: [nsstringstringwithformat:@ " Registration is deemed to agree to the XXX registration agreement "]";
2.
nsrange contentrange = { Span style= "COLOR: #8b87ff" >0 ,[content length " };
[Content AddAttribute:nsunderlinestyleattributenamevalue: [nsnumber Numberwithinteger:nsunderlinestylesingle]range: Contentrange];
3.
Label. Attributedtext = content;
Response Link:
1.
-(void) Touchesbegan: (nsset *) touches withevent: (uievent *) event
{
uitouch *touch = [touches anyobject];
cgpoint points = [Touch locationinview:self. View];
Find the appropriate label label
UILabel *label = (UILabel *) [self. Viewviewwithtag:Klinklabel];
Determines whether the range of current touch points is within the range of the label position
if(Points.x>= label.Frame.Origin.x&& points.y>= label.Frame.Origin.y&& points.x<= label.Frame.size.width+ label.Frame.Origin.x&& points.y<= label.Frame.size.Height+label.Frame.Origin.y)
{
Responding to Events
.....
}
}
Uilabe Underline and Response links