How do I use the metadataOutputRectOfInterestForRect method and rectOfInterest property to scan a specific area? (QR Code)

I wasn’t really able to clarify the issue with metadataOutputRectOfInterestForRect, however, you can directly set the property as well. You need to the have the resolution in width and height of your video, which you can specify in advance. I quickly used the 640*480 setting. As stated in the documentation, these values have to be … Read more

Warning: UICollectionViewFlowLayout has cached frame mismatch for index path ‘abc’

This is likely occurring because the flow layout “xyz” is modifying attributes returned by UICollectionViewFlowLayout without copying them And sure enough, that’s just what you are doing: private override func layoutAttributesForItemAtIndexPath(indexPath: NSIndexPath) -> UICollectionViewLayoutAttributes? { let attributes = super.layoutAttributesForItemAtIndexPath(indexPath) let distance = CGRectGetMidX(attributes!.frame) – self.midX; var transform = CATransform3DIdentity; transform = CATransform3DTranslate(transform, -distance, 0, -self.width); … Read more

How can I set the UINavigationbar with gradient color?

Details Xcode 11.4 (11E146), swift 5 Tested on iOS 13.1, 12.2, 11.0.1 Solution class UINavigationBarGradientView: UIView { enum Point { case topRight, topLeft case bottomRight, bottomLeft case custom(point: CGPoint) var point: CGPoint { switch self { case .topRight: return CGPoint(x: 1, y: 0) case .topLeft: return CGPoint(x: 0, y: 0) case .bottomRight: return CGPoint(x: 1, … Read more

Checkbox in iOS application

this has been driving me mad too and I found a different solution that works well for me and avoids having to use images. Add a new label object to Interface Builder. Create an IBOutlet property in Xcode and connect it up to it. In the code below I’ve called it ‘fullyPaid’ as I want … Read more

How to Install Older iOS Simulators in XCode 4.2.1 (SDK5.0)

X-Code 4.2 will have iOS 5 simulator and library only. If you want lower version simulator and library with X-Code just goto X-Code->Prefrences-> Downloads Tab. In downloads tab you’ll have two tabs: 1) Components – Here you will have option to download iOS 4.3 simulator(~600 Mb), iOS 4.0-4.1(~670 MB) Device debugging support, iOS 3.0-3.2.2(686.3 MB) … Read more

iOS11 photo library access is possible even if settings are set to “never”

Okay, you can sort of piece this together from answers and comments already, but to try to tell a more complete story… In iOS 11, UIImagePickerController runs as a separate process from your app. That means: Your app can’t see the user’s whole Photos library — it gets read-only access just for whichever asset(s) the … Read more

tech