0

现在我只使用一个viewController作为我的主菜单。但这带来了几个问题,我想将 mypopUpViewviewController. 在图片中,您可以看到它现在的样子。我现在的问题是我希望 popUpView 稍微透明(如您在图片中看到的那样),因此您仍然可以在背景中看到 mainMenue。目前我只是使用.alpha-attribute 让 popUpView 出现和消失。知道如何用两个来实现这一点ViewControllers吗?

在此处输入图像描述 在此处输入图像描述

   // set the closure
   cell.tapCallback = {

    self.listNameTextfield.becomeFirstResponder()

    UIView.animate(withDuration: 0.5) {
        self.blurrImage.alpha = 0.96
        self.newListView.alpha = 1
        self.newListTextfield.alpha = 1
        self.view.layoutIfNeeded()
    }


@IBAction func closeButtonTappedNewList(_ sender: Any?) {
    self.newListTextfield.resignFirstResponder()
    self.listNameTextfield.text = ""
    UIView.animate(withDuration: 0.25) {
        self.blurrImage.alpha = 0
        self.newListView.alpha = 0
        self.newListTextfield.alpha = 0
        self.view.layoutIfNeeded()
    }
}
4

0 回答 0