SDL_HINT_IOS_HIDE_HOME_INDICATOR(3)

πŸ’– SDL_HINT_IOS_HIDE_HOME_INDICATOR πŸ’–

okay bestie, gather round, because today we're talking about SDL_HINT_IOS_HIDE_HOME_INDICATOR β€” it lives in the SDL3 functions fam, and it's the variable that decides whether that lil home indicator bar on iPhone X and everything after it gets hidden or not. iconic behavior, honestly πŸ“


✨ NAME ✨

SDL_HINT_IOS_HIDE_HOME_INDICATOR β€” a variable controlling whether the home indicator bar on iPhone X and later should be hidden. that's it, that's the whole job πŸ’…


🌸 SYNOPSIS 🌸

#include <SDL3/SDL_hints.h>

#define SDL_HINT_IOS_HIDE_HOME_INDICATOR "SDL_IOS_HIDE_HOME_INDICATOR"

like yes, you literally #include the header and the #define is right there, no cap 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

so the variable can be set to these values, and each one is a whole different vibe:

  • "0" β€” the indicator bar is not hidden. this is the default for windowed applications. she's just there. existing. minding her business 😌
  • "1"... wait no, "1" β€” the indicator bar is hidden, and it pops back up when the screen gets touched. super useful for movie playback applications 🎬 because nothing ruins a cinematic moment like a lil bar, and then boom, tap the screen, she's visible again.
  • "2" β€” the indicator bar is dim, and the first swipe makes it visible, and then the second swipe performs the "home" action. this is the default for fullscreen applications. two swipes, two jobs, main character energy πŸ”₯

and the best part? this hint can be set anytime. no timing restrictions, no waiting around, she's flexible like that ⭐


πŸ‘‘ AVAILABILITY πŸ‘‘

this hint is available since SDL 3.2.0. so if you're on anything older, sorry bestie, it's giving not-yet 😭


lowkey reminder: those defaults are doing a lot of heavy lifting β€” "0" for windowed, "2" for fullscreen β€” so if you don't set anything, that's what you get, fr fr πŸ™ˆ

and that's the whole page, babe πŸ’œ brought to you by Simple Directmedia Layer, running SDL 3.4.18, page dated and signed off in true SDL_HINT_IOS_...OME_INDICATOR(3) fashion. slay, go hide that bar (or don't) πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from