圖片剪裁

做項目是經(jīng)常會遇見需要對圖片進(jìn)行剪裁的情況士飒,下面來點(diǎn)干貨

#import <UIKit/UIKit.h>

@protocol PassImageDelegate <NSObject>

-(void)passImage:(UIImage *)image;

@end

@interface CutImgageVC : UIViewController
@property(nonatomic,strong) id<PassImageDelegate> delegate;
@property(nonatomic,strong) UIImage *image;
@property(nonatomic,assign) float ratioWidth;//寬
@property(nonatomic,assign) float ratioHeight;//高
@property(nonatomic,assign) float minWidth;//最小寬
@end


#import "CutImgageVC.h"

#define imgViewWigth 30
@interface CutImgageVC ()<UIGestureRecognizerDelegate>{
    float imageX;
    float imageY;
    float imageW;
    float imageH;

}
@property(nonatomic,strong) UIImageView *bgImgView;
@property(nonatomic,strong) UIView *cutView;
@property(nonatomic,strong) UIImageView *topLeftImgView;
@property(nonatomic,strong) UIImageView *topRigthImgView;
@property(nonatomic,strong) UIImageView *bottomLeftImgView;
@property(nonatomic,strong) UIImageView *bottomRigthImgView;
@end

@implementation CutImgageVC

- (void)viewDidLoad {
    [super viewDidLoad];
    
    //添加導(dǎo)航欄和完成按鈕
    
    UINavigationBar *naviBar = [[UINavigationBar alloc] initWithFrame:CGRectMake(0, 0,ScreenWidth, 64)];
    [self.view addSubview:naviBar];
    
    UINavigationItem *naviItem = [[UINavigationItem alloc] initWithTitle:@"圖片裁剪"];
    [naviBar pushNavigationItem:naviItem animated:YES];
    
    //保存按鈕
    UIBarButtonItem *doneItem = [[UIBarButtonItem alloc] initWithTitle:@"完成" style:UIBarButtonItemStylePlain target:self action:@selector(saveButton)];
    naviItem.rightBarButtonItem = doneItem;
    [self createImageView];
}



- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
-(void)saveButton{

    [self clipWithRect];
    [self dismissModalViewControllerAnimated:YES];
}

-(void)clipWithRect{
    CGRect cropFrame = self.cutView.frame;
    CGFloat orgX = (cropFrame.origin.x-imageX) * (self.image.size.width / imageW);
    CGFloat orgY = (cropFrame.origin.y-imageY) * (self.image.size.height /imageH);
    CGFloat width = cropFrame.size.width * (self.image.size.width / imageW);
    CGFloat height = width*_ratioHeight/_ratioWidth;
    CGRect cropRect = CGRectMake(orgX, orgY, width, height);
    CGImageRef imgRef = CGImageCreateWithImageInRect(self.bgImgView.image.CGImage, cropRect);
    
    CGFloat deviceScale = [UIScreen mainScreen].scale;
    UIGraphicsBeginImageContextWithOptions(cropRect.size, 0, deviceScale);
    CGContextRef context = UIGraphicsGetCurrentContext();
    CGContextTranslateCTM(context, 0, cropRect.size.height);
    CGContextScaleCTM(context, 1, -1);
    CGContextDrawImage(context, CGRectMake(0, 0, cropRect.size.width, cropRect.size.height), imgRef);
    UIImage *newImg = UIGraphicsGetImageFromCurrentImageContext();
    CGImageRelease(imgRef);
    UIGraphicsEndImageContext();
    [self.delegate passImage:newImg];
}

-(void)createImageView{
    [self.view addSubview:self.bgImgView];
    [self.view addSubview:self.cutView];
    [self.view addSubview:self.topLeftImgView];
    [self.view addSubview:self.topRigthImgView];
    [self.view addSubview:self.bottomLeftImgView];
    [self.view addSubview:self.bottomRigthImgView];
    
    //設(shè)置默認(rèn)值
    [self setDefaultInfo];
    
    self.cutView.origin=self.topLeftImgView.center;
}

