我正在为iPhone 6 Plus和iPhone 6s应用程序构建故事板。出于某种原因,当我在iPhone 6 Plus上运行该应用程序时,屏幕被切断,但在6s Plus上,所有内容都适合屏幕。屏幕尺寸不同吗?另外,有没有办法找出用户使用的是iPhone 6s还是6 Plus?
答案 0 :(得分:1)
您可能想要使用自动布局
https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/AutolayoutPG/
使用
调试屏幕 /* -------------------- Methods to use Maps -------------------- */
public void onMaps(View v){
// Checking if Network is available
if (!Utilities.isNetworkAvailable(this)){
showDialogFragment(NETWORK_ERR_DIALOG, "network_err_dialog");
}
else{
// Obtaining text shown by the TextEdit (it could be different from the recognized one cause user can modify it)
textToUse = companyAddress.getText().toString();
textToUse = textToUse.replace(' ', '+');
try {
Intent geoIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("geo:0,0?q=" + textToUse));
startActivity(geoIntent);
} catch (Exception e){
Toast.makeText(this, getString(R.string.maps_error), Toast.LENGTH_SHORT).show();
}
}
}
检查用户是否使用iPhone 6或6 Plus
iOS How to detect iPhone 6 plus, iPhone 6, iPhone 5 by macro?