Skip to content

Instantly share code, notes, and snippets.

View Ckitakishi's full-sized avatar
🥑
Enjoying

Yuhan Chen Ckitakishi

🥑
Enjoying
View GitHub Profile
@Ckitakishi
Ckitakishi / toSetting.swift
Created April 19, 2018 06:44
open the app’s custom settings
DispatchQueue.main.async {
let url = URL(string: UIApplicationOpenSettingsURLString)
UIApplication.shared.open(url!, options: [:], completionHandler: nil)
}
// Source:
@implementation UIView (Border)
- (void)addBorder:(UIRectEdge)edge color:(UIColor *)color thickness:(CGFloat)thickness
{
if ((UIRectEdgeTop & edge) == UIRectEdgeTop) {
[self.layer addSublayer:[self borderLayerMake:CGRectMake(0, 0, CGRectGetWidth(self.frame), thickness) color:color]];
}
if ((UIRectEdgeBottom & edge) == UIRectEdgeBottom) {
@Ckitakishi
Ckitakishi / clang format
Created March 23, 2017 09:26
.clang-format
---
Language: Cpp
AccessModifierOffset: -2
AlignEscapedNewlinesLeft: false
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortFunctionsOnASingleLine: false
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakBeforeMultilineStrings: false