leoiphonedev/DetectLinksUILabel
we will learn how to detect a part of text from a string in swift 5. We will assign our string to UILabel using attributedText property of UILabel, as we want text to be of different colour's in order to let user know which part of text is tap-able to user. For example, in sign up page of our we have to show a label for terms and conditions and privacy policy, on tap of terms and condition user will be shown T&C page and when user tap on privacy policy, he will be navigated to Privacy Policy page. In order to achieve this requirement, we will use UITapGesture and NSRange.
Swift