摘要:
NSString *str; // 使用stringWithFormat生成一格式化字符串 str = [NSString stringWithFormat:@"This is %@","John"]; NSLog(@"str--->%@",str); // 字符串长度length; NSLog(@"The length of this string is %@",[str length]); ... 阅读全文
摘要:
Image I/O 基础 Image I/O framework提供不透明数据类型(opaque data types),从CGImageSourceRef获取图片数据,将图片数据写入到CGImageDestinationRef。它提供一个范围很广的图片格式,包含web格式,动态图,原始相机数据。 阅读全文
摘要:
图层的几个坐标系 对于iOS来说,坐标系的(0,0)点在左上角,就是越往下,Y值越大。越往右,X值越大。 一个图层的frame,它是position,bounds,anchorPoint和transform属性的一部分。 设置一个新的frame将会相应的改变图层的position和bounds,但是 阅读全文
摘要:
// 从路径中获得完整的文件名(带后缀) exestr = [filePath lastPathComponent]; NSLog(@"%@",exestr); // 获得文件名(不带后缀) exestr = [exestr stringByDeletingPathExtension]; NSLog(@"%@",exestr); //... 阅读全文