我正在使用iqkeyboardmanager
来管理应用程序中的键盘。当我点击UITextfield对其进行编辑时,应用程序崩溃并显示以下消息:
public static void main(String[] args) {
// write your code here
Scanner scanner = new Scanner(System.in);
// We assume there are at least 2 input numbers.
int max = 0;
int min = 0;
int first = scanner.nextInt();
int second = scanner.nextInt();
if (first > second) {
max = first;
min = second;
}
else {
max = second;
min = first;
}
while (true ) {
System.out.println("Enter Number");
boolean isNext = scanner.hasNextInt();
if (isNext) {
int NewMax = scanner.nextInt();
if (NewMax > max) {
max = NewMax;
}
if (NewMax < min) {
min = NewMax;
}
}
else {
break;
}
scanner.nextLine();
}
System.out.println("max " + max + "min " + min);
scanner.close();
}
这在模拟器中可以正常运行,但会导致应用崩溃,并在设备上出现上述错误。该应用程序在模拟器和禁用-[UIWindow actualSceneBounds]: unrecognized selector sent to instance 0x106c0d210
libc++abi.dylib: terminating with uncaught exception of type NSException
的设备上均可正常运行。