我是新手,我正在尝试UIAlertContoller用,PickerView
但我有问题,巴顿斯,这里有一张照片
当我试图改变约束时按钮保持不动我在这里读了很多答案,但我没有找到任何solotuin
这是我的代码:
func distance(){
let editRadiusAlert = UIAlertController(title: "Choose distance", message: "", preferredStyle: UIAlertControllerStyle.alert)
let pickeViewFrame: CGRect = CGRect(x: 0, y: 0, width: 250, height: 300)
let pickerViewRadius: UIPickerView = UIPickerView(frame: pickeViewFrame)
pickerViewRadius.delegate = self
pickerViewRadius.dataSource = self
editRadiusAlert.view.addSubview(pickerViewRadius)
editRadiusAlert.addAction(UIAlertAction(title: "Done", style: UIAlertActionStyle.default,handler:nil))
editRadiusAlert.addAction(UIAlertAction(title: "Cancel", style: UIAlertActionStyle.cancel, handler: nil))
editRadiusAlert.view.addConstraint(NSLayoutConstraint(item: editRadiusAlert.view, attribute: NSLayoutAttribute.height, relatedBy: NSLayoutRelation.equal, toItem: nil, attribute: NSLayoutAttribute.notAnAttribute, multiplier: 1, constant: self.view.frame.height * 0.5))
self.present(editRadiusAlert, animated: true, completion: nil)
}
Run Code Online (Sandbox Code Playgroud) 不幸的是,我无法使用AWS SDK,我必须使用REST API AWS服务(我正在使用Flutter WEB)。所以我开始对 aws 文档进行研究,这就是我所做的:
创建存储桶。
将所有权限设为公开(仅用于测试)
开放接入点
然后,在邮递员处,我使用“Auth”aws 签名并添加了当前密钥,会话令牌除外(我的存储桶已打开,我知道我不需要它,如果我弄错了,请纠正我)。当我发送请求时,我收到错误:
Missing required header for this request: x-amz-content-sha256
Run Code Online (Sandbox Code Playgroud)
这是附件图片: