MapKit框架詳細(xì)解析(十六) —— 基于MapKit和Core Location的Routing(二)

版本記錄

版本號(hào) 時(shí)間
V1.0 2020.06.20 星期六

前言

MapKit框架直接從您的應(yīng)用界面顯示地圖或衛(wèi)星圖像,調(diào)出興趣點(diǎn)之剧,并確定地圖坐標(biāo)的地標(biāo)信息。接下來幾篇我們就一起看一下這個(gè)框架砍聊。感興趣的看下面幾篇文章背稼。
1. MapKit框架詳細(xì)解析(一) —— 基本概覽(一)
2. MapKit框架詳細(xì)解析(二) —— 基本使用簡(jiǎn)單示例(一)
3. MapKit框架詳細(xì)解析(三) —— 基本使用簡(jiǎn)單示例(二)
4. MapKit框架詳細(xì)解析(四) —— 一個(gè)疊加視圖相關(guān)的簡(jiǎn)單示例(一)
5. MapKit框架詳細(xì)解析(五) —— 一個(gè)疊加視圖相關(guān)的簡(jiǎn)單示例(二)
6. MapKit框架詳細(xì)解析(六) —— 添加自定義圖塊(一)
7. MapKit框架詳細(xì)解析(七) —— 添加自定義圖塊(二)
8. MapKit框架詳細(xì)解析(八) —— 添加自定義圖塊(三)
9. MapKit框架詳細(xì)解析(九) —— 地圖特定區(qū)域放大和創(chuàng)建自定義地圖annotations(一)
10. MapKit框架詳細(xì)解析(十) —— 地圖特定區(qū)域放大和創(chuàng)建自定義地圖annotations(二)
11. MapKit框架詳細(xì)解析(十一) —— 自定義MapKit Tiles(一)
12. MapKit框架詳細(xì)解析(十二) —— 自定義MapKit Tiles(二)
13. MapKit框架詳細(xì)解析(十三) —— MapKit Overlay Views(一)
14. MapKit框架詳細(xì)解析(十四) —— MapKit Overlay Views(二)
15. MapKit框架詳細(xì)解析(十五) —— 基于MapKit和Core Location的Routing(一)

源碼

1. Swift

首先看下工程組織結(jié)構(gòu)

下面就是源碼了

1. AppDelegate.swift
import UIKit

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
  var window: UIWindow?

  func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
    window = UIWindow()
    window?.rootViewController = RouteSelectionViewController()
    window?.overrideUserInterfaceStyle = .light
    window?.makeKeyAndVisible()
    // Override point for customization after application launch.
    return true
  }
}
2. CLPlacemark+Additions.swift
import CoreLocation

extension CLPlacemark {
  var abbreviation: String {
    if let name = self.name {
      return name
    }

    if let interestingPlace = areasOfInterest?.first {
      return interestingPlace
    }

    return [subThoroughfare, thoroughfare].compactMap { $0 }.joined(separator: " ")
  }
}
3. TimeInterval+Additions.swift
import Foundation

extension TimeInterval {
  var formatted: String {
    let formatter = DateComponentsFormatter()
    formatter.unitsStyle = .full
    formatter.allowedUnits = [.hour, .minute]

    return formatter.string(from: self) ?? ""
  }
}
4. UIColor+Additions.swift
import UIKit

extension UIColor {
  static var border: UIColor {
    // swiftlint:disable:next force_unwrapping
    return UIColor(named: "ui-border")!
  }

  static var primary: UIColor {
    // swiftlint:disable:next force_unwrapping
    return UIColor(named: "rw-green")!
  }
}
5. UIButton+Additions.swift
import UIKit

extension UIButton {
  func stylize() {
    setTitleColor(.white, for: .normal)
    setBackgroundImage(.buttonBackground, for: .normal)
    titleLabel?.font = .systemFont(ofSize: 15, weight: .medium)
    contentEdgeInsets = UIEdgeInsets(top: 6, left: 10, bottom: 6, right: 10)
  }
}
6. UIImage+Additions.swift
import UIKit

