Autolayout布局九宫格

Autolayout纯代码布局九宫格

单行固定间隔排列:


固定间隔
-(void)buildViews {
    NSMutableArray *array = [NSMutableArray array];
    for (NSInteger i=0; i < 4; i++) {
        UIView *subView = [UIView new];
        subView.backgroundColor = [UIColor orangeColor];
        [self.view addSubview:subView];
        
        [array addObject:subView];
    }
    
    [self vfHLayoutViews:array  withFixedSpacing:20 leadSpacing:20 tailSpacing:20];
    [self vfVLayoutViews:array  withHeight:100 topSpacing:100];
    
}

水平布局设置

- (void)vfHLayoutViews:(NSArray*)views  withFixedSpacing:(CGFloat)fixedSpace leadSpacing:(CGFloat)leadSpacing tailSpacing:(CGFloat)tailSpacing{
    UIView *lastView = nil;
    UIView *supV = nil;
    NSInteger cout = views.count;
    if (cout < 1) {
        NSAssert(cout>0,@"views to distribute need to least one");
        return;
    }
    for (int i = 0; i < cout; i++) {
        UIView *subView = views[i];
        if (subView.translatesAutoresizingMaskIntoConstraints) {
            subView.translatesAutoresizingMaskIntoConstraints = NO;
        }
    
        if (lastView) {
            if (i==cout-1) {
                [supV addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:[lastView]-fixedSpace-[subView(==lastView)]-tailSpacing-|" options:NSLayoutFormatDirectionLeadingToTrailing metrics:@{@"fixedSpace":@(fixedSpace),@"tailSpacing":@(tailSpacing)} views:@{@"lastView":lastView,@"subView":subView}]];
                
            }else{
                [supV addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:[lastView]-fixedSpace-[subView(==lastView)]" options:NSLayoutFormatDirectionLeadingToTrailing metrics:@{@"fixedSpace":@(fixedSpace)} views:@{@"lastView":lastView,@"subView":subView}]];
                
            }
            
        }else{
            supV = subView.superview;
            if (!supV) {
                NSCAssert(NO, @"no found the view of superview");
                return;
            }
            if (cout == 1) {
                [supV addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-leadSpacing-[subView]-tailSpacing-|" options:NSLayoutFormatDirectionLeadingToTrailing metrics:@{@"leadSpacing":@(leadSpacing),@"tailSpacing":@(tailSpacing)} views:@{@"subView":subView}]];
            }else{
               [supV addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-leadSpacing-[subView]" options:NSLayoutFormatDirectionLeadingToTrailing metrics:@{@"leadSpacing":@(leadSpacing)} views:@{@"subView":subView}]];
            }
            
        }
        
        lastView = subView;
    }
    
}

垂直布局设置

- (void)vfVLayoutViews:(NSArray*)views withHeight:(CGFloat)height topSpacing:(CGFloat)topSpacing{
    NSInteger cout = views.count;
    UIView *supV = nil;
    for (int i = 0; i < cout; i++) {
        UIView *subView = views[i];
        if (subView.translatesAutoresizingMaskIntoConstraints) {
            subView.translatesAutoresizingMaskIntoConstraints = NO;
        }
        if (!supV) {
            supV = subView.superview;
            if (!supV) {
                NSCAssert(NO, @"no found the view of superview");
                return;
            }
        }
        [supV addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|-top-[subView(height)]" options:NSLayoutFormatDirectionLeadingToTrailing metrics:@{@"height":@(height),@"top":@(topSpacing)} views:@{@"subView":subView}]];
    }
}

固定宽度设置:


20171114.png
-(void)buildViewsFixedWidth{
    NSMutableArray *array = [NSMutableArray array];
    for (NSInteger i=0; i < 5; i++) {
        UIView *subView = [UIView new];
        subView.backgroundColor = [UIColor colorWithHue:( arc4random() % 256 / 256.0 )
                                             saturation:( arc4random() % 128 / 256.0 ) + 0.5
                                             brightness:( arc4random() % 128 / 256.0 ) + 0.5
                                                  alpha:1];
        [self.view addSubview:subView];
        
        [array addObject:subView];
    }
    
    [self vfHLayoutViews:array  withFixedItemWidth:50 leadSpacing:20 tailSpacing:20];
    [self vfVLayoutViews:array  withHeight:100 topSpacing:100];
}

水平布局

- (void)vfHLayoutViews:(NSArray*)views  withFixedItemWidth:(CGFloat)fixedWidth leadSpacing:(CGFloat)leadSpacing tailSpacing:(CGFloat)tailSpacing{
    UIView *lastView = nil;
    UIView *supV = nil;
    NSInteger cout = views.count;
    if (cout < 1) {
        NSAssert(cout>0,@"views to distribute need to least one");
        return;
    }
    for (int i = 0; i < cout; i++) {
        UIView *subView = views[i];
        if (subView.translatesAutoresizingMaskIntoConstraints) {
            subView.translatesAutoresizingMaskIntoConstraints = NO;
        }
        if (lastView) {
            
            if (i==cout-1) {
                [supV addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:[subView(==lastView)]-tailSpacing-|" options:NSLayoutFormatDirectionLeadingToTrailing metrics:@{@"tailSpacing":@(tailSpacing)} views:@{@"lastView":lastView,@"subView":subView}]];
                
            }else{
                //
                CGFloat offset = (1-(i/((CGFloat)cout-1)))*(fixedWidth+leadSpacing)-i*tailSpacing/(((CGFloat)cout-1));
                
                [supV addConstraint:[NSLayoutConstraint constraintWithItem:subView attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:lastView attribute:NSLayoutAttributeWidth multiplier:1.0 constant:0]];
                [supV addConstraint:[NSLayoutConstraint constraintWithItem:subView attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:supV attribute:NSLayoutAttributeRight multiplier:i/((CGFloat)cout-1) constant:offset]];
                
            }
            
        }else{
            supV = subView.superview;
            if (!supV) {
                NSCAssert(NO, @"no found the view of superview");
                return;
            }
            if (cout == 1) {
                [supV addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:[subView(fixedWidth)]" options:NSLayoutFormatDirectionLeadingToTrailing metrics:@{@"fixedWidth":@(fixedWidth)} views:@{@"subView":subView}]];
                [supV addConstraint:[NSLayoutConstraint constraintWithItem:subView attribute:NSLayoutAttributeCenterX relatedBy:NSLayoutRelationEqual toItem:supV attribute:NSLayoutAttributeCenterX multiplier:1.0 constant:0]];
            }else{
                [supV addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-leadSpacing-[subView(fixedWidth)]" options:NSLayoutFormatDirectionLeadingToTrailing metrics:@{@"leadSpacing":@(leadSpacing),@"fixedWidth":@(fixedWidth)} views:@{@"subView":subView}]];
            }
        }
        
        lastView = subView;
        
    }
    
}

垂直布局和上面一样

下面开始布局有多行的九宫格:


9C7FE46A-1BFB-40DA-89FF-7B8F86C040FC.png
-(void)buildViewsCells {
    
    UIView *view = [UIView new];
    view.translatesAutoresizingMaskIntoConstraints = NO;
    view.backgroundColor = [UIColor yellowColor];
    [self.view addSubview:view];
    
    
    NSMutableArray *array = [NSMutableArray array];
    for (NSInteger i=0; i < 8; i++) {
        UILabel *subView = [UILabel new];
        subView.backgroundColor = [UIColor orangeColor];
        subView.textAlignment = NSTextAlignmentCenter;
        subView.text = [NSString stringWithFormat:@"%ld",i];
        [view addSubview:subView];
        
        [array addObject:subView];
    }
    
   [self layoutViews:array withColumns:3 hFixedSpacing:10 vFixedSpacing:20 fixedItemHeight:0 topSpacing:10 bottomSpacing:10 leadSpacing:10 tailSpacing:10];
    
    [self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-20-[view]-20-|" options:0 metrics:@{} views:@{@"view":view}]];
    [self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|-100-[view]-200-|" options:0 metrics:@{} views:@{@"view":view}]];
    
    /*
     //动态获取自适应高度
    UIView *lastView = [self layoutViews:array withColumns:3 hFixedSpacing:10 vFixedSpacing:20 fixedItemHeight:100 topSpacing:10 bottomSpacing:10 leadSpacing:10 tailSpacing:10];
    
    [self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-20-[view]-20-|" options:0 metrics:@{} views:@{@"view":view}]];
    [self.view addConstraint:[NSLayoutConstraint constraintWithItem:view attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.view attribute:NSLayoutAttributeTop multiplier:1.0 constant:100]];
    [self.view addConstraint:[NSLayoutConstraint constraintWithItem:view attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:lastView attribute:NSLayoutAttributeBottom multiplier:1.0 constant:10]];
    */
    
}

刚开始都在一个方法里做的水平和垂直布局:

//如果高度大于0,则按照固定高度布局
- (UIView *)vfLayoutViews:(NSArray*)views withColumns:(NSInteger)columnsCout hFixedSpacing:(CGFloat)hFixedSpace vFixedSpacing:(CGFloat)vFixedSpace  fixedItemHeight:(CGFloat)fixedHeight topSpacing:(CGFloat)topSpacing bottomSpacing:(CGFloat)bottomSpacing leadSpacing:(CGFloat)leadSpacing tailSpacing:(CGFloat)tailSpacing {
    UIView *lastView = nil;
    UIView *rowFristView = nil;
    UIView *supV = nil;
    NSInteger cout = views.count;
    if (cout < 1) {
        NSAssert(cout>0,@"views to distribute need to least one");
        return nil;
    }
    
    NSInteger residue = columnsCout - cout%columnsCout;
    NSMutableArray *newViews = [NSMutableArray arrayWithArray:views];
    for (int k = 0; k<residue; k++) {
        UIView *tempView = [UIView new];
        tempView.backgroundColor = [UIColor clearColor];
        [newViews addObject:tempView];
    }
    cout = newViews.count;
    NSInteger totalRows = cout/columnsCout;
    
    for (int i = 0; i < cout; i++) {
        UIView *subView = newViews[i];
        if (subView.translatesAutoresizingMaskIntoConstraints) {
            subView.translatesAutoresizingMaskIntoConstraints = NO;
        }
        NSInteger row = i/columnsCout;
        NSInteger column = i%columnsCout;
        if (lastView) {
            if (!subView.superview) {
                [supV addSubview:subView];
            }
            if (columnsCout == 1) {
                [supV addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-leadSpacing-[subView]-tailSpacing-|" options:NSLayoutFormatDirectionLeadingToTrailing metrics:@{@"leadSpacing":@(leadSpacing),@"tailSpacing":@(tailSpacing)} views:@{@"subView":subView}]];
            }else{
                if (column == columnsCout - 1) {
                    [supV addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:[lastView]-hFixedSpace-[subView(==lastView)]-tailSpacing-|" options:NSLayoutFormatDirectionLeadingToTrailing metrics:@{@"hFixedSpace":@(hFixedSpace),@"tailSpacing":@(tailSpacing)} views:@{@"lastView":lastView,@"subView":subView}]];
                    
                }else{
                    if (column == 0) {
                        [supV addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-leadSpacing-[subView]" options:NSLayoutFormatDirectionLeadingToTrailing metrics:@{@"leadSpacing":@(leadSpacing)} views:@{@"subView":subView}]];
                    }else{
                        [supV addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:[lastView]-hFixedSpace-[subView(==lastView)]" options:NSLayoutFormatDirectionLeadingToTrailing metrics:@{@"hFixedSpace":@(hFixedSpace)} views:@{@"lastView":lastView,@"subView":subView}]];
                    }
                    
                    
                }
                
            }
            
            if (column == 0) {
                if (row == totalRows - 1) {
                    if (fixedHeight > 0) {
                        [supV addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:[rowFristView]-vFixedSpace-[subView(==rowFristView)]" options:NSLayoutFormatDirectionLeadingToTrailing metrics:@{@"vFixedSpace":@(vFixedSpace)} views:@{@"subView":subView,@"rowFristView":rowFristView}]];
                    }else{
                        [supV addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:[rowFristView]-vFixedSpace-[subView(==rowFristView)]-bottomSpacing-|" options:NSLayoutFormatDirectionLeadingToTrailing metrics:@{@"vFixedSpace":@(vFixedSpace),@"bottomSpacing":@(bottomSpacing)} views:@{@"subView":subView,@"rowFristView":rowFristView}]];
                    }
                    
                }else{
                    
                    [supV addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:[rowFristView]-vFixedSpace-[subView(==rowFristView)]" options:NSLayoutFormatDirectionLeftToRight metrics:@{@"vFixedSpace":@(vFixedSpace)} views:@{@"subView":subView,@"rowFristView":rowFristView}]];
                    
                }
                rowFristView = subView;
                
            }else{
                
                [supV addConstraint:[NSLayoutConstraint constraintWithItem:subView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:lastView attribute:NSLayoutAttributeTop multiplier:1.0 constant:0]];
                [supV addConstraint:[NSLayoutConstraint constraintWithItem:subView attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:lastView attribute:NSLayoutAttributeHeight multiplier:1.0 constant:0]];
                
            }
            
            
        }else{
            supV = subView.superview;
            if (!supV) {
                NSCAssert(NO, @"no found the view of superview");
                return nil;
            }
            
            if (columnsCout == 1) {
                [supV addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-leadSpacing-[subView]-tailSpacing-|" options:NSLayoutFormatDirectionLeadingToTrailing metrics:@{@"leadSpacing":@(leadSpacing),@"tailSpacing":@(tailSpacing)} views:@{@"subView":subView}]];
            }else{
                [supV addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-leadSpacing-[subView]" options:NSLayoutFormatDirectionLeadingToTrailing metrics:@{@"leadSpacing":@(leadSpacing)} views:@{@"subView":subView}]];
            }
            
            if (fixedHeight > 0) {
                [supV addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|-topSpacing-[subView(fixedHeight)]" options:NSLayoutFormatDirectionLeadingToTrailing metrics:@{@"topSpacing":@(topSpacing),@"fixedHeight":@(fixedHeight)} views:@{@"subView":subView}]];
            }else{
                [supV addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|-topSpacing-[subView]" options:NSLayoutFormatDirectionLeadingToTrailing metrics:@{@"topSpacing":@(topSpacing)} views:@{@"subView":subView}]];
            }
            
            rowFristView = subView;
        }
        
        lastView = subView;
        
    }
    
    return lastView;
    
}

这样看起来一个方法里代码太多了,于是把水平布局和垂直布局分离开来:

- (UIView *)layoutViews:(NSArray*)views withColumns:(NSInteger)columnsCout hFixedSpacing:(CGFloat)hFixedSpace vFixedSpacing:(CGFloat)vFixedSpace  fixedItemHeight:(CGFloat)fixedHeight topSpacing:(CGFloat)topSpacing bottomSpacing:(CGFloat)bottomSpacing leadSpacing:(CGFloat)leadSpacing tailSpacing:(CGFloat)tailSpacing {
    
    NSInteger cout = views.count;
    if (cout < 1) {
        NSAssert(cout>0,@"views to distribute need to least one");
        return nil;
    }
    
    NSInteger residue = columnsCout - cout%columnsCout;
    NSMutableArray *newViews = [NSMutableArray arrayWithArray:views];
    for (int k = 0; k<residue; k++) {
        UIView *tempView = [UIView new];
        tempView.backgroundColor = [UIColor clearColor];
        [newViews addObject:tempView];
    }
    
    zj_horizontalLayout(newViews, columnsCout, leadSpacing, tailSpacing, hFixedSpace);
    zj_verticalLayout(newViews, columnsCout, fixedHeight, topSpacing, bottomSpacing, vFixedSpace);
    
    return [newViews lastObject];
    
}

水平布局方案:

static void zj_horizontalLayout(NSArray *views, NSInteger columnsCout, CGFloat leadSpacing, CGFloat tailSpacing, CGFloat hFixedSpace) {
    UIView *lastView = nil;
    UIView *supV = nil;
    
    NSInteger cout = views.count;
    
    for (int i = 0; i < cout; i++) {
        UIView *subView = views[i];
        if (subView.translatesAutoresizingMaskIntoConstraints) {
            subView.translatesAutoresizingMaskIntoConstraints = NO;
        }
        NSInteger column = i%columnsCout;
        if (lastView) {
            if (!subView.superview) {
                [supV addSubview:subView];
            }
            if (columnsCout == 1) {
                [supV addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-leadSpacing-[subView]-tailSpacing-|" options:NSLayoutFormatDirectionLeadingToTrailing metrics:@{@"leadSpacing":@(leadSpacing),@"tailSpacing":@(tailSpacing)} views:@{@"subView":subView}]];
            }else{
                if (column == columnsCout - 1) {
                    [supV addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:[lastView]-hFixedSpace-[subView(==lastView)]-tailSpacing-|" options:NSLayoutFormatDirectionLeadingToTrailing metrics:@{@"hFixedSpace":@(hFixedSpace),@"tailSpacing":@(tailSpacing)} views:@{@"lastView":lastView,@"subView":subView}]];
                    
                }else{
                    if (column == 0) {
                        [supV addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-leadSpacing-[subView]" options:NSLayoutFormatDirectionLeadingToTrailing metrics:@{@"leadSpacing":@(leadSpacing)} views:@{@"subView":subView}]];
                    }else{
                        [supV addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:[lastView]-hFixedSpace-[subView(==lastView)]" options:NSLayoutFormatDirectionLeadingToTrailing metrics:@{@"hFixedSpace":@(hFixedSpace)} views:@{@"lastView":lastView,@"subView":subView}]];
                    }
                    
                    
                }
                
            }
            
            
        }else{
            supV = subView.superview;
            if (!supV) {
                NSCAssert(NO, @"no found the view of superview");
                return ;
            }
            
            if (columnsCout == 1) {
                [supV addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-leadSpacing-[subView]-tailSpacing-|" options:NSLayoutFormatDirectionLeadingToTrailing metrics:@{@"leadSpacing":@(leadSpacing),@"tailSpacing":@(tailSpacing)} views:@{@"subView":subView}]];
            }else{
                [supV addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-leadSpacing-[subView]" options:NSLayoutFormatDirectionLeadingToTrailing metrics:@{@"leadSpacing":@(leadSpacing)} views:@{@"subView":subView}]];
            }
            
        }
        
        lastView = subView;
        
    }
}

垂直布局方案:

static void zj_verticalLayout(NSArray *views, NSInteger columnsCout,CGFloat fixedHeight,CGFloat topSpacing,CGFloat bottomSpacing,CGFloat vFixedSpace) {
    UIView *lastView = nil;
    UIView *supV = nil;
    UIView *rowFristView = nil;
    NSInteger cout = views.count;
    NSInteger totalRows = cout/columnsCout;
    
    for (int i = 0; i < cout; i++) {
        UIView *subView = views[i];
        if (subView.translatesAutoresizingMaskIntoConstraints) {
            subView.translatesAutoresizingMaskIntoConstraints = NO;
        }
        NSInteger row = i/columnsCout;
        NSInteger column = i%columnsCout;
        if (lastView) {
            if (!subView.superview) {
                [supV addSubview:subView];
            }
            
            if (column == 0) {
                if (row == totalRows - 1) {
                    if (fixedHeight > 0) {
                        [supV addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:[rowFristView]-vFixedSpace-[subView(==rowFristView)]" options:NSLayoutFormatDirectionLeadingToTrailing metrics:@{@"vFixedSpace":@(vFixedSpace)} views:@{@"subView":subView,@"rowFristView":rowFristView}]];
                    }else{
                        [supV addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:[rowFristView]-vFixedSpace-[subView(==rowFristView)]-bottomSpacing-|" options:NSLayoutFormatDirectionLeadingToTrailing metrics:@{@"vFixedSpace":@(vFixedSpace),@"bottomSpacing":@(bottomSpacing)} views:@{@"subView":subView,@"rowFristView":rowFristView}]];
                    }
                    
                }else{
                    
                    [supV addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:[rowFristView]-vFixedSpace-[subView(==rowFristView)]" options:NSLayoutFormatDirectionLeftToRight metrics:@{@"vFixedSpace":@(vFixedSpace)} views:@{@"subView":subView,@"rowFristView":rowFristView}]];
                    
                }
                rowFristView = subView;
                
            }else{
                
                [supV addConstraint:[NSLayoutConstraint constraintWithItem:subView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:lastView attribute:NSLayoutAttributeTop multiplier:1.0 constant:0]];
                [supV addConstraint:[NSLayoutConstraint constraintWithItem:subView attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:lastView attribute:NSLayoutAttributeHeight multiplier:1.0 constant:0]];
                
            }
            
            
        }else{
            supV = subView.superview;
            if (!supV) {
                NSCAssert(NO, @"no found the view of superview");
                return ;
            }
            
            if (fixedHeight > 0) {
                [supV addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|-topSpacing-[subView(fixedHeight)]" options:NSLayoutFormatDirectionLeadingToTrailing metrics:@{@"topSpacing":@(topSpacing),@"fixedHeight":@(fixedHeight)} views:@{@"subView":subView}]];
            }else{
                [supV addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|-topSpacing-[subView]" options:NSLayoutFormatDirectionLeadingToTrailing metrics:@{@"topSpacing":@(topSpacing)} views:@{@"subView":subView}]];
            }
            
            rowFristView = subView;
        }
        
        lastView = subView;
        
    }
    
}

到这里先告一段落!

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 212,294评论 6 493
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 90,493评论 3 385
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 157,790评论 0 348
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 56,595评论 1 284
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 65,718评论 6 386
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 49,906评论 1 290
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 39,053评论 3 410
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 37,797评论 0 268
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 44,250评论 1 303
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 36,570评论 2 327
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 38,711评论 1 341
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 34,388评论 4 332
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 40,018评论 3 316
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 30,796评论 0 21
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 32,023评论 1 266
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 46,461评论 2 360
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 43,595评论 2 350

推荐阅读更多精彩内容

  • 问答题47 /72 常见浏览器兼容性问题与解决方案? 参考答案 (1)浏览器兼容问题一:不同浏览器的标签默认的外补...
    _Yfling阅读 13,737评论 1 92
  • 发现 关注 消息 iOS 第三方库、插件、知名博客总结 作者大灰狼的小绵羊哥哥关注 2017.06.26 09:4...
    肇东周阅读 12,066评论 4 62
  • 转载:http://www.cocoachina.com/swift/20161201/18198.html 前言...
    F麦子阅读 4,305评论 2 8
  • 由于脚骨折了,既上不了班,也无法出去玩,所以在家发呆的时间变得尤其多。 从幼儿园开始就有了喜欢的人。小学一年级写了...
    remAmber阅读 351评论 2 1
  • 人们总是在雨中奔跑以为这样淋不到雨, 总是遮住天灵盖以为这样不会感冒。 我披着原谅色厂服缓缓的走在路中央, 几辆公...
    枫子1988阅读 200评论 4 1