create method isLeapyear
Parameters: year(Int) Return type: Bool
プライバシーポリシー | |
情報の収集と使用 | |
第三者に個人を特定できる情報を提供することはありません。 | |
より良い体験のために、私たちのサービスを使用している間、特定の個人情報を提供するようにあなたに要求する場合があります。 | |
アプリは、あなたを識別するために使用される情報を収集する可能性のあるサードパーティのサービスを使用します。 | |
アプリで使用されるサードパーティのサービスプロバイダー |
extension URL { | |
var attributes: [FileAttributeKey : Any]? { | |
do { | |
return try FileManager.default.attributesOfItem(atPath: path) | |
} catch let error as NSError { | |
print(error) | |
} | |
return nil | |
} |
name: Swift | |
on: [push] | |
jobs: | |
build: | |
runs-on: macos-latest | |
steps: |
class FooCollectionViewCell: UICollectionViewCell { | |
override var highlighted: Bool { | |
didSet { | |
self.contentView.backgroundColor = highlighted ? #colorLiteral(red: 0, green: 0, blue: 0, alpha: 0.1) : #colorLiteral(red: 0, green: 0, blue: 0, alpha: 0.0) | |
} | |
} | |
} |
import UIKit | |
@IBDesignable class PaddingTextField: UITextField { | |
// MARK: Properties | |
@IBInspectable var padding: CGPoint = CGPoint(x: 6.0, y: 0.0) | |
// MARK: Internal Methods | |
override func textRect(forBounds bounds: CGRect) -> CGRect { | |
return bounds.insetBy(dx: self.padding.x, dy: self.padding.y) | |
} |
@IBDesignable | |
class GradationView: UIView { | |
var gradientLayer: CAGradientLayer? | |
@IBInspectable var topColor: UIColor = UIColor.white { | |
didSet { | |
setGradation() | |
} | |
} |