Swift Library based on AVFoundation that allow to easily add camera feature with custom UI into your project.

Overview

Would you like to create your camera same as Snapchat or Instagram? I think this library could help you. Basicly it is a wrapper above AVFoundation that allows you to use camera feature without extra setup. Build your own UI with buttons/sliders/anything else exactly like you want and just assign appropriate actions to them.

Library is under development, so I will appreciate your suggestions, bug reports and stars ;)

How to install

Just drag and drop files from Source folder into project

How to use

Look into example project first. Then add private var cameraManager: TCCoreCamera? property into UIViewController

and setup TCCoreCamera with appropriate UIView

self.cameraManager = TCCoreCamera(view: self.view)
self.cameraManager?.completion = { (fileURL) in
    self.saveInPhotoLibrary(with: fileURL)
    print("finished writing to \(fileURL.absoluteString)")
}
self.cameraManager?.photoCompletion = { [weak self] (image) in
    do {
        try PHPhotoLibrary.shared().performChangesAndWait {
            PHAssetChangeRequest.creationRequestForAsset(from: image)
        }
        self?.setupStartButton()
    } catch {
        print(error.localizedDescription)
    }
}

Now create all buttons you need and assign TCCoreCamera actions to them

Actions and properties

  • startRecording() - start video recording/take photo
  • stopRecording() - stop video recording
  • flip() - flip btw front/back camera
  • zoomIn() - increase camera zoom
  • zoomOut() - decrease camera zoom
  • isRecording - show if camera is already recording video or not
  • camereType - set camera to .photo or .video mode
  • videoCompletion - get result of video recording
  • photoCompletion - get result of photo capturing

Contributing to this project

If you have feature requests or bug reports, feel free to help out by sending pull requests or create issues.

License

This code is distributed under the terms and conditions of the MIT license.

You might also like...
Applozic UI Kit in Swift
Applozic UI Kit in Swift

Official iOS Swift SDK for Chat πŸ’¬ Introduction πŸŒ€ Applozic brings real-time engagement with chat, video, and voice to your web, mobile, and conversat

Simple sample of using the VIP (Clean Swift) architecture for iOS

MyAnimeList Simple sample of using the VIP (Clean Swift) architecture for iOS. ViewController: controls the event handling, view life cycle and displa

Swift audio synthesis, processing, & analysis platform for iOS, macOS and tvOS
Swift audio synthesis, processing, & analysis platform for iOS, macOS and tvOS

AudioKit AudioKit is an audio synthesis, processing, and analysis platform for iOS, macOS (including Catalyst), and tvOS. Installation To add AudioKit

A Swift mailing list client for iPhone and iPad
A Swift mailing list client for iPhone and iPad

Due to costs and lack of interest, I’ve had to take down the Charter service. If you’re interested in running your own copy, get in touch and I can se

2048 for Swift

swift-2048 A working port of iOS-2048 to Apple's new Swift language. Like the original Objective-C version, swift-2048 does not rely upon SpriteKit. S

▢️ video player in Swift, simple way to play and stream media on iOS/tvOS

Player Player is a simple iOS video player library written in Swift. Looking for an obj-c video player? Check out PBJVideoPlayer (obj-c). Looking for

SushiMarketingApp - Sushi Marketing App Built With Swift
SushiMarketingApp - Sushi Marketing App Built With Swift

SushiMarketingApp Sushi E-Commerce App Language: Swift and Objective-C Database:

TwitchIRC - A Swift package for parsing/serializing Twitch IRC messages

TwitchIRC A Swift package to take of parsing/serializing Twitch IRC messages for

A camera app we will dive deep into AVFoundation library
A camera app we will dive deep into AVFoundation library

Camera App In this project you are going to discover few concepts in Swift that I've been working on for few weeks, Core Animations with CAShape Layer

Custom camera with AVFoundation. Beautiful, light and easy to integrate with iOS projects.

🚨 Warning This repository is DEPRECATED and not maintained anymore. Custom camera with AVFoundation. Beautiful, light and easy to integrate with iOS

Library for iOS Camera API. CameraKit helps you add reliable camera to your app quickly.
Library for iOS Camera API. CameraKit helps you add reliable camera to your app quickly.

CameraKit helps you add reliable camera to your app quickly. Our open source camera platform provides consistent capture results, service that scales, and endless camera possibilities.

Camera engine for iOS, written in Swift, above AVFoundation. :monkey:
Camera engine for iOS, written in Swift, above AVFoundation. :monkey:

🌟 The most advanced Camera framework in Swift 🌟 CameraEngine is an iOS camera engine library that allows easy integration of special capture feature

