Awalz / SwiftyCam

A Snapchat Inspired iOS Camera Framework written in Swift
BSD 2-Clause "Simplified" License
2.08k stars 326 forks source link

(SOLVED) [SwiftyCam]: Cannot take photo. Capture session is not running #199

Closed andrevinic closed 5 years ago

andrevinic commented 5 years ago

[SWIFT 4.2] I've set all the delegates and methods,

but when I press the button to take photo, it says "[SwiftyCam]: Cannot take photo. Capture session is not running" in the log console.

Does anyone know the solution?

miaotaoii commented 5 years ago

same question!!

miaotaoii commented 5 years ago

I hava find solution : do not override the viewWillApperare() method in your view controller

andrevinic commented 5 years ago

Awesome, @miaotaoii

It worked for me also, I had viewWillAppear and I removed it. Worked. Thank you!

Maybe we could try to search this bug in the framework and help them fixing it?

miaotaoii commented 5 years ago

actually,it's our mistake, we must add "super.viewWillAppear(animated)" in our method like this ,

override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) // your code ... }, that because , the code about start session has implemented at parent view controller

andrevinic commented 5 years ago

Hum, thats right.. Great one, dude! Em quarta-feira, 20 de fevereiro de 2019 22:45:46 BRT, miaotaoii notifications@github.com escreveu:

actually,it's our mistake, we must add "super.viewWillAppear(animated)" in our method like this ,

override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) // your code ... }, that because , the code about start session has implemented at parent view controller

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or mute the thread.

farhanulhaq075 commented 3 years ago

I hava find solution : do not override the viewWillApperare() method in your view controller

Very Helpful Thanks for the Help !