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
// iOS 11.4 | |
// Xcode 9.4 | |
// KILabel 1.0.0 by cocoapods | |
import UIKit | |
import KILabel | |
class ViewController: UIViewController { | |
@IBOutlet weak var tableView: UITableView! |
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
func dayNumOfMonth(year:Int, month:Int) -> Int { | |
let components = DateComponents(year: year, month: month) | |
let calendar = Calendar.current | |
let date = calendar.date(from: components)! | |
let range = calendar.range(of: .day, in: .month, for: date)! | |
return range.count | |
} |
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
// | |
// LineSpacingLabel.swift | |
// SimplePhotoMemo | |
// | |
// Created by osanai on 2018/10/09. | |
// Copyright © 2018年 osanai. All rights reserved. | |
// | |
// 行間をStoryboard上で調整する |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
// | |
// CustomScrollView.m | |
// UIControlTest | |
// | |
// Created by osanai on 2017/01/18. | |
// Copyright © 2017年 osanai. All rights reserved. | |
// | |
#import "CustomScrollView.h" |
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
http://dev.classmethod.jp/smartphone/ios-all-stars-report/ |
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
PROJECT -> Info -> ConfigurationsでPods設定 |
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
CustomViewの中ではAutoLayoutの影響が適用されるのがviewDidLayoutSubivews後 | |
VCの中では普通にframe取れる |
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
for (CALayer *layer in self.layer.sublayers) { | |
[layer removeFromSuperlayer]; | |
} |
NewerOlder