2019-09-01から1ヶ月間の記事一覧
import CoreMotion let manager = CMMotionManager() override func viewDidLoad() { //取得の間隔 manager.accelerometerUpdateInterval = 0.01 manager.startAccelerometerUpdates(to: OperationQueue.current!, withHandler: { (data, error) in self.get…
layerを透明にする cliptsToBoundsも必要 class CustomTabBarController: UITabBarController { override func viewDidLoad() { super.viewDidLoad() tabBar.layer.borderWidth = 0.5 tabBar.layer.borderColor = UIColor.clear.cgColor tabBar.clipsToBound…
テラスハウスのnetflixの最初の東京編が始まって今更見たのですが、個人的に結構男性陣の推しが多い。 アーマン:仕事は全然してなさそうだけど、ハワイアンな時間が流れててすごくいい。ムードメーカー 半さん:ハイスペック人材。彼女持ち。タバコ吸わなけ…
テラスハウスのnetflixの最初の東京編が始まって今更見たのですが、個人的に結構男性陣の推しが多い。 アーマン:仕事は全然してなさそうだけど、ハワイアンな時間が流れててすごくいい。ムードメーカー 半さん:ハイスペック人材。彼女持ち。タバコ吸わなけ…
Kotlinには可変長引数が可能。ちなみにJava5からもある。 修飾子 varargをつける 例 fun hoge(vararg fuga: Int) { var sum = 0 for(i in fuga) { sum += i } return sum } hoge(1,10,100) 配列ごと渡す場合には変数名の前に *をつける val hoges = arrayOf(…
切り替え $ sudo xcode-select --switch /Applications/Xcode.app 確認 $ xcode-select --print-path cocoapods バージョン確認 pod --version バージョン削除 sudo gem uninstall cocoapods --version=1.5.3 インストール sudo gem install cocoapods --ver…
Androidのコードを読んでいると@VisibleForTestingというアノテーションがある。 これはテストのためにつけたという意味 @VisibleForTesting public hoge() { }
class View1 : ConstraintLayout { constructor(context: Context) : super(context) constructor(context: Context, attrs: AttributeSet) : super(context, attrs) constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int) : super(contex…
java.lang.RuntimeException: Method optJSONObject in org.json.JSONObject not mocked. See http://g.co/androidstudio/not-mocked for details. 解決方法 http://g.co/androidstudio/not-mockedに書かれているように gradleファイルに以下を追加 testOpti…
ERROR: The Android Gradle plugin supports only Kotlin Gradle plugin version <バージョン番号> and higher. が出た時の対象法 gradleファイルのext.kotlin_versionを指定バージョン以降にあげる ext.kotlin_version = '1.3.10'
Cause: buildOutput.apkInfo must not be null 対処法 Build -> Clean Project してクリーンをしてから行う