0

Many social media apps have a tab bar with a camera option in the middle. I want to implement this feature in my own UITabViewController I have succeeded to launch the camera when the Tab Bar Item is touched with the below code.

override func tabBar(tabBar: UITabBar, didSelectItem item: UITabBarItem!) {

    if item.title! == "Camera" {
        launchCamera()
    }
}

However, I am still new to swift and iOS development and I don't know if this is the best way to do this. Any guidance would be greatly appreciated. Also, Once I do take the picture how do I go back to the tab I was at. Thank you in advance

Derek Dawson
  • 502
  • 5
  • 14

1 Answers1

1

The best way to access devices is using AVFoundation library. See https://stackoverflow.com/a/28892280/2332284

I hope it helps you

Community
  • 1
  • 1
Landaida
  • 134
  • 2
  • 8