A fully customisable and modern camera implementation for iOS made with AVFoundation.
A fully customisable and modern camera implementation for iOS made with AVFoundation.

Features Extremely simple and easy to use Controls autofocus & exposure Customizable interface Code-made UI assets that do not lose resolution quality

TransartistryApp is an application that will allow you to transform your photos and images into paintings of great artists
TransartistryApp is an application that will allow you to transform your photos and images into paintings of great artists

TransartistryApp TransartistryApp is an application that will allow you to transform your photos and images into paintings of great artists. Descripti

Allow users to easily share Diagnostics with your support team to improve the flow of fixing bugs.
Allow users to easily share Diagnostics with your support team to improve the flow of fixing bugs.

Example mail composer Example Report Diagnostics is a library written in Swift which makes it really easy to share Diagnostics Reports to your support

JSONHelper - ✌ Convert anything into anything in one operation; JSON data into class instances, hex strings into UIColor/NSColor, y/n strings to booleans, arrays and dictionaries of these; anything you can make sense of!

JSONHelper Convert anything into anything in one operation; hex strings into UIColor/NSColor, JSON strings into class instances, y/n strings to boolea

Instagram-like photo browser and a camera feature with a few line of code in Swift.
Instagram-like photo browser and a camera feature with a few line of code in Swift.

Fusuma is a Swift library that provides an Instagram-like photo browser with a camera feature using only a few lines of code.

Instagram-like photo browser and a camera feature with a few line of code in Swift.
Instagram-like photo browser and a camera feature with a few line of code in Swift.

NOTE: This project is no longer maintained. We highly recommend YPImagePicker. Fusuma Fusuma is a Swift library that provides an Instagram-like photo

High-performance and flexible video editing and effects framework, based on AVFoundation and Metal.
High-performance and flexible video editing and effects framework, based on AVFoundation and Metal.

High-performance and flexible video editing and effects framework, based on AVFoundation and Metal.

Owner
Taras Chernyshenko
Software Developer
Taras Chernyshenko
An iOS widget-based HN reader

Benuse, an iOS widget-based HN reader Why did you build this app? There already exist some great native Hacker News clients for iOS. I would recommend

Jordan Mann 8 Jul 21, 2022
Learn Swift interactively on your iPhone.

Unwrap is an app that helps you learn Swift faster and more effectively. At its core lies almost 100 video lessons that teach all the fundamentals of

Paul Hudson 2.1k Dec 29, 2022
A calculator for your Apple Watch but only if you have fingers small enough to press the buttons.

AppleWatchCalculator A calculator for your Apple Watch but only if you have fingers small enough to press the buttons. A very simple calculator on you

Patrick Balestra 148 Dec 21, 2022
Firefox for iOS, branch works with Xcode 12.5.1, Swift 5.4.2 and supports iOS 11.4 and above.

Firefox for iOS Download on the App Store. This branch (main) This branch works with Xcode 12.5.1, Swift 5.4.2 and supports iOS 11.4 and above. Please

Mozilla Mobile 11.2k Jan 7, 2023
Fully open source text editor for iOS written in Swift.

Edhita Fully open source text editor for iOS written in Swift. http://edhita.bornneet.com/ What Edhita means? Edhita (Romaji) == エディタ (Katakana) == Ed

Tatsuya Tobioka 1.2k Jan 7, 2023
30 mini Swift Apps for self-study

Swift 30 Projects Contents This repo is updated with Swift 5 and compatible with iPhone X: Simple UIKit components UIScrollView, UITableView, UICollec

Soap 7.5k Jan 3, 2023
A Hacker News reader in Swift

SwiftHN A Hacker News reader in Swift using the best features of both the language and iOS 8 latest API (well, that's the end goal) SwiftHN is now ava

Thomas Ricouard 1.7k Dec 24, 2022
Build a Swift App as a designer

DesignerNewsApp Simple iOS client for Designer News, by the creator of Design+Code and the team, written in Swift. Usage Download the repository $ git

Meng To 2.4k Dec 24, 2022
swift implementation of flappy bird. More at fullstackedu.com

FlappySwift An implementation of Flappy Bird in Swift for iOS 8. Notes We're launching a course Game Programming with Swift If you are interested in e

newline (formerly Fullstack.io) 9.5k Dec 29, 2022
Basic app to show how to login with Facebook, Google, Twitter. Created for learning purpose :) using Xcode 9 and Swift 4.0

Social Logins iOS Basic app to show how to login with Facebook, Google, Twitter. Created for learning purpose :) using Xcode 9 and Swift 4.0 Note: Bef

Jogendra 12 Nov 4, 2022