Skip to content

Instantly share code, notes, and snippets.

View airrons's full-sized avatar
😘
I may be slow to respond.

airrons

😘
I may be slow to respond.
View GitHub Profile
@airrons
airrons / Lepton Use.md
Created August 8, 2018 05:17
[How to use Lepton ?] This is a description of Leption use ! #Lepton Use
@airrons
airrons / App Appearance.m
Last active August 8, 2018 05:15
APP 导航条、状态栏、返回按钮相关
// vim: syntax=objc
//设置返回按钮
UIImage * backImage = [[UIImage imageNamed:@"title_back_icon"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
[UINavigationBar.appearance setBackIndicatorImage:backImage];
[UINavigationBar.appearance setBackIndicatorTransitionMaskImage:backImage];
if(@available(iOS 11, *)) {
[[UIBarButtonItem appearance] setTitleTextAttributes:@{NSForegroundColorAttributeName: [UIColor clearColor]} forState:UIControlStateNormal];
[[UIBarButtonItem appearance] setTitleTextAttributes:@{NSForegroundColorAttributeName: [UIColor clearColor]} forState:UIControlStateHighlighted];
@airrons
airrons / Alert.m
Last active August 8, 2018 05:13
[Alert弹窗] This is a fast alert code for objc ! #alert
// vim: syntax=objective-c
UIAlertController * alertController = [UIAlertController alertControllerWithTitle:@"提示" message:nil preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction * cancelAction = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:nil];
UIAlertAction * okAction = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
UITextField * textField = [alertController textFields].firstObject;
if (![textField.text isEqualToString:@"新建文件"] && textField.text.length > 0) {
}