extension UIImage {
  static var buttonBackground: UIImage {
    let imageSideLength: CGFloat = 8
    let halfSideLength = imageSideLength / 2
    let imageFrame = CGRect(
      x: 0,
      y: 0,
      width: imageSideLength,
      height: imageSideLength
    )

    let image = UIGraphicsImageRenderer(size: imageFrame.size).image { ctx in
      ctx.cgContext.addPath(
        UIBezierPath(
          roundedRect: imageFrame,
          cornerRadius: halfSideLength
        ).cgPath
      )
      ctx.cgContext.setFillColor(UIColor.primary.cgColor)
      ctx.cgContext.fillPath()
    }

    return image.resizableImage(
      withCapInsets: UIEdgeInsets(
        top: halfSideLength,
        left: halfSideLength,
        bottom: halfSideLength,
        right: halfSideLength
      )
    )
  }
}
7. UIView+Additions.swift
import UIKit

extension UIView {
  func addBorder() {
    layer.borderWidth = 1
    layer.cornerRadius = 3
    layer.borderColor = UIColor.border.cgColor
  }
}
8. UITextField+Additions.swift
import UIKit

extension UITextField {
  var contents: String? {
    guard
      let text = text?.trimmingCharacters(in: .whitespaces),
      !text.isEmpty
      else {
        return nil
    }

    return text
  }
}
9. RouteBuilder.swift
import MapKit

enum RouteBuilder {
  enum Segment {
    case text(String)
    case location(CLLocation)
  }

  enum RouteError: Error {
    case invalidSegment(String)
  }

  typealias PlaceCompletionBlock = (MKPlacemark?) -> Void
  typealias RouteCompletionBlock = (Result<Route, RouteError>) -> Void

  private static let routeQueue = DispatchQueue(label: "com.raywenderlich.RWRouter.route-builder")

  static func buildRoute(origin: Segment, stops: [Segment], within region: MKCoordinateRegion?, completion: @escaping RouteCompletionBlock) {
    routeQueue.async {
      let group = DispatchGroup()

      var originItem: MKMapItem?
      group.enter()
      requestPlace(for: origin, within: region) { place in
        if let requestedPlace = place {
          originItem = MKMapItem(placemark: requestedPlace)
        }

        group.leave()
      }

      var stopItems = [MKMapItem](repeating: .init(), count: stops.count)
      for (index, stop) in stops.enumerated() {
        group.enter()
        requestPlace(for: stop, within: region) { place in
          if let requestedPlace = place {
            stopItems[index] = MKMapItem(placemark: requestedPlace)
          }

          group.leave()
        }
      }

      group.notify(queue: .main) {
        if let originMapItem = originItem, !stopItems.isEmpty {
          let route = Route(origin: originMapItem, stops: stopItems)
          completion(.success(route))
        } else {
          let reason = originItem == nil ? "the origin address" : "one or more of the stops"
          completion(.failure(.invalidSegment(reason)))
        }
      }
    }
  }

  private static func requestPlace(for segment: Segment, within region: MKCoordinateRegion?, completion: @escaping PlaceCompletionBlock) {
    if case .text(let value) = segment, let nearbyRegion = region {
      let request = MKLocalSearch.Request()
      request.naturalLanguageQuery = value
      request.region = nearbyRegion

      MKLocalSearch(request: request).start { response, _ in
        let place: MKPlacemark?

        if let firstItem = response?.mapItems.first {
          place = firstItem.placemark
        } else {
          place = nil
        }

        completion(place)
      }
    } else {
      CLGeocoder().geocodeSegment(segment) { places, _ in
        let place: MKPlacemark?

        if let firstPlace = places?.first {
          place = MKPlacemark(placemark: firstPlace)
        } else {
          place = nil
        }

        completion(place)
      }
    }
  }
}

