description编写规范

来源:互联网 发布:长春大学教务处软件 编辑:程序博客网 时间:2024/04/30 12:46
  • 参照样式
-(NSString *)description{    NSString *blockContent_intr = _blockContent;    if(blockContent_intr.length>200){        blockContent_intr = [_blockContent substringToIndex:200];    }    return [NSString stringWithFormat:@"<%@:%p,%@>",[self class],self,@{@"blockId":@(_blockId),                                                                        @"blockType":@(_blockType),                                                                        @"blockIndex":@(_blockIndex),                                                                        @"blockStyle":_blockStyle,                                                                        @"blockContent":blockContent_intr,                                                                        @"imgPath":_imgPath,                                                                        @"blockHeight":@(_blockHeight),                                                                        @"storyId":@(_storyId)                                                                        }];}
  • 规范格式
    这里写图片描述
0 0
原创粉丝点击