K
K
kamwork2016-01-25 17:29:30
iOS
kamwork, 2016-01-25 17:29:30

iOS doesn't provide hyperlinks?

Hello.
The developer claims that in an iOS application there is no ready-made solution for implementing hyperlinks of the link type , is this true? Or are there ready-made solutions?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
An, 2016-01-25
@Flanker_4

Your developers are saying something wrong.
NSAttributedString has parameters that are responsible for link
Something like (on obj-c)

NSMutableAttributedString * seeMore = [[NSMutableAttributedString alloc] initWithString:@"Learn more"];
    [seeMore addAttribute: NSLinkAttributeName value: @"http://google.com/" range: NSMakeRange(0, seeMore.length)];

Well, then everything is as usual
label.attributedText = seeMore;
+ UITextView (and labels too) have such a property as linkTextAttributes , which allows you to change the color, underline, etc. for links

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question