private extension CLGeocoder {
  func geocodeSegment(_ segment: RouteBuilder.Segment, completionHandler: @escaping CLGeocodeCompletionHandler) {
    switch segment {
    case .text(let value):
      geocodeAddressString(value, completionHandler: completionHandler)

    case .location(let value):
      reverseGeocodeLocation(value, completionHandler: completionHandler)
    }
  }
}
10. Route.swift
import MapKit

struct Route {
  let origin: MKMapItem
  let stops: [MKMapItem]

  var annotations: [MKAnnotation] {
    var annotations: [MKAnnotation] = []

    annotations.append(
      RouteAnnotation(item: origin)
    )
    annotations.append(contentsOf: stops.map { stop in
      return RouteAnnotation(item: stop)
    })

    return annotations
  }

  var label: String {
    if let name = stops.first?.name, stops.count == 1 {
      return "Directions to \(name)"
    } else {
      let stopNames = stops.compactMap { stop in
        return stop.name
      }
      let namesString = stopNames.joined(separator: " and ")

      return "Directions between \(namesString)"
    }
  }
}
11. RouteAnnotation.swift
import MapKit

class RouteAnnotation: NSObject {
  private let item: MKMapItem

  init(item: MKMapItem) {
    self.item = item

    super.init()
  }
}

// MARK: - MKAnnotation

extension RouteAnnotation: MKAnnotation {
  var coordinate: CLLocationCoordinate2D {
    return item.placemark.coordinate
  }

  var title: String? {
    return item.name
  }
}
12. DirectionsViewController.swift
import UIKit
import MapKit

class DirectionsViewController: UIViewController {
  @IBOutlet private var mapView: MKMapView!
  @IBOutlet private var headerLabel: UILabel!
  @IBOutlet private var tableView: UITableView!
  @IBOutlet private var informationLabel: UILabel!
  @IBOutlet private var activityIndicatorView: UIActivityIndicatorView!

  private let cellIdentifier = "DirectionsCell"
  private let distanceFormatter = MKDistanceFormatter()

  private let route: Route

  private var mapRoutes: [MKRoute] = []
  private var totalTravelTime: TimeInterval = 0
  private var totalDistance: CLLocationDistance = 0

  private var groupedRoutes: [(startItem: MKMapItem, endItem: MKMapItem)] = []

  init(route: Route) {
    self.route = route

    super.init(nibName: String(describing: DirectionsViewController.self), bundle: nil)
  }

  required init?(coder: NSCoder) {
    fatalError("init(coder:) has not been implemented")
  }

  override func viewDidLoad() {
    super.viewDidLoad()

    groupAndRequestDirections()

    headerLabel.text = route.label

    tableView.dataSource = self

    mapView.delegate = self
    mapView.showAnnotations(route.annotations, animated: false)
  }

  // MARK: - Helpers

  private func groupAndRequestDirections() {
    guard let firstStop = route.stops.first else {
      return
    }

    groupedRoutes.append((route.origin, firstStop))

    if route.stops.count == 2 {
      let secondStop = route.stops[1]

      groupedRoutes.append((firstStop, secondStop))
      groupedRoutes.append((secondStop, route.origin))
    }

    fetchNextRoute()
  }

  private func fetchNextRoute() {
    guard !groupedRoutes.isEmpty else {
      activityIndicatorView.stopAnimating()
      return
    }

    let nextGroup = groupedRoutes.removeFirst()
    let request = MKDirections.Request()

    request.source = nextGroup.startItem
    request.destination = nextGroup.endItem

    let directions = MKDirections(request: request)

    directions.calculate { response, error in
      guard let mapRoute = response?.routes.first else {
        self.informationLabel.text = error?.localizedDescription
        self.activityIndicatorView.stopAnimating()
        return
      }

      self.updateView(with: mapRoute)
      self.fetchNextRoute()
    }
  }

