-
Play Youtube Video
It’s not possible to use AVKit to play YouTube videos directly, so we need to use a different solution: a Web View from WebKit. First, we need to analyze the YouTube URL. For example: “https://www.youtube.com/watch?v=ZJmn2RCtFLQ“ We need to extract the video ID, which is the string after v= — in this case, ZJmn2RCtFLQ. Since we…
-
Play a video
A nice feature that an iOS application can have is a video player. It’s simple to build. There are two ways to play a video: Video Embedded First of all, we need a video, i downloaded this one bird, renamed it to bird.mp4 and and copied it into the project (not into the assets folder)….
-
Toggle with text
Do you know the most famous question asked by Italian grandmothers (I miss you, nonne)? “Have you eaten?” Imagine answering this question with a simple Yes/No toggle — let’s turn it into a fun widget with a bit of text! Take a look at the code: We set the active color to green, and the…
-
Camera
Sometimes, a mobile application needs to take a photo to either send it to a server, modify it locally, or both (like Instagram). In this post, we’ll see how to take a photo. The process is a bit long and may seem complex, but I’ll do my best to explain everything clearly. Here’s how it…
-
Text animation
In this post, we want to learn how to use the TextRender protocol to create an animation similar to the one used in the onboarding of the Medium mobile application. We can call this animation “progressive revelation,” where characters are displayed one by one. Before looking at the code, we need to understand how TextRender…
-
Customize TextField
The most commonly used component to insert text is the TextField. We usually use it like this: This is the classic way, and it’s fine. Sometimes we need to change the placeholder text color and size, as well as the color and size of the typed text. Take a look at the code below to…