-(void)setDefaultInfo{
    if (self.cutView.width<_minWidth) {
        self.cutView.width=_minWidth;
        self.cutView.height=self.cutView.width *_ratioHeight/_ratioWidth;
    }
    if (self.cutView.height<_minWidth *_ratioHeight/_ratioWidth) {
        self.cutView.height=_minWidth*_ratioHeight/_ratioWidth;
        self.cutView.width=_minWidth;
    }
    
    if (self.cutView.x<imageX) {
        self.cutView.x=imageX;
    }
    if (self.cutView.y<imageY){
        self.cutView.y=imageY;
    }
    if (self.cutView.x+self.cutView.width>imageW+imageX) {
        self.cutView.x=imageW+imageX-self.cutView.width;
        if (self.cutView.x<imageX) {
            self.cutView.x=imageX;
        }
        if (self.cutView.width>imageW) {
            self.cutView.width=imageW;
            self.cutView.height=self.cutView.width *_ratioHeight/_ratioWidth;
            
        }

       
    }
    if (self.cutView.y+self.cutView.height>imageH+imageY) {
        self.cutView.y=imageH+imageY-self.cutView.height;
        if (self.cutView.y<imageY){
            self.cutView.y=imageY;
        }
        if (self.cutView.height>imageH) {
            self.cutView.height=imageH;
            self.cutView.width=self.cutView.height *_ratioWidth/_ratioHeight;
        }
      
    }
    
    //更新4個imgView 的位置
    self.topLeftImgView.origin=CGPointMake(self.cutView.origin.x-imgViewWigth/2, self.cutView.origin.y-imgViewWigth/2);
    self.topRigthImgView.x=self.topLeftImgView.x+self.cutView.width;
    self.topRigthImgView.y=self.topLeftImgView.y;
    
    self.bottomLeftImgView.x=self.topLeftImgView.x;
    self.bottomLeftImgView.y=self.topLeftImgView.y+self.cutView.height;
    
    self.bottomRigthImgView.x= self.topRigthImgView.x;
    self.bottomRigthImgView.y= self.bottomLeftImgView.y;
    
}

-(void)updateFrameWithImgView{

}

- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
{
    // 拿到UITouch就能獲取當(dāng)前點(diǎn)
    UITouch *touch = [touches anyObject];
    if (touch.view ==self.cutView) {
        // 獲取當(dāng)前點(diǎn)
        CGPoint curP = [touch locationInView:self.cutView];
        // 獲取上一個點(diǎn)
        CGPoint preP = [touch previousLocationInView:self.cutView];
        // 獲取手指x軸偏移量
        CGFloat offsetX = curP.x - preP.x;
        // 獲取手指y軸偏移量
        CGFloat offsetY = curP.y - preP.y;
        // 移動當(dāng)前view
        self.cutView.transform = CGAffineTransformTranslate(self.cutView.transform, offsetX, offsetY);
        
        
     [self setDefaultInfo];
    }
}


- (void)handleTDTap:(UIPanGestureRecognizer *)theTDTap{
    if (theTDTap.state==UIGestureRecognizerStateChanged) {
        UIImageView *imgView=(UIImageView *)[theTDTap view];
        CGPoint point = [theTDTap locationInView:self.view];
        
        CGPoint translation = [theTDTap translationInView:theTDTap.view];
        CGFloat absX = fabs(translation.x);
        CGFloat absY = fabs(translation.y);
        // 設(shè)置滑動有效距離
        if (MAX(absX, absY) < 10)
            return;
        //根據(jù)拖動點(diǎn)的Origin和比例更新當(dāng)前框的大小
        if (absX>absY) {
            //橫滑
            NSLog(@"123");
            [self slideWithHorizontally:imgView andPoint:point];
        }else if (absX<absY){
            //豎滑
            NSLog(@"1234");
            [self slideWithVerticaly:imgView andPoint:point];
        }else{
            NSLog(@"12345");
        }
        [self setDefaultInfo];
    }
}

