2018/04/10 追記 一部コードが古くなっています。 Xcode 9.3, Swift 4.1 の環境では以下のコードで動作します。 import PlaygroundSupport let vc = UIViewController() vc.view.frame = CGRect(x: 0, y: 0, width: 320, height: 480) vc.view.backgroundColor = .lightGray PlaygroundPage.current.needsIndefiniteExecution = true PlaygroundPage.current.liveView = vc.view Xcode の Playground を久しぶりに使ってみて、UIの実装とかこれでやると便利だな、と思ったのでやり方をまとめてみます。 やりたい完成系はこんな感じ:
Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article? ファイルを探す 名前を入力して開く File > Open Quickly... ファイル名(クラス名)だけでなく、メソッド名や変数名でも検索できる。 入力後Option+Enterキーでファイルを開くと、Assistant Editor側にファイルを開いてくれます。 (Standard Editorの状態でも、Assistant Editorのモードに切り替えた上で開いてくれる!) クラス名の一覧から開く View > Navigators > Show Symbol Navigator エディタの機能 なるべくショートカットを覚えて
Xcode アップデート後にプラグインが動作しない Xcode をアップデートすると以下のアラートが表示されますが、気にせず「Skip Bundles」をクリックしてしまっていませんか? このアラートはざっくり言うと「Apple に認可されていないプラグインを読み込む?」といった内容です。つまり、ここで「Skip Bundle」をクリックしてしまうと、プラグインが動作しません。 もう一度聞いてもらおう そんなときはもう一度確認してもらえるようにしましょう。まずは以下のコマンドを叩いて UUID を取得します。 $ defaults read /Applications/Xcode.app/Contents/Info DVTPlugInCompatibilityUUID XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX こうして得た UUID をコピーしつつ、以下のコマン
While working through a coding tutorial in the excellent iOS 8 by Tutorials book by the Ray Wenderlich crew, I learned about the new Preview Assistant Editor in Xcode 6. This is a feature that you can enable in an assistant editor while editing a view file (e.g. a storyboard or XIB). It shows what that view looks like on the ever-growing plethora of screen sizes, vastly reducing the time spent tes
Xcode の便利プラグインまとめ はじめに Xcode 8 からのいわゆる Xcode Source Editor Extension ではなく、あくまで非公式のプラグインを掲載します。 インストール先は ~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/ Alcatraz などのパッケージマネージャを使うと管理が楽 Xcode の更新でプラグインが使えなくなる事もあるので注意 "DVTPlugInCompatibilityUUID" を追記する事で対応出来る場合もある(後述) 管理 Alcatraz Xcode プラグインや Color Scheme などを管理するパッケージマネージャ。これを入れておけばこの記事を見なくてもだいたいのプラグインは参照できます。 メニューバー > Window > Package
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く