Search code examples
iosobjective-clinkedin-apiskype

Get Thumb image and title of particular Website URL in iOS?


enter image description here

I have to display thumb image and get title of WEB URL same as LinkedIN app and Skype app in iOS?

Is there any Solution?


Solution

  • URLEmbeddedView written in Swift, but you can use in Objective-C.

    This is Objective-C sample code. Please check it.

    #import <URLEmbeddedView/URLEmbeddedView-Swift.h>
    #import <MisterFusion/MisterFusion-Swift.h>
    
    @interface ViewController ()
    
    @property (weak, nonatomic) IBOutlet UITextView *textView;
    @property (strong, nonatomic) URLEmbeddedView *embeddedView;
    
    @end
    
    @implementation ViewController
    
    - (void)viewDidLoad {
        [super viewDidLoad];
        // Do any additional setup after loading the view from its nib.
        self.textView.text = @"https://github.com/";
    
        [OGDataProvider sharedInstance].updateInterval = [NSNumber days:10];
    
        self.embeddedView = [[URLEmbeddedView alloc] initWithUrl:@""];
        [self.containerView addLayoutSubview:self.embeddedView andConstraints:@[
            self.embeddedView.Top,
            self.embeddedView.Right,
            self.embeddedView.Left,
            self.embeddedView.Bottom
        ]];
    }
    
    - (IBAction)didTapFetchButton:(id)sender {
        [self.embeddedView loadURL:self.textView.text completion:nil];
    }
    
    @end