//橫滑判斷
-(void)slideWithHorizontally:(UIImageView *)imgView andPoint:(CGPoint)point{

    if (imgView ==self.topLeftImgView) {
        //如果為第一個點(diǎn)
        imgView.origin=point;//更新當(dāng)前imgView 的位置
        //改變第二個點(diǎn)的Y
        self.topRigthImgView.y= imgView.y;
        
        //更新self.cutView frame
        self.cutView.origin=self.topLeftImgView.center;
        self.cutView.width=self.topRigthImgView.x-self.topLeftImgView.x;
       
        self.cutView.height=self.cutView.width *_ratioHeight/_ratioWidth;
        
        //改變第三個點(diǎn)的X
        self.bottomLeftImgView.x=imgView.x;
        self.bottomLeftImgView.y= imgView.y+self.cutView.height;
        
        //第4個點(diǎn)的位置
        //            self.bottomRigthImgView.x= self.topRigthImgView.x;
        self.bottomRigthImgView.y= self.bottomLeftImgView.y;
    }else if (imgView ==self.topRigthImgView){
        //如果為第二個點(diǎn)
         imgView.origin=point;//更新當(dāng)前imgView 的位置
        //改變第一個點(diǎn)的Y
        self.topLeftImgView.y=imgView.y;
        //更新self.cutView frame
        self.cutView.origin=self.topLeftImgView.center;
        self.cutView.width=self.topRigthImgView.x-self.topLeftImgView.x;
        self.cutView.height=self.cutView.width *_ratioHeight/_ratioWidth;
        
        //第3個點(diǎn)的位置
        //            self.bottomLeftImgView.x=self.topLeftImgView.x;
        self.bottomLeftImgView.y= imgView.y+self.cutView.height;
        
        //第4個點(diǎn)的位置
        self.bottomRigthImgView.x=imgView.x;
        self.bottomRigthImgView.y= self.bottomLeftImgView.y;
    }else if (imgView ==self.bottomLeftImgView){
        //如果為第3個點(diǎn)
        imgView.origin=point;//更新當(dāng)前imgView 的位置

        //更新self.cutView frame
        
        //第4個點(diǎn)的位置
        self.bottomRigthImgView.y= imgView.y;
        
        self.cutView.width=self.bottomRigthImgView.x-self.bottomLeftImgView.x;
        self.cutView.height=self.cutView.width *_ratioHeight/_ratioWidth;
        
        //第1個點(diǎn)的位置
        self.topLeftImgView.x=imgView.x;
        self.topLeftImgView.y= imgView.y-self.cutView.height;;
        
        //第2個點(diǎn)的位置
        self.topRigthImgView.y= self.topLeftImgView.y;
        
        self.cutView.origin=self.topLeftImgView.center;
        
        
    }else if (imgView ==self.bottomRigthImgView){
        //如果為第4個點(diǎn)
        imgView.origin=point;//更新當(dāng)前imgView 的位置
        //第3個點(diǎn)的位置
        self.bottomLeftImgView.y= imgView.y;
        //更新self.cutView frame
        
        self.cutView.width=self.bottomRigthImgView.x-self.bottomLeftImgView.x;
        self.cutView.height=self.cutView.width *_ratioHeight/_ratioWidth;
        
        //第1個點(diǎn)的位置
        self.topLeftImgView.y= imgView.y-self.cutView.height;
        
        //第2個點(diǎn)的位置
        self.topRigthImgView.x=imgView.x;
        self.topRigthImgView.y= self.topLeftImgView.y;
        
        self.cutView.origin=self.topLeftImgView.center;
    }else{
        return;
    }
//    [self setDefaultInfo];
    
}

