swift 自定义提示框

你可以直接下载源码:demo下载地址

Simulator Screen Shot 2016年8月17日 上午11.25.02.png

核心代码如下:

//
//  WWCustomAlertView.swift
//  WWCustomAlertView
//
//  Created by wuwei on 16/8/10.
//  Copyright © 2016年 wuwei. All rights reserved.
//

import UIKit

//扩展
extension UIView {
    
    func bottom() -> CGFloat {
        return self.frame.origin.y + self.frame.size.height
    }
    
    func right() -> CGFloat {
        return self.frame.origin.x + self.frame.size.width;
    }
}

//代理
protocol WWCustomAlertViewDelegate {
    //required
    func customIOS7dialogButtonTouchUpInside(alertView:AnyObject,clickedButtonAtIndex buttonIndex:Int);
}

//弹出窗
private var customAlertView:WWCustomAlertView?

class WWCustomAlertView: UIView {
    
    private final let kCustomIOSAlertViewDefaultButtonHeight:CGFloat = 40
    private final let kCustomIOSAlertViewDefaultButtonSpacerHeight:CGFloat = 1
    private final let kCustomIOSAlertViewCornerRadius:CGFloat = 7
    private final let kCustomIOS7MotionEffectExtent:CGFloat = 10.0
    
    //
    var parentView:UIView?     // The parent view this 'dialog' is attached to
    var dialogView:UIView?     // Dialog's container view
    var containerView:UIView?  // Container within the dialog (place your ui elements here)
    
    var alertDelegate:WWCustomAlertViewDelegate?
    var buttonTitles:Array<String>?
    var buttonImages:Array<String>?
    var useMotionEffects = false
    
    private var buttonHeight:CGFloat = 0
    private var buttonSpacerHeight:CGFloat = 0
    
