2022年1月17日

FLUTTER ARCHIVE

摘要: 1 # flutter pub get 2 cd Intel-SRD-Flutter 3 flutter clean 4 flutter pub get 5 6 # build app,里面的primary是前面的target 7 flutter build ios --release 8 9 cd 阅读全文

posted @ 2022-01-17 08:33 活最好的自己 阅读(213) 评论(0) 推荐(0) 编辑

2019年1月8日

iOS 分类:按顺序添加视图

摘要: 一, 场景: 二, 分类方法代码如下: 三, 调用方式代码如下: 阅读全文

posted @ 2019-01-08 12:02 活最好的自己 阅读(615) 评论(0) 推荐(0) 编辑

2018年11月15日

iOS 获取 UILabel串的宽度

摘要: 1 /** 2 * 获取高度 3 * 4 * @param font 目标字体 5 * @param width 约束宽度 6 * 7 * @return 目标高度 8 */ 9 - (CGFloat)ptv_heightWithFont:(UIFont *)font constrainedToWidth:(CGFloat)width { 10 ... 阅读全文

posted @ 2018-11-15 17:27 活最好的自己 阅读(776) 评论(0) 推荐(0) 编辑

iOS 获取 UILabel 的宽度

摘要: 1 /** 2 * 获取高度 3 * 4 * @param font 目标字体 5 * @param width 约束宽度 6 * 7 * @return 目标高度 8 */ 9 - (CGFloat)ptv_heightWithFont:(UIFont *)font constrainedToWidth:(CGFloat)width { 10 ... 阅读全文

posted @ 2018-11-15 17:27 活最好的自己 阅读(182) 评论(0) 推荐(0) 编辑

iOS 十六进制字符串 "#FFFF00" 转换成颜色对象

摘要: 1 + (UIColor *)colorWithHexStr:(NSString *)hexString { 2 NSString *colorString = [[hexString stringByReplacingOccurrencesOfString:@"#" withString:@""] uppercaseString]; 3 CGFloat alpha, re... 阅读全文

posted @ 2018-11-15 16:57 活最好的自己 阅读(1839) 评论(0) 推荐(0) 编辑

2018年6月21日

iOS toast 的连续显示

摘要: 新的 toast 来了, 如果当前的 toast 还没有结束, 需要停止当前的延迟计时器, 重新开启一个新的计时器. 新的 toast 来了, 会因为动画地显示而闪一下, 可以根据 toast 是否显示, 来确定是否需要添加动画. 1 #pragma mark 隐藏视图 2 - (void)hideSelfViewWithDelay{ 3 [self performSelecto... 阅读全文

posted @ 2018-06-21 16:51 活最好的自己 阅读(262) 评论(0) 推荐(0) 编辑

2018年6月5日

文件管理

摘要: 1. 写入文件 阅读全文

posted @ 2018-06-05 16:03 活最好的自己 阅读(104) 评论(0) 推荐(0) 编辑

2018年4月12日

pod 常用命令

摘要: 1. 删除 pod 文件夹和 podfile.lock 文件, 在Podfile所在目录使用命令 pod install --repo-update 快速更新库文件 2. 重新安装 pod: sudo gem install cocoapods 3. 快速更新 podfile 中新加入的文件, 使用 阅读全文

posted @ 2018-04-12 11:34 活最好的自己 阅读(571) 评论(0) 推荐(0) 编辑

2018年1月18日

键盘事件

摘要: 1 - (void)buildNotification { 2 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillShowWithNotification:) name:UIKeyboardWillShowNotification object:nil]; 3 ... 阅读全文

posted @ 2018-01-18 19:06 活最好的自己 阅读(112) 评论(0) 推荐(0) 编辑

2017年10月27日

iOS 添加阴影

摘要: 1 /** 2 * 创建 label 阴影 3 */ 4 - (void)_createLabelShadow:(UILabel *)label 5 { 6 label.layer.shadowColor = [UIColor blackColor].CGColor; 7 label.layer.shadowOffset = CGSizeMake(1,1);/... 阅读全文

posted @ 2017-10-27 16:55 活最好的自己 阅读(194) 评论(0) 推荐(0) 编辑

导航