-(void)slideWithVerticaly:(UIImageView *)imgView andPoint:(CGPoint)point{
   
    if (imgView ==self.topLeftImgView) {
        //如果為第一個點(diǎn)
        imgView.origin=point;//更新當(dāng)前imgView 的位置
        //更新self.cutView frame
        self.cutView.origin=self.topLeftImgView.center;
        self.cutView.height=self.bottomLeftImgView.y-self.topLeftImgView.y;
        self.cutView.width=self.cutView.height *_ratioWidth/_ratioHeight;
        
        //改變第3個點(diǎn)
        self.bottomLeftImgView.x=imgView.x;
       
        //改變第二個點(diǎn)的Y
        self.topRigthImgView.x=imgView.x+self.cutView.width;
        self.topRigthImgView.y= imgView.y;
        
        //第4個點(diǎn)的位置
        self.bottomRigthImgView.x= self.topRigthImgView.x;
        self.bottomRigthImgView.y= self.bottomLeftImgView.y;
    }else if (imgView ==self.topRigthImgView){
        //如果為第二個點(diǎn)
         imgView.origin=point;//更新當(dāng)前imgView 的位置
        //更新self.cutView frame
        self.cutView.height=self.bottomLeftImgView.y-self.topLeftImgView.y;
        self.cutView.width=self.cutView.height *_ratioWidth/_ratioHeight;
        
        //改變第4個點(diǎn)的X
        self.bottomRigthImgView.x=imgView.x;
        
        //改變第1個點(diǎn)的X
        self.topLeftImgView.x=imgView.x-self.cutView.width;
        self.topLeftImgView.y=imgView.y;
        self.cutView.origin=self.topLeftImgView.center;
        
        //第3個點(diǎn)的位置
        self.bottomLeftImgView.x=self.topLeftImgView.x;
        self.bottomLeftImgView.y= self.bottomRigthImgView.y;
        
    }else if (imgView ==self.bottomLeftImgView){
        //如果為第3個點(diǎn)

        imgView.origin=point;//更新當(dāng)前imgView 的位置

        //更新self.cutView frame
        self.cutView.height=self.bottomLeftImgView.y-self.topLeftImgView.y;
        self.cutView.width=self.cutView.height *_ratioWidth/_ratioHeight;
        
        //第4個點(diǎn)的位置
        self.bottomRigthImgView.x= imgView.x+self.cutView.width;
        self.bottomRigthImgView.y=imgView.y;
        
        //第1個點(diǎn)的位置
        self.topLeftImgView.x=imgView.x;
        
        //第2個點(diǎn)的位置
        self.topRigthImgView.x=self.bottomRigthImgView.x;
        self.topRigthImgView.y= self.topLeftImgView.y;
        
        self.cutView.origin=self.topLeftImgView.center;
        
        
    }else if (imgView ==self.bottomRigthImgView){
        //如果為第4個點(diǎn)
        
        imgView.origin=point;//更新當(dāng)前imgView 的位置

        //更新self.cutView frame
        self.cutView.height=imgView.y-self.topLeftImgView.y;
        self.cutView.width=self.cutView.height *_ratioWidth/_ratioHeight;

        
        //第3個點(diǎn)的位置
        self.bottomLeftImgView.x= imgView.x-self.cutView.width;
        self.bottomLeftImgView.y= imgView.y;
     
        //第1個點(diǎn)的位置
        self.topLeftImgView.x= self.bottomLeftImgView.x;
        
        //第2個點(diǎn)的位置
        self.topRigthImgView.x=imgView.x;
        self.topRigthImgView.y= self.topLeftImgView.y;
        
        self.cutView.origin=self.topLeftImgView.center;
    }else{
        return;
    }
    
    
}

-(UIImageView *)bgImgView{
    if (!_bgImgView) {
        _bgImgView=[[UIImageView alloc]initWithFrame:CGRectMake(0, 64, ScreenWidth, ScreenHeight-64)];
        _bgImgView.image=_image;
        _bgImgView.contentMode=UIViewContentModeScaleAspectFit;
        if (_bgImgView.image.size.width>=_bgImgView.image.size.height) {
            imageW=ScreenWidth;
            imageH=ScreenWidth *_bgImgView.image.size.height/_bgImgView.image.size.width;
        }else{
            imageH=ScreenHeight-64;
            imageW=imageH *_bgImgView.image.size.width/_bgImgView.image.size.height;
        }
        //計算圖片X,Y
         imageX=(ScreenWidth-imageW)/2;
         imageY=(ScreenHeight-64-imageH)/2 +64;
    }
    return _bgImgView;
}

-(UIView *)cutView{
    if (!_cutView) {
        _cutView=[[UIView alloc]initWithFrame:CGRectMake((ScreenWidth-_minWidth)/2, 0, _minWidth, _minWidth*_ratioHeight/_ratioWidth)];
        _cutView.centerY= self.bgImgView.centerY;
        _cutView.backgroundColor=[UIColor clearColor];
        [Methods setBorder:_cutView andFloat:1.0 andColor:RGB(35, 198, 167)];
    }
    return _cutView;
}

-(UIImageView *)topLeftImgView{
    if (!_topLeftImgView) {
        _topLeftImgView=[[UIImageView alloc]initWithFrame:CGRectMake(55, 80, imgViewWigth, imgViewWigth)];
//        _topLeftImgView.backgroundColor=RGB(35, 198, 167);
       _topLeftImgView.image= [Methods ImageFromColor:RGB(35, 198, 167) andCGRect:CGRectMake(0, 0, 10, 10)];
        _topLeftImgView.userInteractionEnabled=YES;
        _topLeftImgView.contentMode=UIViewContentModeCenter;
        UIPanGestureRecognizer *tap=[[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(handleTDTap:)];
        tap.delegate = self;
        tap.cancelsTouchesInView = NO;
        tap.delaysTouchesEnded = NO;
        [self.topLeftImgView addGestureRecognizer:tap];
       
    }
    return _topLeftImgView;
}
-(UIImageView *)topRigthImgView{
    if (!_topRigthImgView) {
        _topRigthImgView=[[UIImageView alloc]initWithFrame:CGRectMake(55, 100, imgViewWigth, imgViewWigth)];
//        _topRigthImgView.backgroundColor=RGB(35, 198, 167);
        _topRigthImgView.image= [Methods ImageFromColor:RGB(35, 198, 167) andCGRect:CGRectMake(0, 0, 10, 10)];
        _topRigthImgView.contentMode=UIViewContentModeCenter;
        _topRigthImgView.userInteractionEnabled=YES;
        UIPanGestureRecognizer *tap=[[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(handleTDTap:)];
        tap.delegate = self;
        tap.cancelsTouchesInView = NO;
        tap.delaysTouchesEnded = NO;
        [self.topRigthImgView addGestureRecognizer:tap];
       
    }
    return _topRigthImgView;
}
-(UIImageView *)bottomLeftImgView{
    if (!_bottomLeftImgView) {
        _bottomLeftImgView=[[UIImageView alloc]initWithFrame:CGRectMake(55, 120, imgViewWigth, imgViewWigth)];
//        _bottomLeftImgView.backgroundColor=RGB(35, 198, 167);
        _bottomLeftImgView.image= [Methods ImageFromColor:RGB(35, 198, 167) andCGRect:CGRectMake(0, 0, 10, 10)];
        _bottomLeftImgView.contentMode=UIViewContentModeCenter;
        _bottomLeftImgView.userInteractionEnabled=YES;
        UIPanGestureRecognizer *tap=[[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(handleTDTap:)];
        tap.delegate = self;
        tap.cancelsTouchesInView = NO;
        tap.delaysTouchesEnded = NO;
        [self.bottomLeftImgView addGestureRecognizer:tap];
     
    }
    return _bottomLeftImgView;
}

-(UIImageView *)bottomRigthImgView{
    if (!_bottomRigthImgView) {
        _bottomRigthImgView=[[UIImageView alloc]initWithFrame:CGRectMake(55, 140, imgViewWigth, imgViewWigth)];
//        _bottomRigthImgView.backgroundColor=RGB(35, 198, 167);
        _bottomRigthImgView.image= [Methods ImageFromColor:RGB(35, 198, 167) andCGRect:CGRectMake(0, 0, 10, 10)];
        _bottomRigthImgView.contentMode=UIViewContentModeCenter;
        _bottomRigthImgView.userInteractionEnabled=YES;
        UIPanGestureRecognizer *tap=[[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(handleTDTap:)];
        tap.delegate = self;
        tap.cancelsTouchesInView = NO;
        tap.delaysTouchesEnded = NO;
        [self.bottomRigthImgView addGestureRecognizer:tap];
   
    }
    return _bottomRigthImgView;
}

- (void)viewDidAppear:(BOOL)animated
{
    [super viewDidAppear:animated];
    
    // 禁用 iOS7 返回手勢
    if ([self.navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) {
        self.navigationController.interactivePopGestureRecognizer.enabled = NO;
    }
}
-(void)viewWillDisappear:(BOOL)animated{
    [super viewWillDisappear:animated];
//    self.navigationController.navigationBar.hidden=NO;
    
    
    // 開啟
    if ([self.navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) {
        self.navigationController.interactivePopGestureRecognizer.enabled = YES;
    }
}
@end

查邢、、酵幕、

創(chuàng)建一個類扰藕,copy 你懂的,使用的時候需要添加PassImageDelegate這個代理方法芳撒,
然后在
邓深、未桥、、
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
//在這個代理方法里面我們做這樣的處理
  CutImgageVC *vc = [[CutImgageVC alloc] init];
    vc.delegate = self;
    vc.image = _picImage;//你獲取到的圖片
    vc.ratioWidth = 1.0;
    vc.ratioHeight = 1.0;
    vc.minWidth = 80.0;
    vc.view.backgroundColor = [UIColor whiteColor];
    picker.navigationBar.hidden = YES;
    [picker pushViewController:vc animated:YES];

}
//剪裁后回調(diào)的image
- (void)passImage:(UIImage *)image {
    _headImage.image = image;
    [self uploadimage];//這個是上傳圖片的方法芥备,看你們怎么處理了
}

是不是很簡單啊,end冬耿。。萌壳。亦镶。

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末,一起剝皮案震驚了整個濱河市袱瓮,隨后出現(xiàn)的幾起案子染乌,更是在濱河造成了極大的恐慌,老刑警劉巖懂讯,帶你破解...
    沈念sama閱讀 219,589評論 6 508
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件,死亡現(xiàn)場離奇詭異台颠,居然都是意外死亡褐望,警方通過查閱死者的電腦和手機(jī),發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 93,615評論 3 396
  • 文/潘曉璐 我一進(jìn)店門串前,熙熙樓的掌柜王于貴愁眉苦臉地迎上來瘫里,“玉大人,你說我怎么就攤上這事荡碾〗鞫粒” “怎么了?”我有些...
    開封第一講書人閱讀 165,933評論 0 356
  • 文/不壞的土叔 我叫張陵坛吁,是天一觀的道長劳殖。 經(jīng)常有香客問我,道長拨脉,這世上最難降的妖魔是什么哆姻? 我笑而不...
    開封第一講書人閱讀 58,976評論 1 295
  • 正文 為了忘掉前任,我火速辦了婚禮玫膀,結(jié)果婚禮上矛缨,老公的妹妹穿的比我還像新娘。我一直安慰自己帖旨,他們只是感情好箕昭,可當(dāng)我...
    茶點(diǎn)故事閱讀 67,999評論 6 393
  • 文/花漫 我一把揭開白布。 她就那樣靜靜地躺著解阅,像睡著了一般落竹。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發(fā)上瓮钥,一...
    開封第一講書人閱讀 51,775評論 1 307
  • 那天筋量,我揣著相機(jī)與錄音烹吵,去河邊找鬼。 笑死桨武,一個胖子當(dāng)著我的面吹牛肋拔,可吹牛的內(nèi)容都是我干的。 我是一名探鬼主播呀酸,決...
    沈念sama閱讀 40,474評論 3 420
  • 文/蒼蘭香墨 我猛地睜開眼凉蜂,長吁一口氣:“原來是場噩夢啊……” “哼!你這毒婦竟也來了性誉?” 一聲冷哼從身側(cè)響起窿吩,我...
    開封第一講書人閱讀 39,359評論 0 276
  • 序言:老撾萬榮一對情侶失蹤,失蹤者是張志新(化名)和其女友劉穎错览,沒想到半個月后纫雁,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體,經(jīng)...
    沈念sama閱讀 45,854評論 1 317
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡倾哺,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 38,007評論 3 338
  • 正文 我和宋清朗相戀三年轧邪,在試婚紗的時候發(fā)現(xiàn)自己被綠了。 大學(xué)時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片羞海。...
    茶點(diǎn)故事閱讀 40,146評論 1 351
  • 序言:一個原本活蹦亂跳的男人離奇死亡忌愚,死狀恐怖,靈堂內(nèi)的尸體忽然破棺而出却邓,到底是詐尸還是另有隱情硕糊,我是刑警寧澤,帶...
    沈念sama閱讀 35,826評論 5 346
  • 正文 年R本政府宣布腊徙,位于F島的核電站简十,受9級特大地震影響,放射性物質(zhì)發(fā)生泄漏昧穿。R本人自食惡果不足惜勺远,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 41,484評論 3 331
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望时鸵。 院中可真熱鬧胶逢,春花似錦、人聲如沸饰潜。這莊子的主人今日做“春日...
    開封第一講書人閱讀 32,029評論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽彭雾。三九已至碟刺,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間薯酝,已是汗流浹背半沽。 一陣腳步聲響...
    開封第一講書人閱讀 33,153評論 1 272
  • 我被黑心中介騙來泰國打工爽柒, 沒想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留,地道東北人者填。 一個月前我還...
    沈念sama閱讀 48,420評論 3 373
  • 正文 我出身青樓浩村,卻偏偏與公主長得像,于是被迫代替她去往敵國和親占哟。 傳聞我的和親對象是個殘疾皇子心墅,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 45,107評論 2 356

推薦閱讀更多精彩內(nèi)容

  • Android 自定義View的各種姿勢1 Activity的顯示之ViewRootImpl詳解 Activity...
    passiontim閱讀 172,190評論 25 707
  • 圖片處理中經(jīng)常用的圖片剪裁,就是通過剪裁框確定圖片剪裁的區(qū)域榨乎,然后剪去該區(qū)域的圖片怎燥,今天實(shí)現(xiàn)了一下,其實(shí)圖片剪裁本...
    jiangamh閱讀 743評論 0 5
  • 一蜜暑、簡介: 大家應(yīng)該知道铐姚,我們在見面上顯示的ImageView的大小和從網(wǎng)絡(luò)取到的圖片的大小是不一樣的,最好的結(jié)果...
    嘮嗑008閱讀 5,236評論 0 6
  • 這篇文章主要為大家詳細(xì)介紹了iOS實(shí)現(xiàn)裁剪框和圖片剪裁功能肛捍,具有一定的參考價值谦屑,感興趣的小伙伴們可以參考一下圖片處...
    木馬不在轉(zhuǎn)閱讀 11,514評論 9 10
  • 從事iOS開發(fā)已經(jīng)一年半有余了,發(fā)現(xiàn)整天去學(xué)這學(xué)那還不如靜下心來把會的學(xué)習(xí)牢靠酝枢。一些基礎(chǔ)的東西不好好學(xué)習(xí)會成...
    paraneaeee閱讀 720評論 0 1