IM界面輸入框及鍵盤實現(xiàn)

上篇已經(jīng)能夠收發(fā)消息了埂奈,這篇將講解如何實現(xiàn)聊天界面的鍵盤功能嗜湃,效果圖如下

效果圖.gif

該界面分為兩個部分奈应,上部分是顯示消息流,而下部分是一個工具欄其包括語音按鈕购披、輸入框杖挣、表情按鈕更多按鈕等視圖刚陡。上部分用一個tableView就可以實現(xiàn)了惩妇,而下部分如何封裝?好我們先看工具欄結(jié)構(gòu)筐乳,細(xì)看其分為兩個部分歌殃,從上到下看;上部分為語音按鈕蝙云、輸入框氓皱、表情按鈕、更多按鈕勃刨;下部分是表情頁波材、更多頁的詳情視圖。其示意圖如下

工具欄.png

好現(xiàn)在我們就用代碼來實現(xiàn)上面的結(jié)構(gòu):

//LXChatViewController.m
@interface LXChatViewController ()<UITableViewDelegate, UITableViewDataSource, LXChatBarViewDelegate>

@property (nonatomic, strong) UITableView *tableView;
@property (nonatomic, strong) LXChatBarView *barView;
@end
@implementation LXChatViewController

#pragma mark - life cycle
- (void)viewDidLoad {
    //
    UITableView *tableView = [[UITableView alloc] initWithFrame:tbRect style:UITableViewStylePlain];
       ...
    [self.view addSubview:tableView];

    CGRect barRect = CGRectMake(inset.left, CGRectGetMaxY(tbRect), CGRectGetWidth(deviceBounds), 50 + 250 + LXGlobalDefined.safeInset.bottom);
    LXChatBarView *barView = [[LXChatBarView alloc] initWithFrame:barRect];
    barView.delegate = self;
    [self.view addSubview:barView];
    self.barView = barView;
}

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillShow:) name:UIKeyboardWillShowNotification object:nil];
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillHiden:) name:UIKeyboardWillHideNotification object:nil];
}

- (void)viewWillDisappear:(BOOL)animated {
    [super viewWillDisappear:animated];
    [[NSNotificationCenter defaultCenter] removeObserver:self];
}

#pragma mark - notification
- (void)keyboardWillShow:(NSNotification *)notification {
    //LXLog(@"show keyboard %@", notification);
    CGRect keyboardBeginFrame = [notification.userInfo[UIKeyboardFrameBeginUserInfoKey] CGRectValue];
    CGRect keyboardEndFrame = [notification.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue];
    LXLog(@"begin frame %@, end frame %@", NSStringFromCGRect(keyboardBeginFrame), NSStringFromCGRect(keyboardEndFrame));
    CGSize size = keyboardEndFrame.size;
    CGRect barFrame = self.barView.frame;
    UIEdgeInsets inset = LXGlobalDefined.safeInset;
    CGFloat distance = size.height - inset.bottom + self.barView.barHeight - 50;
    CGFloat barY = LXdeviceHeight - size.height - self.barView.barHeight;
    [UIView animateWithDuration:0.25 delay:0 options:UIViewAnimationOptionCurveEaseInOut animations:^{
        self.barView.frame = CGRectMake(barFrame.origin.x, barY, barFrame.size.width, barFrame.size.height);
        self.tableView.contentInset = UIEdgeInsetsMake(0, 0, distance + insetBottom, 0);
        if (self.list.count > 0) {
            [self scrollToListBottomWithAnimation:false needReloadList:false];
        }
    } completion:^(BOOL finished) {
        
    }];
}

- (void)keyboardWillHiden:(NSNotification *)notification {
    //LXLog(@"hiden keyboard %@", notification);
    LXBarViewShowType type = self.barView.showType;
    if (type == LXBarViewShowTypeMore || type == LXBarViewShowTypeEmoji) {
        return;
    }
    CGRect beginFrame = [notification.userInfo[UIKeyboardFrameBeginUserInfoKey] CGRectValue];
    CGRect endFrame = [notification.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue];
    LXLog(@"begin frame %@, end frame %@", NSStringFromCGRect(beginFrame), NSStringFromCGRect(endFrame));
    CGRect barFrame = self.barView.frame;
    UIEdgeInsets inset = LXGlobalDefined.safeInset;
    CGFloat barY = LXdeviceHeight - inset.bottom - self.barView.barHeight;
    
    [UIView animateWithDuration:0.25 animations:^{
        self.barView.frame = CGRectMake(barFrame.origin.x, barY, barFrame.size.width, barFrame.size.height);
        self.tableView.contentInset = UIEdgeInsetsMake(0, 0, insetBottom + self.barView.barHeight - 50, 0);
    }];
}

#pragma mark - UIScrollViewDelegate
- (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView {
    //UIKeyboardWillHideNotification
    if (self.barView.showType == LXBarViewShowTypeText) {
        [self.view endEditing:true];
    } else if (self.barView.showType == LXBarViewShowTypeMore) {
        CGSize size = self.barView.moreView.frame.size;
        [self hidenKeyboardSize:size];
    } else if (self.barView.showType == LXBarViewShowTypeEmoji) {
        CGSize size = self.barView.emojiView.frame.size;
        [self hidenKeyboardSize:size];
    } else if (self.barView.showType == LXBarViewShowTypeAudio) {
        return;
    }
    self.barView.showType = LXBarViewShowTypeNone;
}

- (void)hidenKeyboardSize:(CGSize)size {
    CGRect barFrame = self.barView.frame;
    UIEdgeInsets inset = LXGlobalDefined.safeInset;
    CGFloat barY = LXdeviceHeight - self.barView.barHeight - inset.bottom;
    [UIView animateWithDuration:0.25 delay:0 options:UIViewAnimationOptionCurveEaseInOut animations:^{
        self.barView.frame = CGRectMake(barFrame.origin.x, barY, CGRectGetWidth(barFrame), CGRectGetHeight(barFrame));
        self.tableView.contentInset = UIEdgeInsetsMake(0, 0, insetBottom + self.barView.barHeight - 50, 0);
    } completion:^(BOOL finished) {
        self.barView.emojiView.hidden = true;
        self.barView.moreView.hidden = true;
    }];
}

#pragma mark - LXChatBarViewDelegate
- (void)barView:(LXChatBarView *)barView willShowKeyboard:(LXBarViewShowType)type size:(CGSize)size {
    CGRect barFrame = self.barView.frame;
    UIEdgeInsets inset = LXGlobalDefined.safeInset;
    CGFloat distance = size.height + barView.barHeight - 50;
    CGFloat barY = LXdeviceHeight - size.height - barView.barHeight - inset.bottom;
    [UIView animateWithDuration:0.25 delay:0 options:UIViewAnimationOptionCurveEaseInOut animations:^{
        self.barView.frame = CGRectMake(barFrame.origin.x, barY, barFrame.size.width, barFrame.size.height);
        self.tableView.contentInset = UIEdgeInsetsMake(0, 0, distance + insetBottom, 0);
        if (self.list.count > 0) {
            [self scrollToListBottomWithAnimation:false needReloadList:false];
        }
    } completion:^(BOOL finished) {
        
    }];
}

- (void)barView:(LXChatBarView *)barView willHidenKeyboard:(LXBarViewShowType)type size:(CGSize)size {
    CGRect barFrame = self.barView.frame;
    UIEdgeInsets inset = LXGlobalDefined.safeInset;
    CGFloat barY = LXdeviceHeight - barView.barHeight - inset.bottom;
    [UIView animateWithDuration:0.25 delay:0 options:UIViewAnimationOptionCurveEaseInOut animations:^{
        self.barView.frame = CGRectMake(barFrame.origin.x, barY, CGRectGetWidth(barFrame), CGRectGetHeight(barFrame));
        self.tableView.contentInset = UIEdgeInsetsMake(0, 0, insetBottom, 0);
    } completion:^(BOOL finished) {
        self.barView.emojiView.hidden = true;
        self.barView.moreView.hidden = true;
    }];
}

- (void)barView:(LXChatBarView *)barView barHeightWillChange:(CGFloat)height {
    UIEdgeInsets inset = self.tableView.contentInset;
    [UIView animateWithDuration:0.25 delay:0 options:UIViewAnimationOptionCurveEaseInOut animations:^{
        self.tableView.contentInset = UIEdgeInsetsMake(0, 0, inset.bottom - height, 0);
        if (self.list.count > 0) {
            NSIndexPath *indexPath = [NSIndexPath indexPathForRow:self.list.count - 1 inSection:0];
            [self.tableView scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionBottom animated:false];
        }
    } completion:^(BOOL finished) {
        
    }];
}

消息流界面中關(guān)鍵代碼是在ControllerviewWillAppear注冊通知身隐,在viewWillDisappear移除通知廷区,顯示鍵盤和隱藏鍵盤時tableView動畫其實是修改它的contentInset來實現(xiàn);然后再設(shè)置了bar的delegate贾铝。再看工具欄的關(guān)鍵代碼具體實現(xiàn)

#pragma mark - event
- (void)setTextViewIfneed {
    if (self.text) {
        self.textView.text = self.text;
    }
}
- (void)tapEmoji:(UIButton *)button {
    [self setTextViewIfneed];
    if (self.showType == LXBarViewShowTypeMore) {
        // 隱藏more鍵盤
        self.moreView.hidden = true;
        // 顯示emoji鍵盤
        [self showEmoji:true];
        return;
    }
    if (self.showType == LXBarViewShowTypeEmoji) {
        // 顯示系統(tǒng)鍵盤
        [self.textView becomeFirstResponder];
        return;
    }
    if (self.showType == LXBarViewShowTypeAudio) {
        //
        
        // 顯示emoji鍵盤
        [self showEmoji:false];
        return;
    }
    if (self.showType == LXBarViewShowTypeText) {
        self.showType = LXBarViewShowTypeEmoji;
        // 隱藏系統(tǒng)鍵盤
        [self.textView resignFirstResponder];
    }
    // 顯示emoji鍵盤
    [self showEmoji:false];
}

- (void)showEmoji:(BOOL)animated {
    self.emojiView.hidden = false;
    self.moreView.hidden = true;
    CGSize size = self.emojiView.frame.size;
    if ([self.delegate respondsToSelector:@selector(barView:willShowKeyboard:size:)]) {
        [self.delegate barView:self willShowKeyboard:LXBarViewShowTypeEmoji size:size];
    }
    self.showType = LXBarViewShowTypeEmoji;
    [self.emojiBtn setImage:[UIImage imageNamed:@"keyboard"] forState:UIControlStateNormal];
    if (animated) {
        CGRect frame = self.emojiView.frame;
        CGRect begin = CGRectMake(CGRectGetMinX(frame), CGRectGetHeight(frame), CGRectGetWidth(frame), CGRectGetHeight(frame));
        self.emojiView.frame = begin;
        [UIView animateWithDuration:0.25 delay:0 options:UIViewAnimationOptionCurveEaseInOut animations:^{
            self.emojiView.frame = frame;
        } completion:^(BOOL finished) {
            
        }];
    }
}

- (void)reEmojiInit {
    [self.emojiBtn setImage:[UIImage imageNamed:@"emoji"] forState:UIControlStateNormal];
}

- (void)tapMore:(UIButton *)button {
    [self setTextViewIfneed];
    if (self.showType == LXBarViewShowTypeMore) {
        // 顯示系統(tǒng)鍵盤
        [self.textView becomeFirstResponder];
        return;
    }
    if (self.showType == LXBarViewShowTypeAudio) {
        // 隱藏語音相關(guān)
        
        // 彈起more鍵盤
        [self showMore:false];
        return;
    }
    if (self.showType == LXBarViewShowTypeEmoji) {
        // 隱藏emoji鍵盤
        self.emojiView.hidden = true;
        // 彈起more鍵盤
        [self showMore:true];
        return;
    }
    if (self.showType == LXBarViewShowTypeText) {
        self.showType = LXBarViewShowTypeMore;
        // 隱藏系統(tǒng)鍵盤
        [self.textView resignFirstResponder];
    }
    // 彈起more鍵盤
    [self showMore:false];
}

- (void)showMore:(BOOL)animated {
    self.moreView.hidden = false;
    self.emojiView.hidden = true;
    if ([self.delegate respondsToSelector:@selector(barView:willShowKeyboard:size:)]) {
        CGSize size = self.moreView.bounds.size;
        [self.delegate barView:self willShowKeyboard:LXBarViewShowTypeMore size:size];
    }
    self.showType = LXBarViewShowTypeMore;
    if (animated) {
        CGRect frame = self.moreView.frame;
        CGRect begin = CGRectMake(CGRectGetMinX(frame), CGRectGetHeight(frame), CGRectGetWidth(frame), CGRectGetHeight(frame));
        self.moreView.frame = begin;
        [UIView animateWithDuration:0.25 delay:0 options:UIViewAnimationOptionCurveEaseInOut animations:^{
            self.moreView.frame = frame;
        } completion:^(BOOL finished) {
            
        }];
    }
}

- (void)tapAudio:(UIButton *)button {
    if (self.showType == LXBarViewShowTypeAudio) {
        // 顯示系統(tǒng)鍵盤
        self.textView.text = self.text;
        [self.textView becomeFirstResponder];
        return;
    }
    self.textView.text = nil;
    if (self.showType == LXBarViewShowTypeEmoji || self.showType == LXBarViewShowTypeMore) {
        // 獲取size
        CGSize size = self.showType == LXBarViewShowTypeEmoji? self.emojiView.frame.size: self.moreView.frame.size;
        // 隱藏
        if ([self.delegate respondsToSelector:@selector(barView:willHidenKeyboard:size:)]) {
            [self.delegate barView:self willHidenKeyboard:self.showType size:size];
        }
        [self showAudio];
        return;
    }
    [self showAudio];
    [self.textView resignFirstResponder];
}

- (void)showAudio {
    self.showType = LXBarViewShowTypeAudio;
    //
    [self.audioBtn setImage:[UIImage imageNamed:@"keyboard"] forState:UIControlStateNormal];
    //
    self.placeLabel.hidden = false;
    self.placeLabel.text = LXAudioPressTalk;
}

- (void)reAudioInit {
    //
    [self.audioBtn setImage:[UIImage imageNamed:@"audio"] forState:UIControlStateNormal];
    //
    self.placeLabel.hidden = true;
}

- (void)pressAudio:(UILongPressGestureRecognizer *)gesture {
    UIGestureRecognizerState state = gesture.state;
    CGPoint point = CGPointZero;
    switch (state) {
        case UIGestureRecognizerStateBegan: {
            LXLog(@"begin press");
            break;
            }
        case UIGestureRecognizerStateChanged: {
            //LXLog(@"changed");
            CGPoint temp = [gesture locationInView:self];
            LXLog(@"point = %@", NSStringFromCGPoint(temp));
            point = temp;
            break;
            }
        case UIGestureRecognizerStateCancelled: {
            LXLog(@"cancelled");
            break;
            }
        case UIGestureRecognizerStateFailed: {
            LXLog(@"failed");
            break;
            }
        case UIGestureRecognizerStateEnded: {
            LXLog(@"ended");
            break;
            }
        default:
            break;
    }
    [self showAudioTipViewBy:state pressPoint:point];
}

- (void)showAudioTipViewBy:(UIGestureRecognizerState)state pressPoint:(CGPoint)point {
    if (state == UIGestureRecognizerStateBegan) {
        self.recoderState = LXAudioRecoderStateBegin;
        self.placeLabel.text = LXAudioOutEnd;
        [self.audioRecoder record];
        if ([self.audioTipView superview]) {
            return;
        }
        CGRect dBounds = [UIScreen mainScreen].bounds;
        CGFloat wh = 120.0;
        CGFloat x = (CGRectGetWidth(dBounds) - wh) / 2;
        CGFloat y = (CGRectGetHeight(dBounds) - wh) / 2;
        self.audioTipView.frame = CGRectMake(x, y, wh, wh);
        self.audioTipView.image = [UIImage imageNamed:@"pressAudio"];
        [[UIApplication sharedApplication].keyWindow addSubview:self.audioTipView];
    } else if (state == UIGestureRecognizerStateChanged) {
        
        if (point.y < 0 || point.y > self.frame.size.height) {
            // 顯示取消
            self.placeLabel.text = LXAudioOutCancel;
            self.audioTipView.image = [UIImage imageNamed:@"cancelAudio"];
            self.recoderState = LXAudioRecoderStateWillCancel;
        } else {
            // 顯示結(jié)束
            self.placeLabel.text = LXAudioOutEnd;
            self.audioTipView.image = [UIImage imageNamed:@"pressAudio"];
            self.recoderState = LXAudioRecoderStateWillEnd;
        }
    } else if (state == UIGestureRecognizerStateEnded) {
        [self.audioTipView removeFromSuperview];
        self.placeLabel.text = LXAudioPressTalk;
        [self.audioRecoder stop];
    }
}
#pragma mark - getter/setter
- (void)setShowType:(LXBarViewShowType)showType {
    _showType = showType;
    if (showType == LXBarViewShowTypeAudio) {
        [self reEmojiInit];
    } else if (showType == LXBarViewShowTypeEmoji) {
        [self reAudioInit];
    } else {
        [self reEmojiInit];
        [self reAudioInit];
    }
}

到此工具欄上的語音隙轻、表情、更多按鈕的事件處理已經(jīng)完成忌傻;看效果圖輸入框是隨著輸入的字符其高度也會發(fā)生變化大脉,因此需要自定義一個UITextView搞监,并且需要將其高度變化的回調(diào)傳到外部水孩。

// LXTextView.h
typedef void(^LXTextViewHeightChange)(CGFloat height);
@interface LXTextView : UITextView

@property (nonatomic, assign) CGFloat maxHeight;
@property (nonatomic, copy) LXTextViewHeightChange heightChangeCallback;
@end

// LXTextView.m
static void *LXContentSizeContext = &LXContentSizeContext;
@interface LXTextView ()

@property (nonatomic, assign) CGFloat originHeight;
@property (nonatomic, assign) UIEdgeInsets inset;
@end
@implementation LXTextView

- (instancetype)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        self.layer.borderColor = UIColor.lightGrayColor.CGColor;
        self.layer.borderWidth = 1.0;
        self.maxHeight = 90;
        self.originHeight = CGRectGetHeight(frame);
        self.autocapitalizationType = UITextAutocapitalizationTypeNone;
        self.autocorrectionType = UITextAutocorrectionTypeNo;
        self.enablesReturnKeyAutomatically = true;
        self.layoutManager.allowsNonContiguousLayout = false;
        self.font = [UIFont systemFontOfSize:14.0];
        [self addObserver:self forKeyPath:@"contentSize" options:(NSKeyValueObservingOptionNew | NSKeyValueObservingOptionOld) context:LXContentSizeContext];
    }
    return self;
}

