まだどこにもないアプリを作る

アプリ開発でつまづいたところなどを中心に記事にして行きます。

Swift ライブラリ Toast-Swift 特定の出てほしい位置を指定するコード

github.com

以下のような感じです。

// 画面下部から120px、中央に配置
let centerX = topViewController.view.bounds.width / 2
let bottomY = topViewController.view.bounds.height - 120
view.makeToast("Toast", duration: 100.0, point: CGPoint(x: centerX, y: bottomY), title: nil, image: nil) { didTap in }

参考になりましたら幸いです。