s140

Swiftに関するメモ

2019-01-01から1年間の記事一覧

Privacy Policy for Fermat's built the Fermat's app as a Free app. This SERVICE is provided by at no cost and is intended for use as is. This page is used to inform visitors regarding my policies with the collection, use, and disclosure of …

 Privacy Policy for CuriousCamera

Privacy Policy Kazunari Sato built the CuriousCamera app as a Free app. This SERVICE is provided by Kazunari Sato at no cost and is intended for use as is. This page is used to inform visitors regarding my policies with the collection, use…

bundle内のファイル一覧を取得

qiita.com import UIKit class ViewController: UIViewController { override func viewDidLoad() { do { let files = try FileManager().contentsOfDirectory(atPath: Bundle.main.bundlePath) print(files) } catch let error { print(error) } } }

画像の読み込み、拡大縮小(UIImage)

import UIKit let myImage:UIImage = UIImage(named: "x.jpg")! let mySize:CGSize = CGSize(width: 500.0, height: 500.0) UIGraphicsBeginImageContextWithOptions(mySize, false, 1.0) myImage.draw(in: CGRect(x: 0.0, y: 0.0, width: 500.0, height: 50…