    //初始化
    func initSharedWithFrame(frame: CGRect) -> WWCustomAlertView {
        if customAlertView == nil {
            customAlertView = WWCustomAlertView.init(frame: frame)
            customAlertView!.hidden = false
            customAlertView!.backgroundColor = UIColor.clearColor();
            useMotionEffects = false
        }
        
        UIDevice.currentDevice().beginGeneratingDeviceOrientationNotifications();
        
        NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(deviceOrientationDidChange(_:)), name: UIDeviceOrientationDidChangeNotification, object: nil)
        NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(keyboardWillShow(_:)), name: UIKeyboardWillShowNotification, object: nil)
        NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(keyboardWillHide(_:)), name: UIKeyboardWillHideNotification, object: nil)
        
        return customAlertView!
    }
    
   // 创建dialog view, 并且用动画打开
    func show() {
        dialogView = self.createContainerView()
        dialogView!.layer.shouldRasterize = true
        dialogView!.layer.rasterizationScale = UIScreen.mainScreen().scale
        self.layer.shouldRasterize = true
        self.layer.rasterizationScale = UIScreen.mainScreen().scale
        
        if Int(UIDevice.currentDevice().systemVersion) > 7 {
            if useMotionEffects {
                self.applyMotionEffects()
            }
        }
        
        self.backgroundColor = UIColor(red:0, green:0 ,blue:0 ,alpha:0)
        self.addSubview(dialogView!)
        
        // Can be attached to a view or to the top most window
        // Attached to a view:
        if (parentView != nil) {
            parentView?.addSubview(self)

        } else {
            
            // On iOS7, calculate with orientation
            if (floor(NSFoundationVersionNumber) <= NSFoundationVersionNumber_iOS_7_1) {
                
                let interfaceOrientation = UIApplication.sharedApplication().statusBarOrientation
                switch (interfaceOrientation) {
                case .LandscapeLeft:
                    self.transform = CGAffineTransformMakeRotation(CGFloat(M_PI) * 270.0 / 180.0);
                    break;
                    
                case .LandscapeRight:
                    self.transform = CGAffineTransformMakeRotation(CGFloat(M_PI) * 90.0 / 180.0);
                    break;
                    
                case .PortraitUpsideDown:
                    self.transform = CGAffineTransformMakeRotation(CGFloat(M_PI) * 180.0 / 180.0);
                    break;
                    
                default:
                    break;
                }
                
                self.frame = CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)
                
                // On iOS8, just place the dialog in the middle
            } else {
                
                let screenSize = self.countScreenSize()
                let dialogSize = self.countDialogSize()
                let keyboardSize = CGSizeMake(0, 0);
                
                dialogView!.frame = CGRectMake((screenSize.width - dialogSize.width) / 2, (screenSize.height - keyboardSize.height - dialogSize.height) / 2, dialogSize.width, dialogSize.height);
                
            }
            
            let windows = UIApplication.sharedApplication().windows
            windows.first!.addSubview(self)
        }

        dialogView!.layer.opacity = 0.5
        dialogView!.layer.transform = CATransform3DMakeScale(1.3, 1.3, 1.0);
        
        UIView.animateWithDuration(0.2, delay: 0, options: .CurveEaseOut, animations: {
            self.backgroundColor = UIColor(red:0, green:0, blue:0, alpha:0.4)
            self.dialogView?.layer.opacity = 1.0
            self.dialogView?.layer.transform = CATransform3DMakeScale(1, 1, 1)
            }, completion: nil)
    }
    
    // Creates the container view here: create the dialog, then add the custom content and buttons
    func createContainerView() -> UIView {
        
        if containerView == nil{
            containerView = UIView.init(frame: CGRectMake(0, 0, 300, 150))
        }
     
        let screenSize:CGSize = self.countScreenSize()
        let dialogSize = self.countDialogSize()
        self.frame = CGRectMake(0, 0, screenSize.width, screenSize.height)
        
        // This is the dialog's container; we attach the custom content and the buttons to this one
        let dialogContainer = UIView.init(frame: CGRectMake((screenSize.width - dialogSize.width) / 2, (screenSize.height - dialogSize.height) / 2, dialogSize.width, dialogSize.height))
        
        // First, we style the dialog to match the iOS7 UIAlertView
        let gradient = CAGradientLayer()
        gradient.frame = dialogContainer.bounds
        gradient.colors = [UIColor.whiteColor().CGColor,UIColor.whiteColor().CGColor,UIColor.whiteColor().CGColor]
        gradient.cornerRadius = kCustomIOSAlertViewCornerRadius
        
        dialogContainer.layer.insertSublayer(gradient, atIndex: 0)
        dialogContainer.layer.cornerRadius = kCustomIOSAlertViewCornerRadius
        dialogContainer.layer.borderColor = UIColor(red: 198/255.0, green: 198/255.0, blue: 198/255.0, alpha: 1).CGColor
        dialogContainer.layer.borderWidth = 1
        dialogContainer.layer.shadowRadius = kCustomIOSAlertViewCornerRadius + 5
        dialogContainer.layer.shadowOpacity = 0.1
        dialogContainer.layer.shadowOffset = CGSizeMake(0 - (kCustomIOSAlertViewCornerRadius+5)/2, 0 - (kCustomIOSAlertViewCornerRadius+5)/2)
        dialogContainer.layer.shadowColor = UIColor.blackColor().CGColor
        dialogContainer.layer.shadowPath = UIBezierPath.init(roundedRect: dialogContainer.bounds, cornerRadius: dialogContainer.layer.cornerRadius).CGPath
        
        //按钮上的分割线
        let lineView = UIView.init(frame: CGRectMake(0, dialogContainer.bounds.size.height - buttonHeight - buttonSpacerHeight, dialogContainer.bounds.size.width, buttonSpacerHeight))
        lineView.backgroundColor = UIColor.groupTableViewBackgroundColor()
        dialogContainer.addSubview(lineView)
        
        // 添加内容显示的view
        dialogContainer.addSubview(containerView!)
        self.addButtonsToView(dialogContainer)
        
        return dialogContainer;
    }
    
    // 给container添加按钮
