jjjjjjjjjjjjjjjjj
jjjjjjjjjjjjjjjjj

Reputation: 41

How to open Facebook, twitter, linkedin & a url from tab bar items? swift

Hello I have a tab bar on a contact us page with four social media items

I have searched the internet and found nothing on how to open Facebook, Instagram, linkedin and a website from tab bar items?

not bothered if its through the app (fb, twitter, linkedin) or if it opens the page up in safari...

Please advise thank you!

Upvotes: 0

Views: 265

Answers (1)

Rashwan L
Rashwan L

Reputation: 38833

Add a webView to the controller and when you click on a tabItem on your tabBar load the page in your viewWillAppear function for your controller:

webView.loadRequest(URLRequest(url: URL(string: "http://facebook.com")!))

Upvotes: 1

Related Questions