topLayoutGuide
属性已弃用,现在我们必须使用safeAreaLayoutGuide
(https://developer.apple.com/documentation/uikit/uiviewcontroller/1621367-toplayoutguide)。
如何使用safeAreaLayoutGuide.layoutFrame.origin.y
定位< topLayoutGuide
来获取/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
public static void main (String[] args) throws java.lang.Exception
{
Scanner in = new Scanner(System.in);
int num1;
int num2;
num1 = in.nextInt();
num2 = in.nextInt();
for(int i = num1; i <= num2; i++)
{
System.out.print(i + " is evenly divisible by ");
for(int j = 1; j <= i; j++)
{
if (i % j == 0)
{
System.out.print(j + " ");
}
}
System.out.println();
}
}
}
的值iOS 11?
答案 0 :(得分:0)
我设法使用self.view.layoutMarginsGuide.layoutFrame.origin.y * self.view.layoutMarginsGuide.layoutFrame.origin.x
获得相同的值。