Puedo responder a mi propia pregunta ahora: estoy usando UITextView
en vez de UILabel
ahora. He formateado el UITextView
Mirarse y comportarse como mis etiquetas y agregar:
UITextView *textView = [[UITextView alloc] init];
textView.scrollEnabled = NO;
textView.editable = NO;
textView.textContainer.lineFragmentPadding = 0;
textView.textContainerInset = UIEdgeInsetsMake(0, 0, 0, 0);
textView.delegate = self;
No olvide establecer el delegado, debe implementar UITextViewDelegate
! Ahora implementamos el método delegado:
- (BOOL)textView:(UITextView *)textView shouldInteractWithURL:(NSURL *)url inRange:(NSRange)characterRange
{
return YES;
}
Esto abre automáticamente el proporcionado NSURL
-Instance de la cadena atribuida en mi pregunta en clic/toque.
Recuerde: esto funciona solo en iOS 7, para el soporte heredado necesita bibliotecas externas
ACTUALIZAR:
Haciendo el UITextView
S se comportó al igual que las etiquetas fue un desastre total al final y me topé con algunos horribles iOS-Behaviours. Terminé usando el Tttattributedlabel biblioteca que es simplemente genial y me permitió usar etiquetas en lugar de UITextView
s.