unsafe fn pin_to_parent(parent_id: id, webview_id: id) {
    let _: () = msg_send![webview_id, setTranslatesAutoresizingMaskIntoConstraints: NO];

    let mut constraints: Vec<id> = vec![];

    {
        let parent_anchor: id = msg_send![parent_id, leftAnchor];
        let target_anchor: id = msg_send![webview_id, leftAnchor];
        let constraint: id =
            msg_send![parent_anchor, constraintEqualToAnchor: target_anchor constant: 0.0];
        constraints.push(constraint)
    }
    {
        let parent_anchor: id = msg_send![parent_id, rightAnchor];
        let target_anchor: id = msg_send![webview_id, rightAnchor];
        let constraint: id =
            msg_send![parent_anchor, constraintEqualToAnchor: target_anchor constant: 0.0];
        constraints.push(constraint)
    }
    {
        let parent_anchor: id = msg_send![parent_id, topAnchor];
        let target_anchor: id = msg_send![webview_id, topAnchor];
        let constraint: id =
            msg_send![parent_anchor, constraintEqualToAnchor: target_anchor constant: 0.0];
        constraints.push(constraint)
    }
    {
        let parent_anchor: id = msg_send![parent_id, bottomAnchor];
        let target_anchor: id = msg_send![webview_id, bottomAnchor];
        let constraint: id =
            msg_send![parent_anchor, constraintEqualToAnchor: target_anchor constant: 0.0];
        constraints.push(constraint)
    }

    let bundle = NSArray::arrayWithObjects(nil, &constraints);
    NSLayoutConstraint::activateConstraints(nil, bundle);
}
/// Pin one NSView to a parent NSView so it'll resize to fit it
Pin one NSView to a parent NSView so it'll resize to fit it
Pin one NSView to a parent NSView so it ' ll resize to fit it
unsafe fn pin_to_parent(parent_id: id, webview_id: id) {
    let _: () = msg_send![webview_id, setTranslatesAutoresizingMaskIntoConstraints: NO];
    let mut constraints: Vec<id> = vec![];
    {
        let parent_anchor: id = msg_send![parent_id, leftAnchor];
        let target_anchor: id = msg_send![webview_id, leftAnchor];
        let constraint: id =
            msg_send![parent_anchor, constraintEqualToAnchor: target_anchor constant: 0.0];
        constraints.push(constraint)
    }
    {
        let parent_anchor: id = msg_send![parent_id, rightAnchor];
        let target_anchor: id = msg_send![webview_id, rightAnchor];
        let constraint: id =
            msg_send![parent_anchor, constraintEqualToAnchor: target_anchor constant: 0.0];
        constraints.push(constraint)
    }
    {
        let parent_anchor: id = msg_send![parent_id, topAnchor];
        let target_anchor: id = msg_send![webview_id, topAnchor];
        let constraint: id =
            msg_send![parent_anchor, constraintEqualToAnchor: target_anchor constant: 0.0];
        constraints.push(constraint)
    }
    {
        let parent_anchor: id = msg_send![parent_id, bottomAnchor];
        let target_anchor: id = msg_send![webview_id, bottomAnchor];
        let constraint: id =
            msg_send![parent_anchor, constraintEqualToAnchor: target_anchor constant: 0.0];
        constraints.push(constraint)
    }
    let bundle = NSArray::arrayWithObjects(nil, &constraints);
    NSLayoutConstraint::activateConstraints(nil, bundle);
}
unsafe fn pin_to_parent ( parent_id : id , webview_id : id ) { let _ : ( ) = msg_send ! [ webview_id setTranslatesAutoresizingMaskIntoConstraints NO ] ; let mut constraints : Vec < id > = vec ! [ ] ; { let parent_anchor : id = msg_send ! [ parent_id leftAnchor ] ; let target_anchor : id = msg_send ! [ webview_id leftAnchor ] ; let constraint : id = msg_send ! [ parent_anchor constraintEqualToAnchor target_anchor constant 0.0 ] ; constraints . push ( constraint ) } { let parent_anchor : id = msg_send ! [ parent_id rightAnchor ] ; let target_anchor : id = msg_send ! [ webview_id rightAnchor ] ; let constraint : id = msg_send ! [ parent_anchor constraintEqualToAnchor target_anchor constant 0.0 ] ; constraints . push ( constraint ) } { let parent_anchor : id = msg_send ! [ parent_id topAnchor ] ; let target_anchor : id = msg_send ! [ webview_id topAnchor ] ; let constraint : id = msg_send ! [ parent_anchor constraintEqualToAnchor target_anchor constant 0.0 ] ; constraints . push ( constraint ) } { let parent_anchor : id = msg_send ! [ parent_id bottomAnchor ] ; let target_anchor : id = msg_send ! [ webview_id bottomAnchor ] ; let constraint : id = msg_send ! [ parent_anchor constraintEqualToAnchor target_anchor constant 0.0 ] ; constraints . push ( constraint ) } let bundle = NSArray :: arrayWithObjects ( nil , & constraints ) ; NSLayoutConstraint :: activateConstraints ( nil , bundle ) ; }
Pin one NSView to a parent NSView so it'll resize to fit it
Pin one NSView to a parent NSView so it ' ll resize to fit it
parent_id
id
webview_id
id
parent_id
id
webview_id
id