  private func updateView(with mapRoute: MKRoute) {
    let padding: CGFloat = 8
    mapView.addOverlay(mapRoute.polyline)
    mapView.setVisibleMapRect(
      mapView.visibleMapRect.union(
        mapRoute.polyline.boundingMapRect
      ),
      edgePadding: UIEdgeInsets(
        top: 0,
        left: padding,
        bottom: padding,
        right: padding
      ),
      animated: true
    )

    totalDistance += mapRoute.distance
    totalTravelTime += mapRoute.expectedTravelTime

    let informationComponents = [
      totalTravelTime.formatted,
      "? \(distanceFormatter.string(fromDistance: totalDistance))"
    ]
    informationLabel.text = informationComponents.joined(separator: " ")

    mapRoutes.append(mapRoute)
    tableView.reloadData()
  }
}

// MARK: - UITableViewDataSource

extension DirectionsViewController: UITableViewDataSource {
  func numberOfSections(in tableView: UITableView) -> Int {
    return mapRoutes.isEmpty ? 0 : mapRoutes.count
  }

  func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
    let route = mapRoutes[section]
    return route.steps.count - 1
  }

  func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
    let cell = { () -> UITableViewCell in
      guard let cell = tableView.dequeueReusableCell(withIdentifier: cellIdentifier) else {
        let cell = UITableViewCell(style: .subtitle, reuseIdentifier: cellIdentifier)
        cell.selectionStyle = .none
        return cell
      }
      return cell
    }()

    let route = mapRoutes[indexPath.section]
    let step = route.steps[indexPath.row + 1]

    cell.textLabel?.text = "\(indexPath.row + 1): \(step.notice ?? step.instructions)"
    cell.detailTextLabel?.text = distanceFormatter.string(
      fromDistance: step.distance
    )

    return cell
  }

  func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? {
    let route = mapRoutes[section]
    return route.name
  }
}

// MARK: - MKMapViewDelegate

extension DirectionsViewController: MKMapViewDelegate {
  func mapView(_ mapView: MKMapView, rendererFor overlay: MKOverlay) -> MKOverlayRenderer {
    let renderer = MKPolylineRenderer(overlay: overlay)

    renderer.strokeColor = .systemBlue
    renderer.lineWidth = 3

    return renderer
  }
}
13. RouteSelectionViewController.swift
import UIKit
import MapKit
import CoreLocation

class RouteSelectionViewController: UIViewController {
  @IBOutlet private var inputContainerView: UIView!
  @IBOutlet private var originTextField: UITextField!
  @IBOutlet private var stopTextField: UITextField!
  @IBOutlet private var extraStopTextField: UITextField!
  @IBOutlet private var calculateButton: UIButton!
  @IBOutlet private var activityIndicatorView: UIActivityIndicatorView!
  @IBOutlet private var keyboardAvoidingConstraint: NSLayoutConstraint!

  @IBOutlet private var suggestionLabel: UILabel!
  @IBOutlet private var suggestionContainerView: UIView!
  @IBOutlet private var suggestionContainerTopConstraint: NSLayoutConstraint!

  private var editingTextField: UITextField?
  private var currentRegion: MKCoordinateRegion?
  private var currentPlace: CLPlacemark?

  private let locationManager = CLLocationManager()
  private let completer = MKLocalSearchCompleter()

  private let defaultAnimationDuration: TimeInterval = 0.25

  override func viewDidLoad() {
    super.viewDidLoad()

    suggestionContainerView.addBorder()
    inputContainerView.addBorder()
    calculateButton.stylize()

    completer.delegate = self

    beginObserving()
    configureGestures()
    configureTextFields()
    attemptLocationAccess()
    hideSuggestionView(animated: false)
  }

  // MARK: - Helpers

  private func configureGestures() {
    view.addGestureRecognizer(
      UITapGestureRecognizer(
        target: self,
        action: #selector(handleTap(_:))
      )
    )
    suggestionContainerView.addGestureRecognizer(
      UITapGestureRecognizer(
        target: self,
        action: #selector(suggestionTapped(_:))
      )
    )
  }

  private func configureTextFields() {
    originTextField.delegate = self
    stopTextField.delegate = self
    extraStopTextField.delegate = self

    originTextField.addTarget(
      self,
      action: #selector(textFieldDidChange(_:)),
      for: .editingChanged
    )
    stopTextField.addTarget(
      self,
      action: #selector(textFieldDidChange(_:)),
      for: .editingChanged
    )
    extraStopTextField.addTarget(
      self,
      action: #selector(textFieldDidChange(_:)),
      for: .editingChanged
    )
  }

  private func attemptLocationAccess() {
    guard CLLocationManager.locationServicesEnabled() else {
      return
    }

    locationManager.desiredAccuracy = kCLLocationAccuracyHundredMeters
    locationManager.delegate = self

    if CLLocationManager.authorizationStatus() == .notDetermined {
      locationManager.requestWhenInUseAuthorization()
    } else {
      locationManager.requestLocation()
    }
  }

  private func hideSuggestionView(animated: Bool) {
    suggestionContainerTopConstraint.constant = -1 * (suggestionContainerView.bounds.height + 1)

    guard animated else {
      view.layoutIfNeeded()
      return
    }

    UIView.animate(withDuration: defaultAnimationDuration) {
      self.view.layoutIfNeeded()
    }
  }

  private func showSuggestion(_ suggestion: String) {
    suggestionLabel.text = suggestion
    suggestionContainerTopConstraint.constant = -4 // to hide the top corners

    UIView.animate(withDuration: defaultAnimationDuration) {
      self.view.layoutIfNeeded()
    }
  }

  private func presentAlert(message: String) {
    let alertController = UIAlertController(title: nil, message: message, preferredStyle: .alert)
    alertController.addAction(UIAlertAction(title: "Okay", style: .default, handler: nil))

    present(alertController, animated: true)
  }

  // MARK: - Actions

  @objc private func textFieldDidChange(_ field: UITextField) {
    if field == originTextField && currentPlace != nil {
      currentPlace = nil
      field.text = ""
    }

    guard let query = field.contents else {
      hideSuggestionView(animated: true)

      if completer.isSearching {
        completer.cancel()
      }
      return
    }

    completer.queryFragment = query
  }

  @objc private func handleTap(_ gesture: UITapGestureRecognizer) {
    let gestureView = gesture.view
    let point = gesture.location(in: gestureView)

    guard
      let hitView = gestureView?.hitTest(point, with: nil),
      hitView == gestureView
      else {
        return
    }

    view.endEditing(true)
  }

  @objc private func suggestionTapped(_ gesture: UITapGestureRecognizer) {
    hideSuggestionView(animated: true)

    editingTextField?.text = suggestionLabel.text
    editingTextField = nil
  }

  @IBAction private func calculateButtonTapped() {
    view.endEditing(true)

    calculateButton.isEnabled = false
    activityIndicatorView.startAnimating()

    let segment: RouteBuilder.Segment?
    if let currentLocation = currentPlace?.location {
      segment = .location(currentLocation)
    } else if let originValue = originTextField.contents {
      segment = .text(originValue)
    } else {
      segment = nil
    }

    let stopSegments: [RouteBuilder.Segment] = [
      stopTextField.contents,
      extraStopTextField.contents
    ]
    .compactMap { contents in
      if let value = contents {
        return .text(value)
      } else {
        return nil
      }
    }

    guard
      let originSegment = segment,
      !stopSegments.isEmpty
      else {
        presentAlert(message: "Please select an origin and at least 1 stop.")
        activityIndicatorView.stopAnimating()
        calculateButton.isEnabled = true
        return
    }

    RouteBuilder.buildRoute(
      origin: originSegment,
      stops: stopSegments,
      within: currentRegion
    ) { result in
      self.calculateButton.isEnabled = true
      self.activityIndicatorView.stopAnimating()

      switch result {
      case .success(let route):
        let viewController = DirectionsViewController(route: route)
        self.present(viewController, animated: true)

      case .failure(let error):
        let errorMessage: String

        switch error {
        case .invalidSegment(let reason):
          errorMessage = "There was an error with: \(reason)."
        }

        self.presentAlert(message: errorMessage)
      }
    }
  }

  // MARK: - Notifications

  private func beginObserving() {
    NotificationCenter.default.addObserver(
      self,
      selector: #selector(handleKeyboardFrameChange(_:)),
      name: UIResponder.keyboardWillChangeFrameNotification,
      object: nil
    )
  }

  @objc private func handleKeyboardFrameChange(_ notification: Notification) {
    guard let frame = notification.userInfo?[UIResponder.keyboardFrameEndUserInfoKey] as? CGRect else {
      return
    }

    let viewHeight = view.bounds.height - view.safeAreaInsets.bottom
    let visibleHeight = viewHeight - frame.origin.y
    keyboardAvoidingConstraint.constant = visibleHeight + 32

    UIView.animate(withDuration: defaultAnimationDuration) {
      self.view.layoutIfNeeded()
    }
  }
}

// MARK: - UITextFieldDelegate

extension RouteSelectionViewController: UITextFieldDelegate {
  func textFieldDidBeginEditing(_ textField: UITextField) {
    hideSuggestionView(animated: true)

    if completer.isSearching {
      completer.cancel()
    }

    editingTextField = textField
  }
}

// MARK: - CLLocationManagerDelegate

extension RouteSelectionViewController: CLLocationManagerDelegate {
  func locationManager(_ manager: CLLocationManager, didChangeAuthorization status: CLAuthorizationStatus) {
    guard status == .authorizedWhenInUse else {
      return
    }

    manager.requestLocation()
  }

  func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) {
    guard let firstLocation = locations.first else {
      return
    }

    let commonDelta: CLLocationDegrees = 25 / 111 // 1/111 = 1 latitude km
    let span = MKCoordinateSpan(latitudeDelta: commonDelta, longitudeDelta: commonDelta)
    let region = MKCoordinateRegion(center: firstLocation.coordinate, span: span)

    currentRegion = region
    completer.region = region

    CLGeocoder().reverseGeocodeLocation(firstLocation) { places, _ in
      guard let firstPlace = places?.first, self.originTextField.contents == nil else {
        return
      }

      self.currentPlace = firstPlace
      self.originTextField.text = firstPlace.abbreviation
    }
  }

  func locationManager(_ manager: CLLocationManager, didFailWithError error: Error) {
    print("Error requesting location: \(error.localizedDescription)")
  }
}

// MARK: - MKLocalSearchCompleterDelegate

extension RouteSelectionViewController: MKLocalSearchCompleterDelegate {
  func completerDidUpdateResults(_ completer: MKLocalSearchCompleter) {
    guard let firstResult = completer.results.first else {
      return
    }

    showSuggestion(firstResult.title)
  }

  func completer(_ completer: MKLocalSearchCompleter, didFailWithError error: Error) {
    print("Error suggesting a location: \(error.localizedDescription)")
  }
}

后記

