xaoxuu

Results 36 issues of xaoxuu

### Fixed Bugs - [x] 修复了找不到AXKit.bundle资源的bug。

releaselog

接口: ```objective-c @interface UINavigationItem (AXExtension) /** 隐藏返回按钮的标题 */ - (void)ax_hideBackBarButtonTitle; /** 隐藏返回按钮(同时也不能右划返回) */ - (void)ax_hideBackBarButton; @end ``` 实现: ```objective-c @implementation UINavigationItem (AXExtension) /** 隐藏返回按钮的标题 */ - (void)ax_hideBackBarButtonTitle{ self.backBarButtonItem = [[UIBarButtonItem...

### 移除所有偏好设置 移除standardUserDefaults所有偏好设置 ```objective-c [NSUserDefaults ax_removeDefaultPersistentDomain]; ``` 声明: ```objective-c /** 移除默认的[NSUserDefaults standardUserDefaults]的所有配置 */ + (void)ax_removeDefaultPersistentDomain; ``` ### 获取启动图片 ```objective-c // 启动图片 UIImage *img = [NSBundle ax_appLaunchImage]; ``` 声明: ```objective-c /**...

releaselog

- [x] 完善NSUserDefaults的封装

help

### NSStringFromBool Convert a boolean value to Objective-C string. 将BOOL值转换成Objective-C字符串 ```objective-c NSString *string = NSStringFromBool(BOOL x); // x = YES, string = @"1" // x = NO, string = @"0"...

help

### 用法示例 ```objective-c // 将self.testView中所有的UILabel中的文字转换支持多语言 [self.testView ax_eachSubview:[UILabel class] action:^(__kindof UIView * _Nonnull subview) { UILabel *lb = subview; AXLocalizedLabel(lb); }]; // 将self.testView中所有的UITextField中的文字转换支持多语言 [self.local ax_eachSubview:[UITextField class] action:^(__kindof UIView * _Nonnull subview)...

enhancement
help

### 更改了一些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