func addButtonsToView(container:UIView) {
    
    if buttonTitles == nil && buttonImages == nil { return }
    var i:CGFloat = 0
    
    if (buttonImages == nil && buttonTitles?.count > 0) { // 按键只有文字没有图片
        let buttonWidth = container.bounds.size.width / CGFloat(buttonTitles!.count)
        for title in buttonTitles! {
            let closeButton = UIButton(type: .Custom)
            closeButton.frame = CGRectMake(i * buttonWidth, container.bounds.size.height - buttonHeight, buttonWidth, buttonHeight)
            closeButton.addTarget(self, action: #selector(customIOS7dialogButtonTouchUpInside(_:)), forControlEvents: .TouchUpInside)
            closeButton.tag = Int(i)
            closeButton.setTitle(title, forState: .Normal)
            closeButton.setTitleColor(UIColor(red: 0.0, green: 0.5, blue: 1.0, alpha: 1), forState: .Normal)
            closeButton.setTitleColor(UIColor(red: 0.2, green: 0.2, blue: 0.2, alpha: 0.5), forState: .Highlighted)
            closeButton.titleLabel?.font = UIFont.boldSystemFontOfSize(14)
            closeButton.layer.cornerRadius = kCustomIOSAlertViewCornerRadius
            i = i + 1
            container.addSubview(closeButton)
        }
    }
    else if buttonImages!.count > 0 && buttonTitles == nil {   //  按键只有图片没有文字
        let buttonWidth = container.bounds.size.width / CGFloat(buttonImages!.count)
        for imgName in buttonImages! {
            let closeButton = UIButton(type: .Custom)
            closeButton.frame = CGRectMake(i * buttonWidth, container.bounds.size.height - buttonHeight, buttonWidth, buttonHeight)
            closeButton.addTarget(self, action: #selector(customIOS7dialogButtonTouchUpInside(_:)), forControlEvents: .TouchUpInside)
            closeButton.tag = Int(i)
            
            if Int(i) != (buttonImages!.count - 1) {
                let lineView = UIView(frame: CGRectMake(closeButton.frame.size.width, 0, 1, buttonHeight))
                lineView.backgroundColor = UIColor.groupTableViewBackgroundColor()
                closeButton.addSubview(lineView)
            }
            let image = UIImageView(image: UIImage(named: imgName))
            let width = CGRectGetWidth(image.frame)
            let height = CGRectGetHeight(image.frame)
            image.frame = CGRectMake((buttonWidth - width)/2, (buttonHeight - height)/2, width, height)
            closeButton.addSubview(image)
            closeButton.layer.cornerRadius = kCustomIOSAlertViewCornerRadius
            i = i + 1
            container.addSubview(closeButton)
        }
    } else { // 文字+图片
        let buttonWidth = container.bounds.size.width / CGFloat(buttonTitles!.count)
        for title in buttonTitles! {
            let closeButton = UIButton(type: .Custom)
            closeButton.frame = CGRectMake(i * buttonWidth, container.bounds.size.height - buttonHeight, buttonWidth, buttonHeight)
            closeButton.addTarget(self, action: #selector(customIOS7dialogButtonTouchUpInside(_:)), forControlEvents: .TouchUpInside)
            closeButton.tag = Int(i)
            closeButton.setTitle(title, forState: .Normal)
            closeButton.setImage(UIImage(named:buttonImages![Int(i)] ), forState: .Normal)
            closeButton.setTitleColor(UIColor.init(red: 0.0, green: 0.5, blue: 1.0, alpha: 1), forState: .Normal)
            closeButton.setTitleColor(UIColor.init(red: 0.2, green: 0.2, blue: 0.2, alpha: 0.5), forState: .Highlighted)
            closeButton.titleLabel?.font = UIFont.boldSystemFontOfSize(14)
            closeButton.layer.cornerRadius = kCustomIOSAlertViewCornerRadius
            i = i + 1
            container.addSubview(closeButton)
        }
    }
 }
    
    //按钮点击
    func customIOS7dialogButtonTouchUpInside(sender:AnyObject) {
        if alertDelegate != nil {
            alertDelegate?.customIOS7dialogButtonTouchUpInside(self, clickedButtonAtIndex: sender.tag)
            self.close()
        }
    }
    
    // 关闭提示窗
    func close() {
        let currentTransform = dialogView!.layer.transform;
        
        if floor(NSFoundationVersionNumber) <= NSFoundationVersionNumber_iOS_7_1 {
            let startRotation = dialogView?.valueForKeyPath("layer.transform.rotation.z")?.floatValue
            let rotation = CATransform3DMakeRotation(CGFloat(-startRotation!) + CGFloat(M_PI) * 270.0 / 180.0, 0.0, 0.0, 0.0)
            dialogView!.layer.transform = CATransform3DConcat(rotation, CATransform3DMakeScale(1, 1, 1))
        }
        dialogView!.layer.opacity = 1.0
        
        UIView.animateWithDuration(0.2, delay: 0, options: .TransitionNone, animations: {
            self.backgroundColor = UIColor(red:0.0, green:0.0, blue:0.0, alpha:0.0)
            self.dialogView!.layer.transform = CATransform3DConcat(currentTransform, CATransform3DMakeScale(0.6, 0.6, 1.0))
            self.dialogView!.layer.opacity = 0.0
            }) { (finished) in
                for view in self.subviews {
                    view.removeFromSuperview()
                }
                self.removeFromSuperview()
        }
    }
    
    // Helper function: count and return the dialog's size
    func countDialogSize() -> CGSize {
        let dialogWidth = containerView!.frame.size.width
        let dialogHeight = containerView!.frame.size.height + buttonHeight + buttonSpacerHeight
        return CGSizeMake(dialogWidth, dialogHeight)
    }
    
    // Helper function: count and return the screen's size
    func countScreenSize() -> CGSize {
        if buttonTitles != nil && buttonTitles?.count > 0 {
            buttonHeight = kCustomIOSAlertViewDefaultButtonHeight
            buttonSpacerHeight = kCustomIOSAlertViewDefaultButtonSpacerHeight
        } else if buttonImages != nil && buttonImages!.count > 0 {
            buttonHeight = kCustomIOSAlertViewDefaultButtonHeight
            buttonSpacerHeight = kCustomIOSAlertViewDefaultButtonSpacerHeight
        } else {
            buttonHeight = 0
            buttonSpacerHeight = 0
        }
        
        var screenWidth = UIScreen.mainScreen().bounds.size.width
        var screenHeight = UIScreen.mainScreen().bounds.size.height
        
        // On iOS7, screen width and height doesn't automatically follow orientation
        if floor(NSFoundationVersionNumber) <= NSFoundationVersionNumber_iOS_7_1 {
            let interfaceOrientation = UIApplication.sharedApplication().statusBarOrientation
            if UIInterfaceOrientationIsLandscape(interfaceOrientation) {
                let tmp = screenWidth;
                screenWidth = screenHeight;
                screenHeight = tmp;
            }
        }
        return CGSizeMake(screenWidth, screenHeight);
    }
   
    // Add motion effects
    func applyMotionEffects() {
        if floor(NSFoundationVersionNumber) <= NSFoundationVersionNumber_iOS_6_1 {
            return
        }
        let horizontalEffect = UIInterpolatingMotionEffect(keyPath: "center.x", type: .TiltAlongHorizontalAxis)
        horizontalEffect.minimumRelativeValue = kCustomIOS7MotionEffectExtent
        horizontalEffect.maximumRelativeValue = kCustomIOS7MotionEffectExtent

        let verticalEffect = UIInterpolatingMotionEffect(keyPath: "center.y", type: .TiltAlongVerticalAxis)
        verticalEffect.minimumRelativeValue = -kCustomIOS7MotionEffectExtent
        verticalEffect.maximumRelativeValue = kCustomIOS7MotionEffectExtent
        
        let motionEffectGroup = UIMotionEffectGroup()
        motionEffectGroup.motionEffects = [horizontalEffect, verticalEffect]
    
       dialogView?.addMotionEffect(motionEffectGroup)
    }
  
    
    // Rotation changed, on iOS7
    func changeOrientationForIOS7() {
    
        let interfaceOrientation = UIApplication.sharedApplication().statusBarOrientation
        let startRotation = self.valueForKeyPath("layer.transform.rotation.z")!.floatValue
        
        var rotation:CGAffineTransform
        
        switch interfaceOrientation {
            case .LandscapeLeft:
            rotation = CGAffineTransformMakeRotation(CGFloat(-startRotation) + CGFloat(M_PI) * 270.0 / 180.0)
            case .LandscapeRight:
            rotation = CGAffineTransformMakeRotation(CGFloat(-startRotation) + CGFloat(M_PI) * 90.0 / 180.0);
            case .PortraitUpsideDown:
            rotation = CGAffineTransformMakeRotation(CGFloat(-startRotation) + CGFloat(M_PI) * 180.0 / 180.0);
        default:
            rotation = CGAffineTransformMakeRotation(CGFloat(-startRotation) + 0.0);
        }
        UIView.animateWithDuration(0.2, delay: 0, options: .TransitionNone, animations: {
            self.dialogView!.transform = rotation
            }, completion: nil)
    }
    
    // Rotation changed, on iOS8
    func changeOrientationForIOS8(notification:NSNotification) {
    
        let screenWidth = UIScreen.mainScreen().bounds.size.width
        let screenHeight = UIScreen.mainScreen().bounds.size.height
        UIView.animateWithDuration(0.2, delay: 0, options: .TransitionNone, animations: {
            let dialogSize = self.countDialogSize()
                        let keyboardSize = notification.userInfo![UIKeyboardFrameBeginUserInfoKey]!.CGRectValue.size;
                        self.frame = CGRectMake(0, 0, screenWidth, screenHeight)
                        self.dialogView!.frame = CGRectMake((screenWidth - dialogSize.width) / 2, (screenHeight - keyboardSize.height - dialogSize.height) / 2, dialogSize.width, dialogSize.height);
            }, completion: nil)
    }
    
//MARK:-NSNotification
    func deviceOrientationDidChange(notification:NSNotification){
        // If dialog is attached to the parent view, it probably wants to handle the orientation change itself
        if (parentView != nil) {
            return;
        }
        
        if floor(NSFoundationVersionNumber) <= NSFoundationVersionNumber_iOS_7_1 {
            self.changeOrientationForIOS7()
        } else {
            self.changeOrientationForIOS8(notification)
        }
    }
    
    // Handle keyboard show/hide changes
    func keyboardWillShow(notification:NSNotification){
        
        let screenSize = self.countScreenSize()
        let dialogSize = self.countDialogSize()
        var keyboardSize = notification.userInfo![UIKeyboardFrameBeginUserInfoKey]?.CGRectValue().size
        
        let interfaceOrientation = UIApplication.sharedApplication().statusBarOrientation
        if UIInterfaceOrientationIsLandscape(interfaceOrientation) && NSFoundationVersionNumber <= NSFoundationVersionNumber_iOS_7_1 {
            let tmp = keyboardSize!.height;
            keyboardSize!.height = keyboardSize!.width
            keyboardSize!.width = tmp
        }
        
        UIView.animateWithDuration(0.2, delay: 0, options: .TransitionNone, animations: {
            self.dialogView!.frame = CGRectMake((screenSize.width - dialogSize.width) / 2, (screenSize.height - keyboardSize!.height - dialogSize.height) / 2, dialogSize.width, dialogSize.height)
            }, completion: nil)
    }
    
    func keyboardWillHide(notification:NSNotification){
        let screenSize = self.countScreenSize()
        let dialogSize = self.countDialogSize()
        
        UIView.animateWithDuration(0.2, delay: 0, options: .TransitionNone, animations: {
                self.dialogView!.frame = CGRectMake((screenSize.width - dialogSize.width) / 2, (screenSize.height - dialogSize.height) / 2, dialogSize.width, dialogSize.height)
            }, completion: nil)
    }
    
    deinit{
        UIDevice.currentDevice().endGeneratingDeviceOrientationNotifications()
        NSNotificationCenter.defaultCenter().removeObserver(self)
    }
    
}

必须在主线程调用:

//
//  ViewController.swift
//  WWCustomAlertView
//
//  Created by wuwei on 16/8/10.
//  Copyright © 2016年 wuwei. All rights reserved.
//

import UIKit

class ViewController: UIViewController,WWCustomAlertViewDelegate {

    override func viewDidLoad() {
        super.viewDidLoad()

        let launchDialog = UIButton.init(type: .Custom)
        launchDialog.frame = CGRectMake(20, 70, 150, 50)
        launchDialog.addTarget(self, action: #selector(self.launchDialog), forControlEvents: .TouchUpInside)
        launchDialog.setTitle("Launch Dialog",forState:.Normal)
        launchDialog.backgroundColor = UIColor.darkGrayColor()
        self.view.addSubview(launchDialog)
    }

    //主线程
    func launchDialog() {
        //创建提示窗
        let alertView = WWCustomAlertView()
        // Add some custom content to the alert view
        alertView.containerView = self.createDemoView()
        
        // Modify the parameters
        alertView.buttonImages = ["icon_refuse","icon_answer"]
//        alertView.buttonTitles = ["拒绝","接听"]
        alertView.alertDelegate = self
        alertView.useMotionEffects = true
        alertView.show()
    }

    //点击按钮的代理
    func customIOS7dialogButtonTouchUpInside(alertView: AnyObject, clickedButtonAtIndex buttonIndex: Int) {
        debugPrint("Delegate: Button at position: \(buttonIndex) is clicked on alertView \(alertView.tag)")
        alertView.close()
    }
    
    func createDemoView() -> UIView {
        let infoView = UIView.init(frame:CGRectMake(0, 0, 290, 100))
        
        let imageView = UIImageView.init(frame: CGRectMake(20, 20, 60, 60))
        imageView.image = UIImage.init(named: "add_staff_contact")
        imageView.layer.masksToBounds = true
        imageView.layer.cornerRadius = 8.0
        infoView.addSubview(imageView)
        
        let subLabel = UILabel.init(frame: CGRectMake(imageView.right() + 16, 25 , 100, 20))
        subLabel.numberOfLines = 1
        subLabel.text = "张三正在呼叫你"
        subLabel.textAlignment = .Left
        subLabel.textColor = UIColor.grayColor()
        subLabel.font = UIFont.systemFontOfSize(14)
        infoView.addSubview(subLabel)
        
        let txtLabel = UILabel.init(frame: CGRectMake(imageView.right() + 16, subLabel.bottom() + 5, 180, 20))
        txtLabel.numberOfLines = 1
        txtLabel.text = "是否接听通话"
        txtLabel.textAlignment = .Left
        txtLabel.textColor = UIColor.grayColor()
        txtLabel.font = UIFont.systemFontOfSize(14)
        infoView.addSubview(txtLabel)
        
        
        return infoView
    }

}

demo下载地址:下载地址

如果你都看到这里了,请给我点个赞吧,你的喜欢是我坚持原创的不竭动力。

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

推荐阅读更多精彩内容

  • Android 自定义View的各种姿势1 Activity的显示之ViewRootImpl详解 Activity...
    passiontim阅读 171,454评论 25 707
  • 在时光中静坐, 重拾内心的风景。 将记忆,一行行写入相思传。 将心,安置在一纸素笺上。 再煮一壶清茶,拾几粒散碎的...
    陶韵阅读 212评论 3 1
  • 我以前认为财富自由就是有花不完的钱。现在想想,这个想法挺危险的。“花不完的钱”是一个无法实现的“梦”。原因有二: ...
    安定的猫阅读 284评论 0 2
  • 八月最后一天,来帝都第一百一十八天。 我们吃掉了四袋米,两大桶油,3.5块腊肉,5包米粉,看了六场电影,一场话剧,...
    喜卡桑阅读 403评论 0 1
  • 这是【萍水相逢】的第四篇故事 1 小艺是因为一个很蠢的事来找我的。她说Tommy的空间里刚刚发表了一些话,像是写给...
    陈骁士阅读 669评论 1 3