Top-notch video tutorials for Swift developers

Thousands of developers use NSScreencast to stay on top of iOS development.

ExxonMobil
Venmo
Thoughtbot
The Working Group
Medium

Updated Regularly

Bite-sized videos on iOS development.

The iOS landscape is large and changes often. With short, bite-sized videos released on a steady schedule, NSScreencast helps keep you continually up to date.

Up to date with Xcode 15 and iOS 17

We cover the latest and greatest to get you up to speed quickly.

UIKit, SwiftUI, SwiftData, and macOS

In our catalog you'll find a wide variety of topics and UI frameworks.

Swift Language

Increase your knowledge of the Swift language and take advantage of new Swift language features as they are developed.

High Quality Videos

We stress the details. Each screencast is carefully produced in HD quality.

Short and Focused

We don't want to waste your time. Most videos are between 10 and 20 minutes long.

Any Device

Stream on the web or use our native apps for iOS or the tv.

Team Plans

Get NSScreencast for your whole team. Discounts start at 5 seats
Steven Tolton

Have I mentioned lately how awesome NSScreencast is? No? Worth the subscription. Check it out if you’re an iOS developer. Or even if you’re not and you want an example of how to do coding screencasts well.

Foster Bass

Got tired of dead-end googling so I checked to see if @NSScreencast had covered what I was looking for. Of course he had, 4 years ago. Should have checked there first.

Aijaz Ansari

One 13-minute episode of @NSScreencast just paid for the yearly subscription fee in amount of time saved. Do it.

Sam Soffes

Seriously great stuff even for seasoned developers. I’ve learned a good amount from Ben’s videos.

James Dempsey

You can really expand your development horizons in just a few minutes a week with NSScreencast.

Alexis Gallagher

Random PSA for iOS developers: @NSScreencast is a great resource, and worth every penny. It’s high quality, practical, and honest.

Nate Armstrong

Can’t say enough good things about @NSScreencast There is gold in the Road Trip DJ Series.

Karl Oscar Weber

I just reuppped my subscription to @NSScreencast. [An] indespensible resource if you’re into iOS or Mac Development.

Marcus Ziadé

Just finished @NSScreencast series on Modern CollectionViews. Strongly recommended. Programmatic UI, nicely structured code, easily approachable explanation style. 👌

