サクサク読めて、アプリ限定の機能も多数!
トップへ戻る
iPhone 16
www.swiftbysundell.com
Articles, podcasts and news about Swift development, by John Sundell. Like its name implies, Swift’s property wrappers feature enables us to wrap a given property value within a custom type, which in turn lets us apply transforms and run other kinds of logic whenever that value is modified. By default, a property wrapper is completely disconnected from the enclosing types in which it’s being used,
Articles, podcasts and news about Swift development, by John Sundell. SwiftUI offers multiple ways to connect a given view to the underlying state that it depends on, for example using property wrappers like @State and @ObservedObject. While using those property wrappers is certainly the preferred approach in the vast majority of cases, another option that can be good to keep in mind is that we ca
Articles, podcasts and news about Swift development, by John Sundell. Apple’s Combine framework enables us to model our asynchronous code as reactive pipelines that each consist of a series of separate operations. Those pipelines can then be observed, transformed, and combined in various ways — and since Combine makes heavy use of Swift’s advanced generics capabilities, that can all be done with a
Articles, podcasts and news about Swift development, by John Sundell. When dealing with properties that represent some form of state, it’s very common to have some kind of associated logic that gets triggered every time that a value is modified. For example, we might validate each new value according to a set of rules, we might transform our assigned values in some way, or we might be notifying a
Articles, podcasts and news about Swift development, by John Sundell. Most apps tend to be centered around a small number of core models. For example, a navigation app might have models such as Route and Destination, while a social networking app may deal with types like Friend, Post and Comment. But even though the data domain of an app might be relatively small, the way that data is used through
Articles, podcasts and news about Swift development, by John Sundell. Just like sequential code, concurrent code can come in many different shapes and forms. Depending on what we’re trying to achieve — whether that’s asynchronously fetching a piece of data, loading heavy files from disk, or performing a group of related operations — the abstraction that’ll prove to be the best fit might vary quite
Articles, podcasts and news about Swift development, by John Sundell. The introduction of SwiftUI, Apple’s declarative new UI framework, was clearly one of the most impactful announcements made during this year’s WWDC conference. As a brand new way of building UIs for all of Apple’s platforms, using a coding style that’s vastly different from the way UIKit works, SwiftUI isn’t just a new framework
Articles, podcasts and news about Swift development, by John Sundell. One of the most interesting aspects of SwiftUI, at least from an architectural perspective, is how it essentially treats views as data. After all, a SwiftUI view isn’t a direct representation of the pixels that are being rendered on the screen, but rather a description of how a given piece of UI should work, look, and behave. Th
Articles, podcasts and news about Swift development, by John Sundell. The iPad continues to be a source of much debate - not only in the iOS developer community, but in the tech industry at large as well. Will the iPad replace the Mac, can you get real work done on iOS, and should the iPad be treated as a proper computer? Whether or not you believe that the iPad is the future of computing, it does
Articles, podcasts and news about Swift development, by John Sundell. A DSL, short for Domain Specific Language, can be explained as a special kind of API that focuses on providing a simple syntax that's tailored to working within a specific domain. Rather than being complete stand-alone languages - like Swift is - DSLs are often hosted in other languages, and as such, need to use a grammar that's
Articles, podcasts and news about Swift development, by John Sundell. Every app that doesn't only consist of one single UI needs some form of navigation - to enable users to move between different screens and to display information or react to events. Whether you use navigation controllers, modal view controllers or some form of custom paradigm - having a nice way to perform navigation, in a way t
Articles, podcasts and news about Swift development, by John Sundell. Mocking is a key technique when it comes to writing unit tests in pretty much any language. When mocking an object, we are essentially creating a "fake" version of it - with the same API as the real one - in order to more easily be able to assert and verify outcomes in our test cases. Whether we're testing networking code, code
Articles, podcasts and news about Swift development, by John Sundell. Shared state is a really common source of bugs in most apps. It's what happens when you (accidentally or by design) have multiple parts of a system that rely on the same mutable state. The challenges (and bugs) usually come from not handling changes to such a state correctly throughout the system. This week, let's take a look at
Articles, podcasts and news about Swift development, by John Sundell. One of the hardest things when building apps and designing systems is deciding how to model and deal with state. Code managing state is also a very common source of bugs, when parts of our app might end up in a state we didn't expect. This week, let's take a look at some techniques that can make it easier to write code that hand
Articles, podcasts and news about Swift development, by John Sundell. Swift’s @autoclosure attribute enables you to define an argument that automatically gets wrapped in a closure. It’s primarily used to defer execution of a (potentially expensive) expression to when it’s actually needed, rather than doing it directly when the argument is passed. One example of when this is used in the Swift stand
このページを最初にブックマークしてみませんか?
『Swift by Sundell』の新着エントリーを見る
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く