Technically, everything that is in memory can be detected on a jailbroken device. Hiding sensitive ideas outside of what is currently displayed is not a security measure. After the device is locked, the views and the contents of these views will be displayed. Even if you have a password text field set as "secureTextEntry", and even if you hide it, the contents can be read using a debugger attached to the application if the text field is not freed. And even when the text field is freed, the memory can be flushed, and if this memory has not been redefined, you can find the contents of this view.
Now, if you're not worried about the Jailbroken script, and want to find other options when someone who doesn't have a jailbroken device can explore the views, you should probably check Accessibility features included in iOS . VoiceOver will be able to read loud text that is hidden if accessibility in this view is not disabled properly. Removing views from accessibility tools is sometimes difficult because changing a parent can affect all subitems (read the UIAccessibility documentation )
Setting accessibilityElementsHidden to YES in the parent view or isAccessibilityElement to NO in the view should work.
source share