This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
import SwiftyDropbox | |
@UIApplicationMain | |
class AppDelegate: UIResponder, UIApplicationDelegate { | |
var window: UIWindow? | |
func application(application: UIApplication, | |
didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
// ## アプリ・ドキュメントDIR | |
// Core Data 保存ファイルを保存するために使用. | |
lazy var applicationDocumentsDirectory: Foundation.URL = { | |
// ファイルマネージャを使ってアプリ・サポート・ディレクトリを取得 | |
let urls = FileManager.default().urlsForDirectory( | |
.applicationSupportDirectory, inDomains: .userDomainMask) | |
let appSupportURL = urls[urls.count - 1] | |
// 取得ディレクトリ + "/CoreDataDemo_Data" を返す | |
print("アプリ・ドキュメントDIR: \(appSupportURL)") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
@UIApplicationMain | |
class AppDelegate: NSObject, UIApplicationDelegate, UISplitViewControllerDelegate { | |
// MARK: プロパティ | |
var window: UIWindow? | |
// MARK: UIApplicationDelegate |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var app = Application("Safari"); | |
app.includeStandardAdditions = true; | |
app.activate(); | |
app.displayDialog('Hello'); | |
/*------------------------- | |
app = Application("Safari") | |
app.activate() | |
app.displayDialog("Hello") | |
--> {"buttonReturned":"OK"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
//################# | |
// ファイル操作機能. | |
//################# | |
protocol FileFunc { | |
func read() -> String | |
func write(output: String, | |
whenComplete: ((err: Bool, msg: String) -> Void)) | |
func append(output: String, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Cocoa | |
@NSApplicationMain | |
class AppDelegate: NSObject, NSApplicationDelegate { | |
//詳細ビューコントローラの参照を保持. | |
var detailVC:DetailViewController? | |
//マスタービューコントローラの参照を保持 | |
var masterVC:ViewController? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Cocoa | |
/** | |
* コレクションビューに表示するアイテム. | |
*/ | |
class CollectionViewItem: NSCollectionViewItem { | |
//MARK:プロパティ | |
var movieTicket: MovieTicket? { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Cocoa | |
import Quartz | |
@NSApplicationMain | |
class AppDelegate: NSObject, NSApplicationDelegate { | |
var pdfView: PDFView? | |
func applicationDidFinishLaunching(aNotification: NSNotification) { | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
let LWinX = CGFloat(20) | |
let LWinY = CGFloat(20) | |
let LWinW = CGFloat(800) | |
let LWinH = CGFloat(600) | |
let LWinSize = CGSize(width: LWinW, height: LWinH) | |
let LWinTitle = "App Title" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Cocoa | |
//MARK: 定数定義 | |
let L行高 = CGFloat(10.2) | |
let L行数 = 80 | |
let Lマージン上 = CGFloat(10.0) //mm 単位 | |
let Lマージン左 = CGFloat(10.0) | |
let Lマージン右 = CGFloat(10.0) | |
let Lマージン下 = CGFloat(10.0) | |
// 70DPI -> 70dot/25.4mm = 2.756 |
NewerOlder