は、それは私の作品
func showPickerView(_ animated: Bool) {
weak var weakSelf = self
UIView.animate(withDuration: (animated ? kPickerView_AppearanceAnimationDuration : 0.0), delay: (animated ? kPickerView_AppearanceAnimationDelay : 0.0), options: (animations as! UIViewAnimationOptionCurveEaseInOut), {() -> Void in
weakSelf!.pickerViewContainerView.transform = CGAffineTransform(translationX: 0, y: 0)
}, completion: {(finished: Bool) -> Void in
weakSelf!.view.layoutIfNeeded()
})
}
func hidePickerView(_ animated: Bool) {
weak var weakSelf = self
UIView.animate(withDuration: (animated ? kPickerView_DisappearanceAnimationDuration : 0.0), delay: (animated ? kPickerView_DisappearanceAnimationDelay : 0.0), options: (animations as! UIViewAnimationOptionCurveEaseInOut), {() -> Void in
weakSelf!.pickerViewContainerView.transform = CGAffineTransform(translationX: 0, y: kPickerView_Height)
}, completion: {(finished: Bool) -> Void in
、このような何かを試してみてください。
出典
2016-10-13 12:10:39
KAR
ありがとうございますが、同じ問題です。 – ilan
PickerViewに設定した制約はありますか? –
trailing、leading、height、top、bottom – ilan