iOS:使用Storyboard中的自动布局进行图像缩放

时间:2016-06-07 13:05:38

标签: ios autolayout storyboard

我有一个启动画面,右下角有一个图像。约束条件如下:

  1. 宽度:UIImageView的宽度必须是superview的四分之一。
  2. 左:使用superview
  3. ,左边距为零
  4. 底部:使用superview
  5. ,底部边距为零

    并且imageview的模式也设置为Aspect Fit

    高度约束应该是什么,以便image中的UIImageView在所有设备和所有方向的底部对齐。

    6S Plus landscape

    6s Plus portrait

    在屏幕截图中,虽然imageimageview,但<div class="row"> <div id="content-a"> <div class='content-row'> <div class="select_1 col-md-12"> <span> <select class="form-control" name="table_names" id="slctTable"> </select> </span> </div> </div> </div> </div> <div class="row"> <div class="select_2 col-md-12"> <span> <select class="form-control" name="column_names" id="slctField"> </select> </span> </div> </div> <div class="row"> <div class="select_3 col-md-3"> <span> <select class="form-control" name="comparisonOperators" id="slctOperator"> </select> </span> </div> <div class="select_4 col-md-9"> <span> <select class="form-control" name="attribute_names" id="slctAttribute"> </select> </span> </div> </div> 并非底部对齐。

    enter image description here

1 个答案:

答案 0 :(得分:2)

因此我的问题的解决方案是<?php //connection to db $mysqli = new mysqli("localhost", "root", "", "my_db"); if (mysqli_connect_errno()) { //verify connection echo "Error to connect to DBMS: ".mysqli_connect_error(); //notify error exit(); //do nothing else } else { //echo "Successful connection"; // connection ok $devices =json_decode($_POST['re']); echo var_dump($devices)."<br>"; $myArray = array();//create an array $brand = rtrim($devices["Brand"], " &"); $cost = rtrim($devices["Cost"], " &"); $os = rtrim($devices["OS"], " &"); $query = " SELECT * FROM `devices` WHERE `Brand` = '$brand' AND 'Cost' = '$cost' AND 'OS' = '$os' "; $result = $mysqli->query($query); //if there are data available if($result->num_rows >0) { while($row = $result->fetch_array(MYSQL_ASSOC)) { $myArray[] = $row; } echo json_encode($myArray); } //free result $result->close(); //close connection $mysqli->close(); } ?> 约束,并且存在所有相关约束。