- (instancetype)init {
    return [self initWithFrame:CGRectZero];
}

- (void)dealloc {
    [self removeObserver:self forKeyPath:@"contentSize"];
}

- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary<NSKeyValueChangeKey,id> *)change context:(void *)context {
    if ([keyPath isEqualToString:@"contentSize"]) {
        LXLog(@"%@", change);
        CGSize newSize = [change[@"new"] CGSizeValue];
        CGSize oldSize = [change[@"old"] CGSizeValue];
        if (newSize.height != oldSize.height) {
            //
            LXLog(@"高度變化");
            CGFloat height = newSize.height > self.originHeight? newSize.height: self.originHeight;
            height = height < self.maxHeight? height: self.maxHeight;
            if (self.heightChangeCallback) {
                self.heightChangeCallback(height);
                //[self scrollRangeToVisible:NSMakeRange(self.text.length, 1)];
                dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
                    CGRect visible = CGRectMake(0, self.contentSize.height - 15, self.contentSize.width, 15);
                    [self scrollRectToVisible:visible animated:false];
                });
            }
        }
    }
}
@end

textView高度變化其實是監(jiān)聽其contentSize的變化而做出具體的改變,另外scrollRectToVisible:animated:滾動到底部如果不延遲執(zhí)行不起作用琐驴,具體是什么原因筆者也不知道俘种,如有知悉者還請告知,甚是感謝绝淡。到此工具欄上部分的功能基本已經(jīng)實現(xiàn)宙刘,接下來是實現(xiàn)表情更多的詳情頁牢酵。
表情的詳情頁其實是由一個UICollectionView悬包、UIPageControl底部視圖構(gòu)成馍乙,其中需要自定義UICollectionViewlayout布近,如何實現(xiàn)這個layout呢垫释?請看具體代碼

//  LXEmojiLayout.h
@interface LXEmojiLayout : UICollectionViewLayout

@property (nonatomic, assign) UIEdgeInsets sectionInset;
@property (nonatomic, assign) CGSize itemSize;
@property (nonatomic, assign) CGFloat linePadding;
@property (nonatomic, assign) CGFloat itemPadding;
@end

// LXEmojiLayout.m
@interface LXEmojiLayout ()

@property (nonatomic, assign) CGFloat totalWidth;
@property (nonatomic, strong) NSMutableArray *attrsArr;
@end
@implementation LXEmojiLayout

- (void)prepareLayout {
    [super prepareLayout];
    
    self.totalWidth = 0;
    NSMutableArray *attributesArr = [NSMutableArray array];
    NSInteger sectionCount = [self.collectionView numberOfSections];
    for (int i = 0; i < sectionCount; i++) {
        NSInteger itemCount = [self.collectionView numberOfItemsInSection:i];
        for (int j = 0; j < itemCount; j++) {
            NSIndexPath *indexPath = [NSIndexPath indexPathForItem:j inSection:i];
            UICollectionViewLayoutAttributes *attrs = [self layoutAttributesForItemAtIndexPath:indexPath];
            [attributesArr addObject:attrs];
        }
    }
    self.attrsArr = attributesArr;
}

//
- (CGSize)collectionViewContentSize {
    NSInteger sectionCount = [self.collectionView numberOfSections];
    CGFloat pageWidth = self.collectionView.bounds.size.width;
    return CGSizeMake(sectionCount * pageWidth, self.collectionView.bounds.size.height);
}

-(NSArray<UICollectionViewLayoutAttributes *> *)layoutAttributesForElementsInRect:(CGRect)rect {
    return self.attrsArr;
}

- (UICollectionViewLayoutAttributes *)layoutAttributesForItemAtIndexPath:(NSIndexPath *)indexPath {
    UICollectionViewLayoutAttributes *layoutAttributes = [UICollectionViewLayoutAttributes layoutAttributesForCellWithIndexPath:indexPath];
    CGFloat pageWidth = self.collectionView.bounds.size.width;
    CGSize itemSize = self.itemSize;
    CGFloat lPadding = self.linePadding;
    CGFloat hPadding = self.itemPadding;
    NSInteger index = indexPath.row % 8;
    NSInteger line = indexPath.row / 8;
    CGFloat x = indexPath.section * pageWidth + self.sectionInset.left + index * (itemSize.width + hPadding);
    CGFloat y = self.sectionInset.top + line * (itemSize.height + lPadding);
    layoutAttributes.frame = CGRectMake(x, y, itemSize.width, itemSize.height);
    return layoutAttributes;
}
@end

