Latest 1.0.7
License MIT
Platforms ios 10.0, requires ARC


A simple UITextView extensions allowing to add URLs and getting informed when the user selects one of these URLs. You can use the ‘linkTextAttributtes’ of UITextView in order to define the styling of the links being embeded.


Install via cocoapods by adding this to your Podfile:

pod 'APLUrlTextView', '0.0.2'


Import header file:

#import "APLUrlTextView.h"
#import "APLHrefString.h"

Use APLUrlTextView like this:

self.textView.delegate = self;
NSURL *targetURL = [NSURL URLWithString:"..."];
NSRange linkRange = NSMakeRange(...);
[self.textView addLinkToURL:targetURL withRange:linkRange];

// Implement the delegate method extending the UITextViewDelegate method
// in order to be informed about URLs being touched by the user
-(void)textView:(APLUrlTextView *)label didSelectLinkWithURL:(NSURL *)url {

Use APLHrefString to parse strings containing 'hrefs' like this "A string with 
<href="">a link</href>" and get a corresponding attributed string plus rnages and urls to be used for the APLUrlTextView.

Latest podspec

    "name": "APLHrefStringConverter",
    "version": "1.0.7",
    "summary": "A simple converter taking a string containing html formatted tags and creating a formatted attributed text",
    "description": "A simple string converter that creates an attributed text from an html formatted string. This way href can be detected and made clickable. The converter takes optional attributes and a custom htmlWrapper.",
    "homepage": "",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    "swift_versions": [
    "authors": {
        "Famara Kassama": "[email protected]"
    "platforms": {
        "ios": "10.0"
    "source": {
        "git": "",
        "tag": "1.0.7"
    "source_files": [
    "exclude_files": "Classes/Exclude",
    "resource_bundles": {
        "APLHrefStringConverter": [
    "requires_arc": true

Pin It on Pinterest

Share This