diff --git a/include/Utils/IosApi/IosApi.h b/include/Utils/IosApi/IosApi.h index 3290e38..9bb0fb8 100644 --- a/include/Utils/IosApi/IosApi.h +++ b/include/Utils/IosApi/IosApi.h @@ -25,5 +25,7 @@ void IosSwitchToScreen(); void ShowKeyboard(std::string text); void HideKeyboard(); + + bool IsIpad(); } //namespace SE diff --git a/src/Utils/IosApi/IosApi.mm b/src/Utils/IosApi/IosApi.mm index 1bb16d7..8455bc2 100644 --- a/src/Utils/IosApi/IosApi.mm +++ b/src/Utils/IosApi/IosApi.mm @@ -82,6 +82,14 @@ void SetKeyboardText(const char* newText) //GuiManagerSetKeyboardText(newText); //NSLog(@"text: %s", newText); } + + bool IsIpad() +{ + if ( UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad ) + { + return YES; /* Device is iPad */ + } +} } //namespace SE