" view.superview.bounds = view.bounds"的含义是什么?

时间:2016-01-08 16:45:58

标签: ios uiview super bounds

我使用第三方代码,这段代码有这样一段: view.superview.bounds = view.bounds

我不知道这意味着什么?

你能帮我吗?

1 个答案:

答案 0 :(得分:0)

c_id是您当前的观点。 Sub Ping_Check() ' Based on http://social.technet.microsoft.com/Forums/en-US/ITCG/thread/e59a38e1-eaf0-4b13-af10-fd4be559f50f/ Dim oPing As Object Dim oRetStatus As Object Dim xCell As Range Dim xLast_Row As Long Dim xWork1 As String xLast_Row = ActiveSheet.Range("A1").SpecialCells(xlLastCell).Row Application.ScreenUpdating = False For Each xCell In Range("A2:A" & xLast_Row) If xCell = "" Then xCell.Offset(0, 1) = "" Else Set oPing = GetObject("winmgmts:{impersonationLevel=impersonate}").ExecQuery("select * from Win32_PingStatus where address = '" & xCell & "'") For Each oRetStatus In oPing If IsNull(oRetStatus.StatusCode) Or oRetStatus.StatusCode <> 0 Then xCell.Offset(0, 1) = "N/A" '11001 Buffer Too Small '11002 Destination Net Unreachable '11003 Destination Host Unreachable '11004 Destination Protocol Unreachable '11005 Destination Port Unreachable '11006 No Resources '11007 Bad Option '11008 Hardware Error '11009 Packet Too Big '11010 Request Timed Out '11011 Bad Request '11012 Bad Route '11013 TimeToLive Expired Transit '11014 TimeToLive Expired Reassembly '11015 Parameter Problem '11016 Source Quench '11017 Option Too Big '11018 Bad Destination '11032 Negotiating IPSEC '11050 General Failure Else xCell.Offset(0, 1) = oRetStatus.ResponseTime & " ms ; " & oRetStatus.ResponseTimeToLive End If Next End If Next Application.ScreenUpdating = True End Sub 是currentView的父视图。

  

bounds矩形,用于描述视图在其坐标系中的位置和大小

所以这意味着您当前视图的边界被分配给它的父视图边界。完成此分配后,两个视图大小都相同。

这是一个很好的例子: https://stackoverflow.com/a/28923657/291240