This file contains 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 | |
class ViewController: UIViewController { | |
//ユーザーが指定した時間(仮) 分 | |
let userTimer:Int = 1 | |
var count = 0 | |
var timeLabel:UILabel! | |
var secondLabel:UILabel! |
This file contains 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 | |
class ViewController: UIViewController { | |
var bezierPath:UIBezierPath! | |
var canvas:UIImageView! | |
var lastDrawImage:UIImage? | |
This file contains 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 | |
class CustomSegue: UIStoryboardSegue { | |
override func perform(){ | |
//遷移前のViewControllerのインスタンスを作成 | |
let firstVC = self.source | |
//遷移後のViewControllerのインスタンスを作成 | |
let secondVC = self.destination | |
//このモックがsecondVCの動きになる |
This file contains 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 | |
class CustomUnwindSegue: UIStoryboardSegue { | |
override func perform(){ | |
//遷移前のViewControllerのインスタンスを作成 | |
let firstVC = self.source | |
//遷移後のViewControllerのインスタンスを作成 | |
let secondVC = self.destination | |
let mock = createMockView(view: firstVC.view) |
This file contains 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 | |
class DataManager{ | |
//Documentに関する情報 | |
struct MyDocInfo{ | |
static let NAME = "document" | |
static let ECTENSION = "doc" | |
static var LOCAL_DOCUMENTS_PATH:String? = nil | |
} | |
//アプリのサンドボックスのパスを格納する変数 |
This file contains 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 | |
class CheckCollectionView: UICollectionView { | |
let reuseID = "cell" | |
let checkColor = UIColor.blue //チェックしたもののみ色をつける | |
let defaultColor = UIColor.white | |
This file contains 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 | |
class AlertManager { | |
let id = "alert" | |
var text = "通知が来ているはずだよ" | |
//現在の時間から | |
func after(day:Int,hour:Int,minute:Int,seconds:Int) -> UILocalNotification{ | |
//ローカル通知 |
This file contains 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
extension UIImage { | |
func resize(size:CGSize) -> UIImage?{ | |
// リサイズ処理 | |
let origWidth = self.size.width | |
let origHeight = self.size.height | |
var resizeWidth:CGFloat = 0 | |
var resizeHeight:CGFloat = 0 | |
if (origWidth < origHeight) { | |
resizeWidth = size.width |
OlderNewer