almassapargali / LocationPicker

iOS location picker view controller
MIT License
242 stars 84 forks source link

Title disappears #63

Closed fury21 closed 2 years ago

fury21 commented 4 years ago

Hi! Why title disappears, immediately after the appears of? Look my video

BAADAgADIgUAAvYu4Ep30C4reCzrkhYE_1574700403 4

weakfl commented 4 years ago

Please provide more details about your implementation. Ideally with steps to reproduce this issue.

fury21 commented 4 years ago

@objc private func touchToSelectAddressLabel() { hideKeyboardGesture()

  // setup the location picker

    locationPicker.mapType = .standard // default: .Hybrid
    locationPicker.searchBarPlaceholder = "Поиск по адресу" // default: "Search or enter an address"
    locationPicker.searchHistoryLabel = "История поиска" // default: "Search History"
    locationPicker.selectButtonTitle = "Выбрать"

    locationPicker.completion = { location in
        self.addressVpsika = location!.address
        self.coordinatesVpiska = location?.coordinate

        self.addressLabel.text = location!.address
    }

    // add cancel button to dismiss it
    locationPicker.navigationItem.leftBarButtonItem =
        UIBarButtonItem(title: "Отмена", style: .plain, target: self, action: #selector(closeLocationPicker))

    locationPicker.navigationItem.rightBarButtonItem =
        UIBarButtonItem(title: "Спутник", style: .plain, target: self, action: #selector(changeMapStyle))

    // set the wrapper
    let nc = UINavigationController(rootViewController: locationPicker)

    // show it modally
    self.present(nc, animated: true, completion: nil)
}
naveedmcs commented 4 years ago

yes, title disappear first time when we change pin location on map using hold tapped. and also when scroll map.

JoniVR commented 4 years ago

Happens on the demo app too. (iOS 13.3)

LoopingLouieX commented 4 years ago

Did anyone solved this already ?

stephanboner commented 3 years ago

No news here? I guess it only happens if you don't press "long enough". If you keep pressing after the pin is added and release after the animation, most of the time the title stays

higalex commented 2 years ago

I created a PR to fix this issue: https://github.com/almassapargali/LocationPicker/pull/76