
object --c
代码s贝多芬的音符
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
IOS十进制转十六进制
十进制转十六进制NSString *block_q = [NSString stringWithFormat:@"%@",[[NSString alloc] initWithFormat:@"%1x",_bleblock_index]];十六进制转十进制char *hexChar1 = [block_q cStringUsingEncoding:NSUTF8StringEncoding]; int hexNumber1; sscanf(hexChar1, "%x", &原创 2021-11-13 14:34:26 · 2596 阅读 · 0 评论 -
AFN TTP状态 412 - 前置条件失败
<!doctype html>HTTP状态 412 - 前置条件失败HTTP状态 412 - 前置条件失败类型 状态报告描述 在服务器上测试时,请求头字段中给出的一个或多个条件被评估为false。Apache Tomcat/10.0.10加上[request setCachePolicy:NSURLRequestReturnCacheDataElseLoad];NSMutableURLRequest *request = [[AFHTTPRequestSerializer seriali原创 2021-09-01 19:10:04 · 1068 阅读 · 0 评论 -
dequeueReusableCellWithIdentifier initWithStyle
static NSString *ideniferCellID = @"deviceCell"; DevicelistCell *deviceCell = [tableView dequeueReusableCellWithIdentifier:ideniferCellID];-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{ ...原创 2021-09-01 10:24:39 · 181 阅读 · 0 评论 -
iOS 不带参数返回值和带参数返回值的block
带参数 blocktypedef void (^DeviceEditorCallBlock)(NSInteger edIndex , BOOL isSelect);typedef void (^DeviceRunCallBlock)(NSInteger runIndex);NS_ASSUME_NONNULL_BEGIN@interface DeviceCtrlCell : UITableViewCell@property(nonatomic,copy)DeviceEditorCallBloc原创 2021-08-31 19:55:54 · 944 阅读 · 0 评论 -
IOS label文字换行的两种方法
方法一InsertLabel(_anyTypeView, CGRectMake( 0, 35, 50, 50), NSTextAlignmentCenter, [NSString stringWithFormat:@"%@",perName], [UIFont systemFontOfSize:15.0], kBlackColor, NO);UILabel * InsertLabel(id superView, CGRect cRect, NSTextAlignment align, NSString原创 2021-08-31 16:13:39 · 1662 阅读 · 0 评论 -
IOS设置label.attributedText 文字前面和后面颜色不一样,带: 数字需要不同颜色处理
NSMutableAttributedString *attbuttStr = [[NSMutableAttributedString alloc]initWithString:string]; NSUInteger loc = [string rangeOfString:@":"].location + 1; NSRange rang=NSMakeRange(loc, textlen); [attbuttStr addAttribute:NSForegroundColorAttri原创 2021-08-31 16:07:12 · 576 阅读 · 0 评论 -
如何判断iPhoneX/iPhoneXR/iPhoneXs/iPhoneXsMax/iphone12系列机型
CGSize cuursize=[[UIScreen mainScreen] currentMode].size; if (CGSizeEqualToSize(CGSizeMake(1125, 2436), cuursize) ) {///*当前机型是否iPhoneX或iPhoneXs*/ }else if(CGSizeEqualToSize(CGSizeMake(828, 1792), cuursize) ){/*当前机型是否iPhoneXR*/ .原创 2021-08-10 11:21:47 · 763 阅读 · 0 评论 -
OC笔记 3年前的
1 内存管理原则 只要出现new alloc retain 配对出现release kvc kvo监听属性 有人改了 它也改2 set方法 if(_xx!= xx) { _xx release; _xx = xx retain } dealloc { _ xx release }3 property参数 1 set方...原创 2016-04-06 19:48:38 · 2567 阅读 · 0 评论