本篇主要講述了基于MapKitCore LocationRouting,感興趣的給個(gè)贊或者關(guān)注~~~

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
  • 序言:七十年代末玻蝌,一起剝皮案震驚了整個(gè)濱河市蟹肘,隨后出現(xiàn)的幾起案子,更是在濱河造成了極大的恐慌俯树,老刑警劉巖帘腹,帶你破解...
    沈念sama閱讀 217,734評(píng)論 6 505
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件,死亡現(xiàn)場(chǎng)離奇詭異许饿,居然都是意外死亡阳欲,警方通過查閱死者的電腦和手機(jī),發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 92,931評(píng)論 3 394
  • 文/潘曉璐 我一進(jìn)店門陋率,熙熙樓的掌柜王于貴愁眉苦臉地迎上來球化,“玉大人,你說我怎么就攤上這事瓦糟⊥灿蓿” “怎么了?”我有些...
    開封第一講書人閱讀 164,133評(píng)論 0 354
  • 文/不壞的土叔 我叫張陵菩浙,是天一觀的道長(zhǎng)锨能。 經(jīng)常有香客問我,道長(zhǎng)芍耘,這世上最難降的妖魔是什么址遇? 我笑而不...
    開封第一講書人閱讀 58,532評(píng)論 1 293
  • 正文 為了忘掉前任,我火速辦了婚禮斋竞,結(jié)果婚禮上倔约,老公的妹妹穿的比我還像新娘。我一直安慰自己坝初,他們只是感情好浸剩,可當(dāng)我...
    茶點(diǎn)故事閱讀 67,585評(píng)論 6 392
  • 文/花漫 我一把揭開白布钾军。 她就那樣靜靜地躺著,像睡著了一般绢要。 火紅的嫁衣襯著肌膚如雪吏恭。 梳的紋絲不亂的頭發(fā)上,一...
    開封第一講書人閱讀 51,462評(píng)論 1 302
  • 那天重罪,我揣著相機(jī)與錄音樱哼,去河邊找鬼。 笑死剿配,一個(gè)胖子當(dāng)著我的面吹牛搅幅,可吹牛的內(nèi)容都是我干的。 我是一名探鬼主播呼胚,決...
    沈念sama閱讀 40,262評(píng)論 3 418
  • 文/蒼蘭香墨 我猛地睜開眼茄唐,長(zhǎng)吁一口氣:“原來是場(chǎng)噩夢(mèng)啊……” “哼!你這毒婦竟也來了蝇更?” 一聲冷哼從身側(cè)響起沪编,我...
    開封第一講書人閱讀 39,153評(píng)論 0 276
  • 序言:老撾萬榮一對(duì)情侶失蹤,失蹤者是張志新(化名)和其女友劉穎年扩,沒想到半個(gè)月后漾抬,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體,經(jīng)...
    沈念sama閱讀 45,587評(píng)論 1 314
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡常遂,尸身上長(zhǎng)有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 37,792評(píng)論 3 336
  • 正文 我和宋清朗相戀三年纳令,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片克胳。...
    茶點(diǎn)故事閱讀 39,919評(píng)論 1 348
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡平绩,死狀恐怖,靈堂內(nèi)的尸體忽然破棺而出漠另,到底是詐尸還是另有隱情捏雌,我是刑警寧澤,帶...
    沈念sama閱讀 35,635評(píng)論 5 345
  • 正文 年R本政府宣布笆搓,位于F島的核電站性湿,受9級(jí)特大地震影響,放射性物質(zhì)發(fā)生泄漏满败。R本人自食惡果不足惜肤频,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 41,237評(píng)論 3 329
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望算墨。 院中可真熱鬧宵荒,春花似錦、人聲如沸。這莊子的主人今日做“春日...
    開封第一講書人閱讀 31,855評(píng)論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽。三九已至暑刃,卻和暖如春厢漩,著一層夾襖步出監(jiān)牢的瞬間,已是汗流浹背岩臣。 一陣腳步聲響...
    開封第一講書人閱讀 32,983評(píng)論 1 269
  • 我被黑心中介騙來泰國打工溜嗜, 沒想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留,地道東北人婿脸。 一個(gè)月前我還...
    沈念sama閱讀 48,048評(píng)論 3 370
  • 正文 我出身青樓粱胜,卻偏偏與公主長(zhǎng)得像柄驻,于是被迫代替她去往敵國和親狐树。 傳聞我的和親對(duì)象是個(gè)殘疾皇子,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 44,864評(píng)論 2 354