We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UIActivityIndicatorView *indicator = [UIActivityIndicatorView defaultIndicator]; // @xaoxuu: 显示到self.view中心 indicator.show(self.view); // @xaoxuu: 隐藏 indicator.hide();
功能简单不需要解释,下面有效果图
快速
// @xaoxuu: 一行代码的消息弹窗 [UIAlertController ax_showAlertWithTitle:@"Hello Alert" message:@"这是用一行代码弹出来的只有一个按钮的窗口" action:nil]; // @xaoxuu: 最常用的【取消】+【确定】弹窗 [UIAlertController ax_showAlertWithTitle:@"Hello Alert" message:@"这是用一个方法弹出来的有两个按钮的窗口" ok:^(UIAlertAction * _Nonnull sender) { AXLogFormat(@"点击了OK按钮"); }];
效果图:
方法简单,但功能不受限
[UIAlertController ax_showAlertWithTitle:@"Hello Alert" message:@"这是用一个方法弹出来的完全自定义的系统弹窗" action:^(UIAlertController * _Nonnull alert) { // @xaoxuu: 添加取消按钮 [alert ax_addCancelAction]; // @xaoxuu: 破坏性按钮(标题为【Confirm】) [alert ax_addDestructiveActionWithTitle:nil handler:^(UIAlertAction * _Nonnull sender) { }]; // @xaoxuu: 自定义标题的破坏性按钮 [alert ax_addDestructiveActionWithTitle:@"删除2" handler:^(UIAlertAction * _Nonnull sender) { }]; // @xaoxuu: 普通按钮(默认标题为【OK】) [alert ax_addDefaultActionWithTitle:nil handler:^(UIAlertAction * _Nonnull sender) { }]; // @xaoxuu: 自定义标题的普通按钮 [alert ax_addDefaultActionWithTitle:@"确定2" handler:^(UIAlertAction * _Nonnull sender) { }]; }];
// @xaoxuu: 自定义视图的系统弹窗 [UIAlertController ax_showAlertWithTitle:nil message:@"\n\n\n\n\n\n\n\n\n\n\n" action:^(UIAlertController * _Nonnull alert) { UIView *view = [[UIView alloc] initWithFrame:CGRectMake(8, 8, 270-16, 222.3-16)]; view.backgroundColor = [UIColor md_yellow]; view.layer.masksToBounds = YES; view.layer.cornerRadius = 8; [UIActivityIndicatorView defaultIndicator].show(view); [alert.view addSubview:view]; }];
The text was updated successfully, but these errors were encountered:
No branches or pull requests
快速创建UIActivityIndicatorView
UIAlertController++
快速
效果图:
方法简单,但功能不受限
效果图:
The text was updated successfully, but these errors were encountered: