开发随记

记录工作、生活


  • Home

  • Archives

EAN码知识及校验位的计算

Posted on 2018-12-05 | Edited on 2018-12-06 | In iOS |

国际商品编码(International Article Number),即欧洲商品编码(European Article Number, EAN),原来只是欧洲范围内商品,而现在已是全球范围内产品交易的商品代码。为了适应读码器辨认的需要,这些代码又被做成大家熟知的条形码。EAN码又分EAN-13码和EAN-8码,EAN-13码是为普通商品设置,而EAN-8是专门为小商品设置的。

Read more »

一个简单的播放器实现

Posted on 2018-11-29 | Edited on 2018-12-04 | In iOS |

最近有个简单播放器的需求需要实现,公司其他项目本身已有播放器实现但是业务逻辑不满足现有需求,所以参照原有模块并结合相关资料自己实现了一个简单播放器,该播放器是基于AVPlayer实现的。

Read more »

「 转载 」利用gcd信号量将异步方法改造为同步方法

Posted on 2018-11-23 | Edited on 2018-12-06 | In iOS , 转载 |

异步方法改为同步方法,转自#iOS知识小集#

Read more »

iOS 使用第三方字体

Posted on 2018-11-21 | In iOS |

最近做项目有要求使用第三方字体的功能,查了些资料,完成需求后便整理记录一下。

Read more »

iOS 正则表达式的运用

Posted on 2018-10-26 | Edited on 2018-11-12 | In iOS |

开发随记,方便自己查阅。

运用正则表达式进行纯中文数字校验。

Read more »

iOS资料整理(8月)

Posted on 2018-08-16 | Edited on 2018-11-12 | In iOS |

最近一段时间,蓝牙打印机项目中搜集到的一些资料(不仅限于蓝牙打印机)。

Read more »

利用 Class-dump 反编译第三方ipa

Posted on 2018-07-03 | Edited on 2018-07-04 | In iOS |

Class-dump

一款命令行应用程序,可以反编译出第三方ipa包的类、分类、协议。可以用来学习一些优秀app的设计和实现方式等。

Read more »

资料整理集合

Posted on 2018-06-28 | Edited on 2018-07-07 | In 资料 |

一些可能会用到的资料整理集合

Read more »

关于夜间模式功能实践的一次记录

Posted on 2018-06-26 | In iOS |

前言

最近完成app小版本迭代,在论坛看见某个求职贴写着熟练使用Method Swizzling技能,想起15年有阵各种关于iOS黑科技技术贴满天飞,自己也看了些,但是好像实际开发中也确实用的很少(可能确实比较菜🤣)。于是趁着这阵不忙实践一下,第一个就想到夜间模式这个功能用Method Swizzling实现比较合适,相信也是很多开发者第一选择吧,写了个简单demo后发现确实省事儿。

效果图

动图

image

Read more »

iOS 开发笔记(三)

Posted on 2018-06-12 | Edited on 2018-07-04 | In iOS |

UITableViewCell 左滑删除功能

开启编辑模式

1
2
3
- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
return YES;
}

事件类型

1
2
3
- (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath{
return UITableViewCellEditingStyleDelete;
}

删除按钮标题

UITableViewCellEditingStyleDelete默认就是删除,可以不用实现该方法

1
2
3
4
- (NSString *)tableView:(UITableView *)tableView titleForDeleteConfirmationButtonForRowAtIndexPath:(NSIndexPath *)indexPath
{
return @"删除";
}

事件提交

1
2
3
4
5
6
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath{
[self fy_showTitle:@"是否删除" message:nil confirmHandler:^{
AylaShare *share = _shares[indexPath.row];
[self deleteShare:share];
} cancelHandler:nil];
}
Read more »
123

Tong

23 posts
7 categories
17 tags
RSS
© 2018 Tong
Powered by Hexo v3.7.1
|
Theme — NexT.Muse v6.2.0