- 博客(9)
- 资源 (3)
- 收藏
- 关注
转载 UIImage合成
前两个参数为两张合成的图片,第三个参数为第一张图片在第二张图片上合成的位置- (UIImage *)composeImage:(UIImage *)subImage toImage:(UIImage *)superImage atFrame:(CGRect)frame{ CGSize superSize = superImage.size; CGFloat wi
2014-01-16 11:20:42 749
原创 AudioStreamer电话时crash
crash时定位在AudioStreamer:staticvoid ASAudioSessionInterruptionListener(void *inClientData,UInt32 inInterruptionState){AudioStreamer* streamer = (AudioStreamer *)inClientData;[streamerhandl
2014-01-10 14:57:34 1047
转载 自定义AlertView(iOS7)
ios7不支持自定义UIAlertView了,所以可以自己写个View,再套上以下的动画效果先导入#import 弹出动画效果: CAKeyframeAnimation *popAnimation = [CAKeyframeAnimation animationWithKeyPath:@"transform"]; popAnimation.duration = 0.4;
2014-01-06 17:44:26 679
原创 显示系统相册中某个相簿的照片
首先导入AssetsLibrary.framework 并且加入ALAssetsLibrary+CustomPhotoAlbum.h第三方库(诸君可以去网上搜一下)1.创建相簿,并且把图片保存到相簿中 ALAssetsLibrary *assetsLibrary = [[[ALAssetsLibraryalloc] init]autorelease];
2014-01-06 16:53:31 991
转载 获取设备ID
+(NSString *)getDeviceID{ UIDevice *device = [UIDevicecurrentDevice];//创建设备对象 NSString *deviceUID = [[NSStringalloc] initWithString:[deviceuniqueIdentifier]];
2014-01-02 16:19:49 961
转载 截取UIImage大小(可以用于制作缩略图)
+(UIImage *)scaleImage:(UIImage *)image toScale:(CGSize)reSize{ float drawW = 0.0; float drawH = 0.0; CGSize size_new = image.size; NSLog(@"%f",size_n
2014-01-02 16:18:08 728
转载 UIImage的旋转
以下两种方式都是用于UIImage的旋转+(UIImage *)rotate: (UIImage *)image{ double angle = 45; CGSize s = {image.size.width, image.size.height}; UIGraphicsBeginImageContext(s); CGContextRe
2014-01-02 16:06:39 1340
转载 可以利用这种方式实现图片UIImage翻转,本人用于自拍后,对左右相反照片的处理
finishImage为需要处理的照片在这之前需定义一下:CGFloat DegreesToRadians(CGFloat degrees) {return degrees *M_PI / 180;};CGFloat RadiansToDegrees(CGFloat radians) {return radians;}; UIImageView *imgVie
2014-01-02 16:03:36 1826
转载 AVfoundation中焦距的设置(slider实现拉近拉远镜头)
首先设置一个sliderUISlider focusSlider = [[UISlideralloc]initWithFrame:CGRectMake(60,_bottomView.frame.origin.y-60,200,20)]; [focusSlideraddTarget:selfaction:@selector(AdjustFocusActi
2014-01-02 15:51:19 5796
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人