2018-09-01から1ヶ月間の記事一覧
Introduction This article shows how to solve the build error related with "CommonCrypto" on Xcode10. After updating the Xcode to version10, I faced on the error messages as below. The CommonCrypto was imported by cocoapods in my case. Rede…
Introduction This article shows how to connect to localhost on Mac from iPhone and some tips. Conditions Mac and iPhone is on the same network. How to connect it Set up the localhost server on a mac Confirm the access to the "localhost:{Po…
English version below https://hopita.hatenablog.com/entry/2018/09/30/154646?_ga=2.108892930.1252126168.1538288528-147310722.1524970173 はじめに Macでテスト用サーバーを立ててiPhoneから簡易的に試したいときのTipsです。 前提 MacとiPhoneは同一…
English version below https://hopita.hatenablog.com/entry/2018/09/30/154646 はじめに Xcode10来ましたね。 早速アップデートしてみると次のようなエラー。 CocoaPodsとかで、モジュールをプロジェクトに組み込んでいると出会いやすいっぽいです。 Redef…
Introduction This article shows how to change a language settings while debugging on the devices. This method is useful for confirming the localized String or text including line breaks. It won't need to change the language from settings a…
English version is below. https://hopita.hatenablog.com/entry/2018/09/12/220856 はじめに 実機でデバッグ時に言語設定したい。 ローカライズがきちんとできているか、改行が正しくできているかなど確認するときに便利な方法です。 いちいちデバイス言語…
English version below https://hopita.hatenablog.com/entry/2018/09/09/091925 はじめに UIPageViewControllerを早送りしたときに次のようなエラーが出ました。 Unbalanced calls to begin/end appearance transitions for そのときのコードはこんな感じで…
Introduction When I tried to transition some pages so rapidly. The Xcode shows an error message as below. Unbalanced calls to begin/end appearance transitions for The code is below. class MyPageViewController: UIPageViewController { var ma…
Introduction It was difficult and complexity to set the autolayout programatically when the AutoLyaout announced in iOS NSLayoutConstraint(item: button, attribute: .leading, relatedBy: .equal, toItem: self.view, attribute: .leadingMargin, …
English version below https://hopita.hatenablog.com/entry/2018/09/06/204428 はじめに AutoLayoutが発表された当初、AutoLayoutをコードから設定するのは面倒でした。 NSLayoutConstraint(item: button, attribute: .leading, relatedBy: .equal, toItem…
Solution let board = UIPasteboard.general board.string = "ABC"
解決方法 ものすごく簡単です。 let board = UIPasteboard.general board.string = "あいうえお"
Introdution This article show the basically usage of Decodable Protocol. What's the Decodable The Decodable give us an easy way to convert the JSON Data type to Class or Struct. Thanks for the Decoable protocol, developer could access each…
English version below https://hopita.hatenablog.com/entry/2018/09/02/110756 はじめに 今回はSwift4 で追加されたDecodableの使い方について紹介します。 Decodableとは API Requestなどで返ってくるJSONのData型を任意のクラスや構造体に変換する際に便…
Introduction This article shows how to wait for an async procedure like API Request or some closure. Solution It is easy to wait an async procedure using "expectation" Sample Code let request = SomeRequest() let expect = expectation(descri…