摘要: 1、代码 /** 判断两个颜色是否相同 @param firstColor 第一个颜色 @param secondColor 第二个颜色 @return 两个颜色是否相同的布尔值 */ - (BOOL)firstColor:(UIColor *)firstColor secondColor:(UIC 阅读全文
posted @ 2022-11-10 17:58 CH520 阅读(56) 评论(0) 推荐(0) 编辑
摘要: 1、预知 先上图,一共创建三个工程:Lib 工程(sdkSample-lib)、Framework 工程(sdkSample-framework)和 SDK 的 Deme工程(sdkSampleDemo),如下图所示: 2、操作步骤 2.1 创建 Lib 工程 首先创建 Lib 工程, File - 阅读全文
posted @ 2022-11-10 17:58 CH520 阅读(43) 评论(0) 推荐(0) 编辑
摘要: 1、只拉伸中间的 1 * 1 的区域 // 设置的区域为不拉伸(保护)的部分,自动计算右侧和下侧保护部分的大小: // rightCapWidth = width - leftCapWidth - 1 // bottomCapHeight = height - topCapHeight - 1 im 阅读全文
posted @ 2022-11-10 17:52 CH520 阅读(116) 评论(0) 推荐(0) 编辑
摘要: // image 转 NSData NSData *data = UIImagePNGRepresentation(image1); // NSData 转 image UIImage *image = [UIImage imageWithData:data]; 阅读全文
posted @ 2022-11-10 17:52 CH520 阅读(224) 评论(0) 推荐(0) 编辑
摘要: 0、优势说明 可以获取到键盘的高度和键盘弹起和隐藏的时间。 1、多个观察者 // 添加系统通知观察者(检测键盘的显示与隐藏) // 检测键盘的弹起 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(ke 阅读全文
posted @ 2022-11-10 17:51 CH520 阅读(18) 评论(0) 推荐(0) 编辑
摘要: - (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath { cell.transform = CGAff 阅读全文
posted @ 2022-11-10 17:51 CH520 阅读(7) 评论(0) 推荐(0) 编辑
摘要: 代码 // 获取出颜色中的具体色值 - (NSArray *)rgba_Nums:(UIColor *)color { CGFloat red = 0.0; CGFloat green = 0.0; CGFloat blue = 0.0; CGFloat alpha = 0.0; [color ge 阅读全文
posted @ 2022-11-10 17:48 CH520 阅读(125) 评论(0) 推荐(0) 编辑