如何修复"无法同时满足约束"在我的AVPlayer控制器上?视图没有约束(添加到故事板的AVPlayer)。它是来自地图注释按钮的segue - 并且AVplayer segue被添加到故事板中并命名为“showChosenMovie”。
我还添加了' self.view.translatesAutoresizingMaskIntoConstraints = false;
{
"name": "Proj",
"version": "0.1.0",
"description": "",
"main": "index.js",
"scripts": {
"heroku-postbuild": "bower install && gulp prod"
},
"author": "",
"license": "ISC",
"devDependencies": {
"babel-preset-es2015": "^6.18.0",
"concurrently": "^2.2.0",
"gulp": "^3.9.1",
"gulp-babel": "^6.1.2",
"gulp-concat": "^2.6.0",
"jasmine-core": "^2.4.1",
"karma": "^1.1.2",
"karma-coverage": "^1.1.1",
"karma-jasmine": "^1.0.2",
"karma-phantomjs-launcher": "^1.0.1",
"mkdirp": "^0.5.1"
},
"dependencies": {
"bower": "^1.7.9",
"colors": "^1.1.2",
"compression": "^1.6.2",
"es6-promise": "^3.2.1",
"express": "^4.14.0",
"fb-watchman": "^1.9.0",
"gulp": "^3.9.1",
"gulp-autoprefixer": "^3.1.1",
"gulp-concat": "^2.6.0",
"gulp-minify-css": "^1.2.4",
"gulp-ng-annotate": "^2.0.0",
"gulp-plumber": "^1.1.0",
"gulp-sass": "^2.3.2",
"gulp-sourcemaps": "^1.6.0",
"gulp-tap": "^0.1.3",
"gulp-uglify": "^2.0.0",
"request": "^2.74.0",
"uglify-js": "^2.7.4"
}
}
else if(segue.identifier ==" showChosenMovie"){
func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject!) {
if (segue.identifier == "addNewEntry") {
let controller = segue.destinationViewController as! AddNewEntryController
let specimenAnnotation = sender as! SpecimenAnnotation
controller.selectedAnnotation = specimenAnnotation
}
控制台注意到:
let destination = segue.destinationViewController as!
AVPlayerViewController
self.view.translatesAutoresizingMaskIntoConstraints = false