天蓬老师2017-04-18 09:38:10
蘋果文件:
"this method may be called frequently, your implementation should be efficient to prevent capture performance problems, including dropped metadata objects."
所以控制掃描次數的事兒需要咱們開發者處理了。 。 。
巴扎黑2017-04-18 09:38:10
不知道為什麼iphone5 的掃一掃功能與其他機型不太一樣, iphone5的相機功能在沒有完全退出的時候 會重複調用這個方法- (void)captureOutput:(AVCaptureOutput *)captureOutput didOutputMetadataObjects:(NSArray *)metadataObjects fromConnection:(AVCaptureConnection *)connection
,
掃出來的 stringValue 是一個網址
1 |
|
但是多次呼叫問題會出現掃出空值,stringValue會變成空值,導致崩潰