從代碼上看LXEmojiLayout是繼承UICollectionViewLayout,并重寫了以下方法

// 初始化撑瞧,在這里我們保存了cell的布局屬性
- (void)prepareLayout; 
// 返回collectionView的contentSize
- (CGSize)collectionViewContentSize;         
// 返回rect內(nèi)所有的cell的布局屬性
-(NSArray<UICollectionViewLayoutAttributes *> *)layoutAttributesForElementsInRect:(CGRect)rect;
// 返回某個indexPath下的cell的布局屬性棵譬,在這里我們改了其frame
- (UICollectionViewLayoutAttributes *)layoutAttributesForItemAtIndexPath:(NSIndexPath *)indexPath;
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末,一起剝皮案震驚了整個濱河市预伺,隨后出現(xiàn)的幾起案子订咸,更是在濱河造成了極大的恐慌,老刑警劉巖酬诀,帶你破解...
    沈念sama閱讀 211,376評論 6 491
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件脏嚷,死亡現(xiàn)場離奇詭異,居然都是意外死亡瞒御,警方通過查閱死者的電腦和手機然眼,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 90,126評論 2 385
  • 文/潘曉璐 我一進店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來葵腹,“玉大人高每,你說我怎么就攤上這事〖纾” “怎么了鲸匿?”我有些...
    開封第一講書人閱讀 156,966評論 0 347
  • 文/不壞的土叔 我叫張陵,是天一觀的道長阻肩。 經(jīng)常有香客問我带欢,道長,這世上最難降的妖魔是什么烤惊? 我笑而不...
    開封第一講書人閱讀 56,432評論 1 283
  • 正文 為了忘掉前任乔煞,我火速辦了婚禮,結(jié)果婚禮上柒室,老公的妹妹穿的比我還像新娘渡贾。我一直安慰自己,他們只是感情好雄右,可當(dāng)我...
    茶點故事閱讀 65,519評論 6 385
  • 文/花漫 我一把揭開白布空骚。 她就那樣靜靜地躺著,像睡著了一般擂仍。 火紅的嫁衣襯著肌膚如雪囤屹。 梳的紋絲不亂的頭發(fā)上,一...
    開封第一講書人閱讀 49,792評論 1 290
  • 那天逢渔,我揣著相機與錄音肋坚,去河邊找鬼。 笑死,一個胖子當(dāng)著我的面吹牛智厌,可吹牛的內(nèi)容都是我干的粟判。 我是一名探鬼主播,決...
    沈念sama閱讀 38,933評論 3 406
  • 文/蒼蘭香墨 我猛地睜開眼峦剔,長吁一口氣:“原來是場噩夢啊……” “哼档礁!你這毒婦竟也來了?” 一聲冷哼從身側(cè)響起吝沫,我...
    開封第一講書人閱讀 37,701評論 0 266
  • 序言:老撾萬榮一對情侶失蹤呻澜,失蹤者是張志新(化名)和其女友劉穎,沒想到半個月后惨险,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體羹幸,經(jīng)...
    沈念sama閱讀 44,143評論 1 303
  • 正文 獨居荒郊野嶺守林人離奇死亡,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點故事閱讀 36,488評論 2 327
  • 正文 我和宋清朗相戀三年辫愉,在試婚紗的時候發(fā)現(xiàn)自己被綠了栅受。 大學(xué)時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片。...
    茶點故事閱讀 38,626評論 1 340
  • 序言:一個原本活蹦亂跳的男人離奇死亡恭朗,死狀恐怖屏镊,靈堂內(nèi)的尸體忽然破棺而出,到底是詐尸還是另有隱情痰腮,我是刑警寧澤而芥,帶...
    沈念sama閱讀 34,292評論 4 329
  • 正文 年R本政府宣布,位于F島的核電站膀值,受9級特大地震影響棍丐,放射性物質(zhì)發(fā)生泄漏。R本人自食惡果不足惜沧踏,卻給世界環(huán)境...
    茶點故事閱讀 39,896評論 3 313
  • 文/蒙蒙 一歌逢、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧翘狱,春花似錦秘案、人聲如沸。這莊子的主人今日做“春日...
    開封第一講書人閱讀 30,742評論 0 21
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽。三九已至历等,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間辟癌,已是汗流浹背寒屯。 一陣腳步聲響...
    開封第一講書人閱讀 31,977評論 1 265
  • 我被黑心中介騙來泰國打工, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留,地道東北人寡夹。 一個月前我還...
    沈念sama閱讀 46,324評論 2 360
  • 正文 我出身青樓处面,卻偏偏與公主長得像,于是被迫代替她去往敵國和親菩掏。 傳聞我的和親對象是個殘疾皇子魂角,可洞房花燭夜當(dāng)晚...
    茶點故事閱讀 43,494評論 2 348