Showing episodes 97 - 120 of 573 in total
  • Styling Text with Attributed Strings

    #477

    Layout in Code

    To work with styled text we'll use NSAttributedStrings, which allow us to apply styles to ranges of text. Doing this in code is a bit more cumbersome than in storyboards, but allows us to control things like font size, color, style, kerning, line spacing and more.

  • Easier Autolayout Constraints with SnapKit

    #476

    Layout in Code

    The built-in way of adding constraints in code requires quite a bit of code and is a bit cumbersome to write. I believe that we should aim to reduce friction when writing code like this to make it easier to add new views and change your layout. SnapKit is a pretty useful dependency that gives you a DSL for making autolayout constraints. In this episode we'll integrate SnapKit into the project and simplify our existing layout code.

  • Extracting View and Layout Code into a Custom View

    #475

    Layout in Code

    If you look at our view controller now, it is full of code that mostly is dealing with constraints, subviews, and overall layout. This is really the job of the view. In this episode we will extract this into a new view class. We'll also introduce a reusable base class that will handle the required view initializer dance for us, making the job of creating custom view classes a bit easier.

  • Gradient View

    #474

    Layout in Code

    One really useful UIView subclass I generally have on all my projects is a simple GradientView. You give it two colors and optionally some location values and it draws a gradient from top to bottom. In this episode we build this so that we can integrate a fade to black effect to overlay on top of the background image.

  • SwiftUI Previews for UIKit

    #473

    Layout in Code

    In this episode we will see how we can leverage SwiftUI's live previews even if we aren't using SwiftUI and even if our deployment target is less than iOS 13! We'll cover previewing our view controllers and using that to give us rapid feedback on our layout as we work.

  • Setting up Scene Delegates in Code

    #472

    Layout in Code

    When working on a project that doesn't use Storyboards, we have to create our window and root view controller manually. iOS 13 introduced the concept of Scene Delegates, which change how this is typically set up. In this episode we will review how to set up a new project, remove the storyboard references, and set up the window and root view controller in code.

  • Faking an API Server with URLProtocols

    #471

    Imagine you're building an app that will consume an API, however the API is not ready yet. The server team has given you some sample responses as JSON files you can use to start working against. In this episode we'll examine a useful technique of registering a custom URLProtocol for intercepting and handling network requests. We can use this fake server to continue building out our network infrastructure without being dependent on the backend API.

  • Create a Custom Button Component

    #470

    One of the quickest ways for an app to give some personality and branding is to customize the type of buttons in the app. Out of the box iOS gives us a rather uninspiring blue label that is known to be a button, but it is common for apps to have their own button design. In this episode we will take a stylized button design from Dribbble and implement it as a custom component. We'll build it in a playground so we can see our work quickly, and we'll create custom previews (similar to SwiftUI) for viewing multiple states of the button at the same time.

  • Creating a Command Line Progress Bar

    #469

    Command Line Swift

    Now that we have some streaming output from the ffmpeg process, we can take this and create a custom progress bar. Since this could useful in other utilities we can create it as a separate Swift package and import it using a local file reference.

  • Handling Long Running Tasks

    #468

    Command Line Swift

    When dealing with long running tasks it would be nice to be able to gather output as the task runs and not hang until the entire process is done. In this episode we will extract some useful information out of ffprobe, so we can get the total number of frames in a video file, and then kick off ffmpeg to encode the video. We'll use the Subprocess package to provide a simpler interface over gathering output from a pipe as it is sent, rather than waiting for the end.

  • ANSI Colors in Command Line Output

    #467

    Command Line Swift

    I always like it when command line programs offer colored output, which helps to discern between various stages of output, highlight errors and other important information. This is done with ANSI color codes, which are a somewhat archaic technique, but we can implement a nice wrapper to make it easy to work with in Swift.

  • Executing Shell Commands

    #466

    Command Line Swift

    In this episode we will launch other programs as sub processes and show how to capture its output.

  • Working with Files

    #465

    Command Line Swift

    Working with files and folders with FileManager is cumbersome. Instead we'll lean on the excellent Files package from John Sundell.

  • Command Line Apps In Swift - Parsing Arguments

    #464

    Command Line Swift

    I use a collection of command line scripts that help me in the production of NSScreencast episodes. Most are written in Ruby, which is a language I know and love, and some are written in bash, which is... a language. I sometimes wonder what these scripts would look like if I were to write them in Swift. So in this new series I'm going to explore rewriting a script that I use to encode videos using Swift. In this episode we'll bring in the excellent Swift Argument Parser library and use it to give us a clean and consistent command line interface to start with.

  • Data Fetching and Caching with Pigeon

    #463

    Pigeon is an interesting and powerful library for SwiftUI and UIKit for fetching and caching data. In this episode we will explore the library and how we can use it to build a simple Star Wars Universe explorer app using the Star Wars Dev API.

  • Working with Measurements in Swift

    #462

    Foundation has a wonderfully useful support for dealing with measurements like distances, durations, temperatures and more in Swift. The Measurement class combines with a Unit type to constrain the measurements into their own domains. With this you can get functionality like conversion and addition. With MeasurementFormatter we can format these values for display in our UI based on the user's locale. In this episode we will explore how to use this API, how to extend the existing dimensions to add new measurement values, and how to create your own domain of measurements. For this we will model Throughput of Items in the game Factorio.

  • Testing with Resolver

    #461

    One of the benefits we can get by programming to protocols and leaving our concrete implementations isolated, is that we enable swapping out these dependencies for different ones for use during tests. Doing so will require us to restructure our app setup a bit so we can have a completely separate AppDelegate and SceneDelegate for use in testing. With this setup we can control the environment completely. We'll setup mock dependencies that we can verify that the interaction with these dependencies is as expected.

  • Dependency Injection with Resolver

    #460

    Managing dependencies can be a pain. Unless you're using shared instances accessible everywhere, you end up having to pass along dependencies from class to class. One strategy for decoupling your types from external dependencies is to create protocols and "inject" the actual concrete implementations at runtime. This enables you to test them easily and also isolates library-specific APIs from the rest of your application. This can make switching between libraries more feasible. In this episode we'll take a look at a library called Resolver that does this. Technically it implements Service Location rather than Dependency Injection, but the result is similar.

  • Item Anchors

    #459

    Working with Modern Collection Views

    Using Item Anchors we can position decoration views anchored to our layout items. This is could be used to outline or underline items, or in our case to add a little unread indicator badge to our items.

  • Using the Layout Environment

    #458

    Working with Modern Collection Views

    Not every layout will be appropriate for every screen size. In this episode you'll see how you can use the layout environment when constructing your compositional layout to provide a more suitable layout for iPad.

  • Background Decoration Views

    #457

    Working with Modern Collection Views

    One of the things you'd get for free with UITableView in the grouped style is a nice rounded rect background around your sections. With UICollectionView, you can implement these with background decoration views. We'll see how to set these up in our compositional layout to give the series section a different feel.

  • Heterogeneous Sections

    #456

    Working with Modern Collection Views

    Our Diffable Datasource and snapshots are generic over the type of data that we pass to the cells. So how can we make sections with completely different data? In this episode we'll cover one approach which involves defining an enum with associated data for each of the sections. We'll use this to add a Series strip of data mixed in with our collection view.

  • Section Headers

    #455

    Working with Modern Collection Views

    In this episode we'll make a custom header view to give some of our sections a title. The approach we use here with compositional layout is more flexible than with UITableView. We'll start with a UICollectionReusableView implementation for our header, add the desired item to our layout, and then vend the desired view using the datasource's supplementaryViewProvider.

  • Diffable Datasource Snapshots

    #454

    Working with Modern Collection Views

    Diffable datasources provides a great API for driving your collection view updates in a transactional, state-driven way. We no longer have to manually call insert/delete/move rows when the data is changed. Instead, we apply a new snapshot and the changes are made for us, including animations.