1.浮点类型转时间类型
float timeLength = 15.456734
NSTimeInterval timeInterval = timeLength;
NSInteger min = timeInterval / 60;
//获取秒数
NSInteger sec = (NSInteger)timeInterval % 60;
float timeLength = 15.456734
NSTimeInterval timeInterval = timeLength;
NSInteger min = timeInterval / 60;
NSInteger sec = (NSInteger)timeInterval % 60;
本文标题:iOS 一些开发中的小工具类
本文链接:https://www.haomeiwen.com/subject/ckdwyxtx.html
网友评论