How to convert plist to CSV
I took so much time to solve this problem, that's why I note here.
At first, I tried to find solution using Xcode or some command, however I couldn't.
So, I changed to take another way; using web service.
1. Convert plist to JSON
http://json2plist.sinaapp.com/
2. Convert JSON to CSV
konklone.io
DONE.
UIWebViewで要素の上に灰色(黒)の謎領域が出る
こういうのです
解決法はインスペクタ「Adjust Scroll View Insets」のチェックを外す。でした
swiftでのコードのみで画面遷移
navigation controller使わずに遷移
let nextView = UIStoryboard(name: "Main", bundle: nil).instantiateViewControllerWithIdentifier("Detail") as UIViewController self.presentViewController(nextView, animated: false, completion: nil)
navigation controller使ってに遷移
let storyboard = UIStoryboard(name: "Main", bundle:nil) let pageViewController = storyboard.instantiateViewControllerWithIdentifier("Detail") as! DetailViewController self.navigationController?.pushViewController(pageViewController, animated: true)
UIImageViewにAspect Fillで画像を表示する際にはみ出ないようにする対応
storyboaed上image viewを選択し、DrawingのClip Subviewsにチェックを入れる。
ボタンに長押しを実装する [Xcode6 / Swift]
import UIKit class ViewController: UIViewController { @IBOutlet var startBtn: UIView! override func viewDidLoad() { super.viewDidLoad() let myLongPressGesture = UILongPressGestureRecognizer(target: self, action: "pushStartBtn:") myLongPressGesture.minimumPressDuration = 0.1 self.view.addGestureRecognizer(myLongPressGesture) } @IBAction func pushStartBtn(sender: UILongPressGestureRecognizer) { // todo } }
こんな感じ
subviewを消す [Xcode / swift]
addSubviewし続けるとメモリ消費も増え続けます。
なので追加したsubviewを消してメモリを解放します。
var subviews = self.view.subviews for subview in subviews{ subview.removeFromSuperview() }