- 博客(6)
- 资源 (26)
- 收藏
- 关注
原创 android开发怎么得到Bitmap所占资源的大小
1、首先得到Bitmap对象所占资源的大小,在新的API上提供了一个方法 bitmap.getByteCount() // from API Level 12 也就是说从SDK12才能使用这个方法,针对以前的版本还是不能使用,那么怎么办?看第二种方法2、bitmap.getRowBytes() * bitmap.getHeight() //这样也能很准确的计算出Bitmap所占内存
2013-11-28 19:23:30 6346
转载 UIImage 图片处理:截图,缩放,设定大小,存储
图片的处理大概分 截图(capture), 缩放(scale), 设定大小(resize), 存储(save)1.等比率缩放- (UIImage *)scaleImage:(UIImage *)image toScale:(float)scaleSize{UIGraphicsBeginImageContext(CGSizeMake(image.size.
2013-11-21 14:40:12 1165
原创 IOS开发UIImage中stretchableImageWithLeftCapWidth方法的解释
- (UIImage *)stretchableImageWithLeftCapWidth:(NSInteger)leftCapWidth topCapHeight:(NSInteger)topCapWidth;Creates and returns a new image object with the specified cap values.
2013-11-21 11:13:54 1935
转载 IOS开发中常见四种数据储存方式总结
在iOS开发过程中,不管是做什么应用,都会碰到数据保存的问题。将数据保存到本地,能够让程序的运行更加流畅,不会出现让人厌恶的菊花形状,使得用户体验更好。下面介绍一下数据保存的方式:1.NSKeyedArchiver:采用归档的形式来保存数据,该数据对象需要遵守NSCoding协议,并且该对象对应的类必须提供encodeWithCoder:和initWithCoder:方法。前一个方法告诉系
2013-11-20 16:55:41 1235
原创 IOS开发数据传递机制之NSNotificationCenter
NSNotificationCenter官方文档上这么解释的:An NSNotificationCenter object (or simply, notification center) provides a mechanism for broadcasting information within a program. An NSNotificationCenter object is e
2013-11-18 15:05:35 1571
FragmentDemo
2014-01-02
Android中使用JavaMail发送邮件
2013-10-25
UncaughtException不让Android应用异常退出
2013-09-04
java 字符串中文判断
2013-02-05
Activity之间跳转时的3D翻转动画
2012-12-28
上拉下拉ListView
2012-12-28
全国全部市区、部分市区城镇的经纬度的数据库
2012-10-31
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人