Skip to content

QuestPlayingViewController imageView Constraint Conflict #32

@israbbani

Description

@israbbani

In the QuestPlayingViewController, setting the width of the image to 0 is being done by subtracting a constant from it. Autolayout doesn't like this

2016-02-16 14:34:03.920 Carleton150[209:6461] Unable to simultaneously satisfy constraints.
    Probably at least one of the constraints in the following list is one you don't want. 
    Try this: 
        (1) look at each constraint and try to figure out which you don't expect; 
        (2) find the code that added the unwanted constraint or constraints and fix it. 
(
    "<NSLayoutConstraint:0x196ce200 UIImageView:0x196d8b00.width == 0.65*UIView:0x196ce230.width - 390>",
    "<NSLayoutConstraint:0x196e4d60 H:[UIView:0x196ce230]-(0)-|   (Names: '|':UIView:0x196e4420 )>",
    "<NSLayoutConstraint:0x196e4d90 UIView:0x196ce230.centerX == UIView:0x196e4420.centerX>",
    "<NSLayoutConstraint:0x196edc60 'UIView-Encapsulated-Layout-Width' H:[UIView:0x196e4420(320)]>"
)

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x196ce200 UIImageView:0x196d8b00.width == 0.65*UIView:0x196ce230.width - 390>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions