Skip to content

eonist/ZoomSwitcherKit

Repository files navigation

codebeat badge

ZoomSwitcherKit

ZoomSwitcher for different iPhone back-camera types (single, dual, triple)

Installation:

  • SPM: .package(url: "https://github.com/eonist/ZoomSwitcherKit.git", .branch("master"))

Examples:

let backCamType: BackCameraType = .backCameraType
let size = ZoomSwitcher.getSize(backCamType: backCamType)
let zoomSwitcher: ZoomSwitcher = .init(frame: .init(origin: .zero, size: size), backCameraType: backCamType) zoomSwitcher.anchorAndSize(to: self, size: size)
zoomSwitcher.buttons[backCamType.defaultLenseIndex].toggle = true
addSubview(zoomSwitcher)
zoomSwitcher.onSwitch = { focalType in
   Swift.print("Switched to focalType:  \(focalType)")
}

Todo

  • add spm and github actions

About

ZoomSwitcher for different iPhones

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages