AXKit icon indicating copy to clipboard operation
AXKit copied to clipboard

系统类的功能扩展和一些常用的控件封装。文档地址:https://xaoxuu.com/wiki/axkit

Results 26 AXKit issues
Sort by recently updated
recently updated
newest added

### 更改了一些layer相关设置的接口 想要实现圆角阴影效果可以这样: ```objective-c UIView *view = [[UIView alloc] initWithFrame:CGRectMake(100, 100, 100, 100)]; view.backgroundColor = [UIColor yellowColor]; // 圆角半径30,阴影为向下投射的浮起样式 [view.layer ax_cornerRadius:30 shadow:LayerShadowDownFloat]; [self.view addSubview:view]; ``` 想自定义阴影效果可以这样: ```objective-c [view.layer ax_customShadowWithOpacity:0.2 radius:5...

releaselog

### 快速创建UIActivityIndicatorView ```objective-c UIActivityIndicatorView *indicator = [UIActivityIndicatorView defaultIndicator]; // @xaoxuu: 显示到self.view中心 indicator.show(self.view); // @xaoxuu: 隐藏 indicator.hide(); ``` > 功能简单不需要解释,下面有效果图 ### UIAlertController++ 快速 ```objective-c // @xaoxuu: 一行代码的消息弹窗 [UIAlertController ax_showAlertWithTitle:@"Hello Alert" message:@"这是用一行代码弹出来的只有一个按钮的窗口"...

releaselog

### NSString+ 字符串其实可以干更多事 - [x] 转URL - [x] 判断是不是URL - [x] 转Image ```objective-c - (nullable NSURL *)absoluteURL; - (BOOL)isURLString; - (nullable UIImage *)image; ``` 例如我们获取到一个"URLString",用来显示用户头像 ```objective-c NSString *tmp = @"https://xaoxuu.com/images/avatar.png";...

releaselog

### UIImageViewWithImageNamed 根据图片名快速创建imageview ```objective-c UIImageViewWithImageNamed(NSString *name); ``` ### 更灵活的popViewController 有时候你可能会需要pop到上上一层控制器,或者根控制器下的第二个控制器等等, 有了这两个方法,你可以pop到同一NavigationController下的任意一个控制器。 ```objective-c /** pop到指定viewController @param index 从rootVC开始向后数的index,rootVC为0 */ - (void)ax_popToViewControllerWithIndexFromRoot:(NSUInteger)index; /** pop到指定viewController @param index 从当前viewController开始向前数的index,当前VC为0 */ - (void)ax_popToViewControllerWithIndexFromSelf:(NSUInteger)index; ``` >...

releaselog

![simulator screen shot 19 may 2017 9 36 10 pm](https://cloud.githubusercontent.com/assets/16400144/26250006/331e2ba0-3cdb-11e7-8b02-6d27a6de2921.png)

ErrorCode

目前的方法是: ```objective-c self.imageView.image = [UIImage ax_imageWithColor:axColor.theme size:self.imageView.frame.size alpha:1]; ``` 每次都要输入size和alpha很麻烦。 理想的方法应该是: ```objective-c self.imageView = [UIImageView ax_imageViewWithColor:axColor.theme]; ```

enhancement
help

有时候想pop到从RootVC开始数的第二个VC怎么办?虽然实现并不复杂,但是这些可自动化的工作能封装起来用着自然舒服很多。 于是我封装了两个更灵活的pop方法: ```objective-c /** pop到指定viewController @param index 从rootVC开始向后数的index,rootVC为0 */ - (void)ax_popToViewControllerWithIndexFromRoot:(NSUInteger)index; /** pop到指定viewController @param index 从当前viewController开始向前数的index,当前VC为0 */ - (void)ax_popToViewControllerWithIndexFromSelf:(NSUInteger)index; ``` 使用示例: 我在一个view里放置了两列按钮,一列是从RootVC开始数index,另一列是反向从当前VC开始数index。 ```objective-c - (IBAction)popFromRoot:(UIButton *)sender { [self.controller.navigationController ax_popToViewControllerWithIndexFromRoot:sender.titleLabel.text.integerValue]; //...

enhancement
help

目前可以根据子视图的类来只选择某些子视图,代码如下: ```objective-c [self.topView ax_eachSubview:[UIImageView class] action:^(__kindof UIView * _Nonnull subview) { }]; ``` 计划增加一种可以根据tag值或者selected状态来选定特定类型的子视图,如: ```objective-c [self.view ax_eachSubview:[UIImageView class] tag:1 action:^(__kindof UIView * _Nonnull subview) { }]; [self.view ax_eachSubview:[UIButton class] selected:YES...

enhancement
help