SwiftUI Link - Open Website in Safari | iOS 14 | Xcode 12.4

  Рет қаралды 13,680

Sean Allen

Sean Allen

Күн бұрын

In today's video I show you how to use the new Link view in SwiftUI and iOS 14. This will open up a website in Safari directly from your app. This tutorial was created in Xcode 12.4.
If you like my teaching or presentation style, I've started creating my own courses:
seanallen.teachable.com/
Twitter:
/ seanallen_dev
Link to my book - How I Became an iOS Developer:
gumroad.com/l/sean-allen-origin
Hired.com:
hired.com/x/1n01g
Check out my podcast, iOS Dev Discussions:
itunes.apple.com/us/podcast/i...
Book and learning recommendations that help out the channel if you decide to purchase (Affiliate Links):
Ray Wenderlich Books:
store.raywenderlich.com/a/208...
Ray Wenderlich Videos:
store.raywenderlich.com/a/208...
Paul Hudson's Hacking With Swift:
gumroad.com/a/762098803
Learn Advanced Swift Here:
gumroad.com/a/656585843
Links to my iOS Dev Setup & iOS Dev Book Recommendations
www.amazon.com/shop/seanallen
#swift #softwaredeveloper #iosdeveloper

Пікірлер: 29
@seanallen
@seanallen 3 жыл бұрын
If you enjoy my teaching/presentation style, I've started creating my own iOS Development courses at seanallen.teachable.com. You can watch the first ~10% of each course for free to get a feel for them.
@chrispy104k
@chrispy104k 3 жыл бұрын
Now that's welcome addition. 👍
@bernardoesteves8055
@bernardoesteves8055 3 жыл бұрын
Coming from C language and after doing some baby steps in python and decided to start learning swift but hated the storyboard thing. came across your channel and literally binge watched this whole playlist of SwiftUI tutorials. Excellent work, loved your teaching style. Thank you Sean!
@seanallen
@seanallen 3 жыл бұрын
Thanks for the kind words, Bernardo. I just started my shift to SwiftUI content this year, so there's plenty more to come!
@glennadams7047
@glennadams7047 3 жыл бұрын
Nice!
@andresmade2853
@andresmade2853 3 жыл бұрын
Nice. I love these short video. Straight to the point
@seanallen
@seanallen 3 жыл бұрын
Happy to hear that, Andres.
@idc20627
@idc20627 2 жыл бұрын
Exactly what I fucking needed, thank you jedi master!
@seanallen
@seanallen 2 жыл бұрын
Haha, glad it was helpful!
@protaotogamer1503
@protaotogamer1503 3 жыл бұрын
Epic video as usual
@seanallen
@seanallen 3 жыл бұрын
Thanks Ahaan.
@radaarshinkovska1295
@radaarshinkovska1295 Жыл бұрын
Great tutorial, thank you. I have question about photo access on iPhone. I can upload image on my site in Safari, but I can't do that from my iPhone.
@kel_
@kel_ Жыл бұрын
niceee
@relax_music668
@relax_music668 2 жыл бұрын
VeryGood,Hello Teacher,How swiftui app open other app?
@HerrvonBoedefeld349
@HerrvonBoedefeld349 Жыл бұрын
Hi, I am looking for a way to open a hyperlink by button from a view controller, not the home view controller. Everything I have tried so far only works on the home view controller, but not on any other child page. Could you make a video with a solution?
@zidaantumbi8378
@zidaantumbi8378 3 жыл бұрын
Hey! How can I move the 2nd option of the button to the top? (1st time Swifter haha)
@sandhyaraut5092
@sandhyaraut5092 Жыл бұрын
Hi, what if it is a multiline text and a part of that text is a hyperlink and rest is normal string in iOS 14 version.
@Adhi-bn6qe
@Adhi-bn6qe Жыл бұрын
How can I redirect to the webpage when anything user inputs in text field??
@GamerNigga78
@GamerNigga78 11 ай бұрын
I don't have the LinkView thingy.
@anvithkakkera7196
@anvithkakkera7196 3 жыл бұрын
For the feature you were showing with the links to safari, would you recommend actually force-unwrapping it in real-time? If you would not recommend it, how would I unwrap it with an if-let statement?
@seanallen
@seanallen 3 жыл бұрын
if you're hardcoding a well-known site like apple.com, then I think it's fine to force unwrap. If you have an app where you are displaying URLs that are downloaded from a server and a network call, that's an example where unwrapping the optional is a must. You could use any unwrapping method that fits in with your implementation. If-let, guard, nil coalescing, etc...
@shivaskanthan6144
@shivaskanthan6144 3 жыл бұрын
Hmm would be nice if we could open the URL within our app instead of in Safari :)
@seanallen
@seanallen 3 жыл бұрын
You'd have to drop down to UIKit using a UIViewControllerRepresentable and SafariViewController. But if you want pure SwiftUI... you can't as of yet.
@guitaripod
@guitaripod 3 жыл бұрын
Can this do sfsafarivc things?
@seanallen
@seanallen 3 жыл бұрын
No, this is different than SafariViewController. For example, SVC will keep the user in your app and pull up a modal screen. This takes the user out of your app and into safari (with a back link to your app). There is an active debate on which is the better UX, but that's how the SwiftUI version works.
@guitaripod
@guitaripod 3 жыл бұрын
@@seanallen would be cool to have a parameter were you could choose.
SwiftUI ColorPicker | iOS 14 | Xcode 12.4
2:50
Sean Allen
Рет қаралды 6 М.
SwiftUI - Redacted Tutorial | iOS 14 | Xcode 12.4
7:14
Sean Allen
Рет қаралды 15 М.
НРАВИТСЯ ЭТОТ ФОРМАТ??
00:37
МЯТНАЯ ФАНТА
Рет қаралды 8 МЛН
Идеально повторил? Хотите вторую часть?
00:13
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 9 МЛН
Your App Will Get Rejected | New Privacy Rules - 2024
11:26
Sean Allen
Рет қаралды 35 М.
SwiftUI Link Tutorial
3:52
CodeWithChris
Рет қаралды 1,6 М.
NavigationStack 2: Programmable NavigationPath and DeepLinks
28:37
Stewart Lynch
Рет қаралды 11 М.
Displaying WebView in SwiftUI
13:51
azamsharp
Рет қаралды 10 М.
Xcode - Visual Debugger - A Tool For Debugging UI
6:36
Sean Allen
Рет қаралды 13 М.
JPEG is Dying - And that's a bad thing
8:09
2kliksphilip
Рет қаралды 47 М.
SwiftUI - Swipe Actions on List | iOS 15 & Xcode 13
8:40
Sean Allen
Рет қаралды 13 М.
Lesson 14: App Icon & Launch Screen - SwiftUI To Do List
5:24
iOS Academy
Рет қаралды 13 М.
Что делать если в телефон попала вода?
0:17
Лена Тропоцел
Рет қаралды 3,4 МЛН
Samsung laughing on iPhone #techbyakram
0:12
Tech by Akram
Рет қаралды 7 МЛН
iPhone 15 Pro в реальной жизни
24:07
HUDAKOV
Рет қаралды 500 М.