• How to Implement Tinder Swipe Cards in SwiftUI

    In June, we heard about SwiftUI for the first time — a totally new way of creating and working with UI elements in iOS and macOS (also iPadOS) apps. It felt like Christmas in the summer. It's new, it's declarative, it's sexy! And now, just a few weeks after iOS 13 has been released, we can start to use SwiftUI in all our projects. Let's learn how to use this amazing tool that Apple gave us, to create the classic Tinder-esque Swipe Cards.

    In this article, I would like to show you how to achieve a Tinder-like card view and behavior (swipe to action), with just a few lines of code.

    To achieve this, we need to do the following things, in order:

    • Create UserView
    • Create NavigationView
    • Create BottomBarView
    • Create SwipeView
    • Put all this together inside ContentView

    So let's get started.
    Read more →
  • Human pose estimation on images for iOS

      Human pose estimation


      A few months ago I came across one interesting open source project on the Internet — Openpose the aim of which is to estimate a human pose in real-time on a video stream. Due to my professional activities, I was interested to run it on the latest iOS device from Apple to check the performance and figure out if it is possible at all. It was also interesting to see how the performance of the neural network framework for iOS has been changed in the last years.

      Read more →
    • GitHub Package Registry will support Swift packages

        On May 10, we announced the limited beta of GitHub Package Registry, a package management service that makes it easy to publish public or private packages next to your source code. It currently supports familiar package management tools: JavaScript (npm), Java (Maven), Ruby (RubyGems), .NET (NuGet), and Docker images, with more to come.

        Today we’re excited to announce that we’ll be adding support for Swift packages to GitHub Package Registry. Swift packages make it easy to share your libraries and source code across your projects and with the Swift community.

        Read more →
      • Particle systems: a Christmas story



          Christmas has always been one of my favourite times of the year. For me, Christmas is a season that brings so much love, laughter, happiness, and other magical things into our lives.

          I was born and raised in Spain, more specifically in Tenerife, a sunny subtropical island in the middle of the Atlantic Ocean just off the African coast. I have to say that Christmas in Tenerife is very different to my the last two Christmases I’ve spent in London since joining Badoo.

          One amazing plus of living in London is that I have got to see snow for the first time in my life, real snowflakes falling from the sky. Just incredible!

          Talking of snowflakes, I have an interesting story to tell you about something that happened to me one day in the office the last Christmas.  It was right before I was heading home to Tenerife to spend a few days with my family.

          It just so happened that last December I’d been assigned a very interesting ticket with the following description
          Read more →
        • Implementing UI in iOS: Better, faster, and it scales



            A few months ago I came across a very interesting documentary series on Netflix called Abstract, they basically explore the output of professional designers from different sectors like architecture, graphic design, fashion, … in their workplaces.

            It was easy to spot some similarities in the work of designers from other fields with that of an iOS developer who implements user interfaces. For example, when a designer is creating something that is big enough to be broken down into smaller parts, using a strategy like ‘Divide and Conquer’ is key to being able to focus on smaller parts that will be assembled at later stages in the process.

            Breaking down a whole design into smaller subunits allows us to think about each problem in isolation, removing any dependencies between the components. But the full picture also needs to be present throughout the whole process, otherwise there can be problems when the time comes to fit everything back together.

            On the other hand, while watching Abstract I noticed that in the design process for objects like a shoes, banners or buildings the final design remains fixed for the lifetime of the product. The design of a Nike shoe isn’t going to change after it is released and there aren’t going to be any updates once it’s on the shelf in the shop. Sometimes a design remains unchanged even 20 years later, and the product is still sound.
            Read more →
          • The Processing of Unrecoverable Errors in Swift

            • Tutorial

            Preface


            This article is an example of how we can do research into Swift Standard Library functions behavior building our knowledge not only on the Library documentation but also on its source code.


            Unrecoverable Errors


            All events which programmers call "errors" can be separated into two types.


            • Events caused by external factors such as a network connection failure.
            • Events caused by a programmer's mistake such as reaching a switch operator case which should be unreachable.
            Read more →
          • Server-provided animations in iOS apps



              Hi everyone! About six months ago we launched one of Badoo’s most exciting features: Live Streaming. One of its main functionalities is that viewers can send gifts to their favourite streamers to express their appreciation. We wanted to make the gifts as fancy and as engaging as possible, so it was decided to make some of them really lively, and by this I mean animated. And to engage people even more, we, the Badoo team, planned to update those gifts and animations every few weeks.

              As an iOS engineer, you might have already guessed the challenge we faced here: the need to add new animations and remove the old ones was going to require a fair amount of work from the client side. We’d need both the Android and the iOS development teams for every release — which, when combined with the amount of time App Store reviews and approval often take, would mean it might be days before each update could go live. But we solved the problem, and I’m going to explain to you how.

              Solution overview


              By this stage, we already knew how to export Adobe After Effects (AAE) animations into the format readable by our iOS app using the Lottie library. This time though, we went a bit further: we decided to create a kind of animation storage service, available via the internet. In other words, we would store all the actual animations on the server and deliver them to the client apps on demand:
              Read more →
            • AdBlock has stolen the banner, but banners are not teeth — they will be back

              More
              Ads
            • Xcode 10.2, macOS Mojave 10.14.4, iOS 12.1 and other betas



                New betas are here and these are some of the most important things that I have learned about them.

                Swift 5 for Xcode 10.2 beta


                Swift


                Firstly, the latest Xcode beta is bundled with the following Swift version:

                Apple Swift version 5.0 (swiftlang-1001.0.45.7 clang-1001.0.37.7)
                Target: x86_64-apple-darwin18.2.0
                ABI version: 0.6

                Let’s start with the most exciting news:
                Swift apps no longer include dynamically linked libraries for the Swift standard library and Swift SDK overlays in build variants for devices running iOS 12.2, watchOS 5.2, and tvOS 12.2. As a result, Swift apps can be smaller when deployed for testing using TestFlight, or when thinning an app archive for local development distribution.
                Application Binary Interface stability is coming! And this is excellent news. I think this is the one of the most significant issues at the moment with Swift. Not because of side-effects but because of Swift’s failure to deliver on previous promises. Anyway, I even know people who rewrite their Apple Watch extensions to Objective C to reduce the size of binary (something like 15MB vs ~1MB in Objective C). If you want to know more about the state of ABI, follow the links: Swift — ABI Dashboard and Swift ABI Stability Manifesto.
                Read more →
              • Gotta Go Fast: Building for Speed in iOS. Part 1



                  There are a lot of tips and tricks that allow iOS developers to know how to make performance optimizations to get animations in applications run smoothly. After reading the article you will realize what 16.67 milliseconds for iOS developer means, and which tools are better to use to track down the code.

                  The article is based on the keynote talk delivered by Luke Parham, currently an iOS engineer at Apple and an author of tutorials for iOS development on RayWenderlich.com, at the International Mobile Developers Conference MBLT DEV 2017.
                  Читать дальше →