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 | |
extension UIView { | |
var useAnchor: UIView { | |
translatesAutoresizingMaskIntoConstraints = false | |
return self | |
} | |
@discardableResult |
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 { | |
class Container: UIView { | |
init() { | |
super.init(frame: .zero) | |
backgroundColor = .red | |
} |
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
NSURL *settingsURL = [NSURL URLWithString:UIApplicationOpenSettingsURLString]; | |
[UIApplication.sharedApplication openURL:settingsURL options:@{} completionHandler: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
#!/bin/bash | |
# | |
# hook script for swiftlint. It will triggered when you make a commit. | |
# | |
# If you want to use, type commands in your console. | |
# $ ln -s ../../pre-commit-swiftlint.sh .git/hooks/pre-commit | |
# $ chmod +x .git/hooks/pre-commit | |
LINT=/usr/local/bin/swiftlint | |
if [[ -e "${LINT}" ]]; then |