You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
ビューコントローラにて画面表示時に呼び出されるメソッドのライフサイクルになります。 下記の順番にて呼び出されますので必要に応じてオーバーライドします。 // Life Cycle // UI 部品を View へセットする場合はこちらをオーバーライドします。 // ただし、UI 部品のセットはこのメソッドでなくても問題ありません。 override func loadView() { super.loadView() print("loadView") } // 初期表示時に必要な処理を設定します。 override func viewDidLoad() { super.viewDidLoad() print("viewDidLoad") } // 画面に表示される直前に呼ばれます。 override func viewWillAppear(animated: Bool) { super.
CA.swift #12 WWDC20報告会 https://cyberagent.connpass.com/event/177267/ で発表した資料です。 Apple Beta Software のスクリーンショットは差し替えています。 サンプルコード ・https://github.…
参考 Dangerで効率よくPR駆動開発 | Recruit Jobs TECHBLOG https://techblog.recruitjobs.net/development/danger_driven_development ashfurrow/danger-swiftlint: A Danger plugin for SwifLlint. https://github.com/ashfurrow/danger-swiftlint Danger - Reference http://danger.systems/reference.html Dangerで始めるPull Requestチェック自動化 - コネヒト開発者ブログ http://tech.connehito.com/entry/danger 使うもの Danger Fastlane TravisCI Github 本題 T
In some projects is common to have “different builds” depending on the tester groups. I’m talking about situations where you need to have “different builds” using the same code base and with the same bundle identifier, for instance: “QA”, “Beta” and “AppStore” and a common way to identify them is to change the Display Name so our testers know what build are they testing. With a combination of Xcod
A picture’s worth a 1000 tests. Unit testing asserts can be difficult to use. Approval tests simplify this by taking a snapshot of the results, and confirming that they have not changed. In normal unit testing, you say assertEquals(5, person.getAge()). Approvals allow you to do this when the thing that you want to assert is no longer a primitive but a complex object. For example, you can say, Appr
WebViewでJavascriptとSwiftの双方向通信を行う方法です。 JavascriptからSwiftのメソッドを実行する 基本的な使い方 Swift UIWebViewではなく、WKWebViewを使用します。 WKUserContentControllerでJavaScriptで実行するコールバックを登録します。 実行されたコールバックはWKScriptMessageHandlerのuserContentControllerで受け取れます。 Javascript側で呼び出したコールバックはmessage.nameで取得できます。 class ViewController: UIViewController, WKScriptMessageHandler { override func viewDidLoad() { super.viewDidLoad() let webCon
Qiita の仕様上コード表示の横幅に限度があるため、改行を多用しております。ご了承ください。 仕様 上記のような画面構成が要求されたとして説明していきます。重要な制約をまとめると以下のとおりです。 UILabel は改行可能 UIImageView は正方形で、端末サイズによって可変(Cell 間隔を 16px として一行に3つ配置) CollectionViewCell の height は UIImageView と UILabel の height によって決定される CollectionViewCell の width は UIImageView の width によって決定される Cell の height が一行3つの中で同じでない場合、一番高いものに合わせる 方針 UIImageView の width (正方形なので自動的に height も決まる) と UILabel
import Foundation protocol Animal { var binomen:String { get } init() } struct Cat: Animal { let binomen = "Felis silvestris catus" let theYoung = "kitten" } struct Dog: Animal { let binomen = "Canis lupus familiaris" let theYoung = "puppy" } var pet:Animal = (arc4random() & 1 == 1) ? Cat() : Dog() Q0: このコードは動きますか? A0: 動く A1: (type mismatchで動かない) 正解はA0、きちんと動きます。PlaygroundsなりREPLで確認してみてください。で、本題です。
MVVMについてのおさらい 本記事は下記のページの翻訳になります。翻訳の許可を頂いてます。 Design Patterns by Tutorials: MVVM ちなみに先に言っておきますが、 私はMVVMは面倒臭い派でMVCの方が好きです。 近年、iOS開発でMVVMがよく持ち上げられているのであえてこの記事を通してMVVMの理解を深めたいと思って読んでいました。 MVVMをこれから学ぶ人にも共有したくはありますが、 どちらかといえば**「MVVMめっちゃいけてるやんって思っている方」**にこそ日本語で読んでいただきたいと思っての共有です。 Design Patterns by Tutorials: MVVM これは、我々の本「チュートリアルによるデザインパターン」の第10章「Model-View-ViewModel」から抜粋したものです。あなたが開発する言語やプラットフォームに関係なく
Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article? 更新情報 2018/7/1:基本サンプルにAVSpeechSynthesizerSample、HomeScreenQuickActionsSample、PeekAndPopSampleを追加。 2019/9/23:全サンプルをXCode10.3、Swift5に対応 はじめに カスタムセルを使ったCollectionViewの表示、手を止めずに作れますか? TableViewCellを伸び縮みさせたり、視覚効果を与えたりする、、、何も調べずに作れますか?? おそらく開発業務に携わっているほとんどの方は(僕を含めて)新規に何かを作成する場合
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く