yannickl / QRCodeReader.swift

Simple QRCode reader in Swift
MIT License
1.33k stars 330 forks source link

How to lock the QR reader orientation in portrait mode? #141

Open zachmattopo opened 6 years ago

zachmattopo commented 6 years ago

I tried with locking the view controller that it was presented over, and some bugs were found with the camera viewfinder (sudden zoom in, panning camera one way will pan it the other way etc.). Thanks a bunch!

yannickl commented 6 years ago

Do you want to specifically lock the ReaderView or your application is locked to the portrait mode?

By default the library uses the the supported interface orientation of the app (key window): https://github.com/yannickl/QRCodeReader.swift/blob/master/Sources/QRCodeReaderView.swift#L154-L156.

zachmattopo commented 6 years ago

Thanks for replying yannickl. My app is supporting all orientations but I want to specifically lock the ReaderView to portrait mode. Any hints?