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
// 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]; |
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
// 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) { | |
} |