SwiftUI by Example is the world's largest collection of SwiftUI examples, tips, and techniques giving you almost 600 pages of hands-on code to help you build apps, solve problems, and understand how SwiftUI really works. Also available as a download edition Introduction A brief explanation of the basics of SwiftUI Don’t panic! What is SwiftUI? SwiftUI vs Interface Builder and storyboards Frequentl
Streaming is available in most browsers, and in the WWDC app. Every programming language has a set of conventions that people come to expect. Learn about the patterns that are common to Swift API design, with examples from new APIs like SwiftUI, Combine, and RealityKit. Whether you're developing an app as part of a team, or you're publishing a library for others to use, find out how to use new fea
Xcode 10までは以下のようなコードを書くと、closure内でselfを再定義するせいでLLDBが思うように変数を認識してくれなくなる。 class SomeClass { private func someFunction(someClosure: ()->Void) { someClosure() } func doTask() { let greeting = "Hi" someFunction { [weak self] in guard let self = self else { return } // ここで po greeting とかしてもちゃんと出力されない // (frame variable greeting だと問題ないけど) print(greeting) //-> "Hi" } } } error: warning: <EXPR>:12:9: warni
「SwiftUI」はWWDC 2019のキーノートで発表されたiOS/MacアプリなどのUIを構築するためのフレームワークです。Appleの公式チュートリアルなどが公開されていますので、SwiftUIを学ぶ教材という観点で、どのようなコンテンツが提供されているかまとめました。 SwiftUI はWWDC 2019のキーノートで発表された iOS/MacアプリなどのUIを構築するためのフレームワーク です。デベロッパーフレンドリーなコーディング&直感的なデザインツールの組み合わせで、超簡単にUIを構築できる特長があります。例えばこんな感じです。 import SwiftUI struct ContentView: View { var body: some View { Text("Turtle Rock") .font(.title) .color(.green) } } struct C
AI & MLLearn about artificial intelligence and machine learning across the GitHub ecosystem and the wider industry. Generative AILearn how to build with generative AI. GitHub CopilotChange how you work with GitHub Copilot. LLMsEverything developers need to know about LLMs. Machine learningMachine learning tips, tricks, and best practices. How AI code generation worksExplore the capabilities and be
SwiftUI SwiftUI helps you build great-looking apps across all Apple platforms with the power of Swift — and surprisingly little code. You can bring even better experiences to everyone, on any Apple device, using just one set of tools and APIs. What’s new SwiftUI is the best way to build apps across Apple platforms. Discover new capabilities to customize the look and feel of your apps, as well as i
この記事について 「Swift5.0のキャッチアップをまだできてない...! 」という方に向けて、Swift5.0のアップデートについてまとめたチートシートを作りました。 今回23個もの項目があるので、なるべくスマート✨かつ爆速🔥でキャッチアップしちゃいましょう! なるべくシンプルな説明になるよう心がけています。内容の詳細については、公式ドキュメントを参考にするのが良いと思います。 今回載せる画像自体の転用は自由ですのでご自由にご利用ください。 全体の内容がまとまったスライドはこちらです 筆者の理解も完全ではないので、訂正がありましたらご指摘いただけると幸いです。mm 目次 全体的なアップデート 標準ライブラリのアップデート 言語仕様/コンパイラのアップデート 1. 全体的なアップデート ABI Stability 2. 標準ライブラリのアップデート 1. Stringの特殊文字 2.
こんにちは。iOSエンジニアのJumpeiです。前回のリファクタリングの記事では主にアーキテクチャの見直しについて触れましたが、今回はStoryboardやAssets、ローカライズ周りで整理したことを紹介したいと思います。 未使用のAssetsを削除 開発する上で既存の画像を置き換えたり、新たに追加することはよくありますが、その時に古い画像を消し忘れることはないでしょうか。ファイル名が同じであれば置き換えるだけで古いほうは削除できますが、そうでない場合、こまめに削除しないとどんどん未使用なファイルが溜まってきます。リファクタ前のKyashアプリは不必要なAssetsが多くあったのですが、Assets.xcassets内の画像数が多すぎて(リファクタ時の弊社アプリは180ぐらいありました)ぱっと見、どれが未使用なのか把握することが困難でした。FengNiaoを使えば未使用なAssetファイ
Objective-CからSwiftへ、4つの移行ポイント~メルカリの実践例から最適な手法を学ぶ 多くの企業でObjective-CからSwiftへの移行が行われていますが、どのような戦略、手順が必要になるのでしょうか。実践に基づくノウハウを、メルカリの小林晋士さんが解説します。 2014年にSwiftが登場して以来、その利便性の高さから多くのiOSエンジニアがこの言語を用いるようになりました。それに伴い、Objective-Cで書かれたアプリケーションをSwiftに移行する企業も増えています。フリマアプリ「メルカリ」の開発・運営で知られる株式会社メルカリも、そのひとつです。本稿では、TOPLOG株式会社と株式会社メルカリの2社でObjective-CからSwiftへの移行を経験した小林晋士さんに、移行にあたり策定すべき戦略とポイントについて解説していただきました。 なぜSwiftで作るの
Swift 5 is now officially released! Swift 5 is a major milestone in the evolution of the language. Thanks to ABI stability, the Swift runtime is now included in current and future versions of Apple’s platform operating systems: macOS, iOS, tvOS and watchOS. Swift 5 also introduces new capabilities that are building blocks for future versions, including a reimplementation of String, enforcement of
Update your code to use new language features and test your apps against changes.
平日に戻ったら復習の機会もなくなるのでできるだけスライドとかで復習していきます。ここに書いた以外にも素晴らしいセッションがたくさんありましたが、会場で理解が追いつかなかったもの、あまりちゃんと聞けなかったものを中心に。 Keypath入門 - Introduction to Swift Keypaths speakerdeck.com SwiftのKeyPathを使って型の抽象化を行う話。例として、以下のような全然違う要素を持つStructを抽象化するのはProtocolだとできないけど、KeyPathを使えばできるよ、と。 こういうStructがあるとして、 struct User { var username: String } var player = User(username: "マリオ") で、Swiftのキーパスではこんな感じでUserの持つusernameにアクセスできる。
* UTF-16 is endianness-dependent, this table lists the bytes in little-endian Performance-sensitive string processing typically involves working with text that is heavily laden with ASCII, and this favors UTF-8. Even websites that consists almost entirely of Chinese prose (latter BMP scalars) are significantly smaller when encoded as UTF-8 due to the use of ASCII for HTML tags. Strings of user-pre
SwiftChainingというデータバインディングのライブラリを作ってみました。それなりに使い物になってきた気がするので、どのようなものか紹介しようと思います。 まだ破壊的な変更は加わる可能性はありますが、その点はご了承ください。Qiitaの記事はライブラリの変更に合わせて随時更新をしていく予定です。 SwiftChainingとは? Swiftで書かれたデータバインディングをするライブラリです。監視対象となるオブジェクトからメソッドチェーンで処理をつなげて書いて、別のオブジェクトに値に反映させるということができます。 CocoaPodsでインストールできます。モジュール名はSwiftを含まずChainingです。 なぜ作ったのか? iOS開発でデータバインディングできるライブラリは何かないかな?と探してみると、だいたいRxSwiftのようなReactive Extensionsをルーツ
Ted Kremenek is a member of the Swift Core Team and manages the Languages and Runtimes group at Apple. This post describes the goals, release process, and estimated schedule for Swift 5.1. Motivation and Goals The primary goal of Swift 5.1 is for the language to achieve module stability. Binary Compatibility On Apple platforms, since the ABI is now stabilized, Swift 5.1 is binary compatible with S
Added two footnotes with clarifications from people who were there. In episode 1 of the new Swift Community Podcast, Chris Lattner, Garric Nahapetian, and John Sundell spoke about the origins of Swift and the current state of the Swift community, among other things. This is a transcript (edited for readability) of the parts I found most interesting. You’ll see I mainly quoted Chris Lattner because
It has been a longstanding goal to stabilize Swift’s ABI on macOS, iOS, watchOS, and tvOS. While a stable ABI is an important milestone for the maturity of any language, the ultimate benefit to the Swift ecosystem was to enable binary compatibility for apps and libraries. This post describes what binary compatibility means in Swift 5 and how it will evolve in future releases of Swift. You may ask:
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く