skip to Main Content

Ios swift – Enable/Disable Screen Capture in iOS

I am able to disable screen capture in iOS using this code Objective- C - (void)makeSecure { dispatch_async(dispatch_get_main_queue(), ^{ UITextField *field = [[UITextField alloc] init]; field.secureTextEntry = true; [self addSubview:field]; [[field.centerYAnchor constraintEqualToAnchor:self.centerYAnchor] setActive:YES]; [[field.centerXAnchor constraintEqualToAnchor:self.centerXAnchor] setActive:YES]; [self.layer.superlayer addSublayer:field.layer]; [field.layer.sublayers.firstObject addSublayer:self.layer];…

VIEW QUESTION

Xcode – How can I wrap Objective-C code for visionOS only?

I have the following code in Objective-C: if (@available(iOS 13.0, tvOS 13.0, *)) { indicator.indicatorView.activityIndicatorViewStyle = UIActivityIndicatorViewStyleLarge; } else { indicator.indicatorView.activityIndicatorViewStyle = UIActivityIndicatorViewStyleWhiteLarge; } But this is producing an error. 'UIActivityIndicatorViewStyleWhiteLarge' is unavailable: not available on xrOS I think I…

VIEW QUESTION
Back To Top
Search