Reputation: 1780
I need to set a url like this :
and show somethings like this :
is it possible to get this ?
Upvotes: 4
Views: 2418
Reputation: 1234
use this library: "URLEmbeddedView"
you can find the code here: https://github.com/szk-atmosphere/URLEmbeddedView
this library written in swift but you can use in objective-c.
objective-c simple code is in the class "OGObjcSampleViewController"
- (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
]];
}
button to fetch url
- (IBAction)didTapFetchButton:(id)sender {
[self.embeddedView loadURL:self.textView.text completion:nil];
}
Upvotes: 2