This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// DownloadManager.swift | |
// UrlCacheExample | |
// | |
// Created by Coder ACJHP on 12.04.2019. | |
// Copyright © 2019 Onur Işık. All rights reserved. | |
// | |
import UIKit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// TinderLikeAnimation.swift | |
// | |
// Created by Coder ACJHP on 2.05.2019. | |
// Copyright © 2019 Onur Işık All rights reserved. | |
// | |
import UIKit | |
class TinderLikeAnimation: UIViewController { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// CarouselViewController.swift | |
// | |
// Created by Onur Işık on 2.05.2019. | |
// Copyright © 2019 Fitbest Bilgi Teknolojileri A.Ş. All rights reserved. | |
// | |
import UIKit | |
class CarouselViewController: UIViewController { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
class TestViewController: UIViewController { | |
private var timer: Timer? | |
private var circleShapeCount: Int = 0 | |
private var scaleAnimation: CABasicAnimation? = { | |
let animation = CABasicAnimation(keyPath: "transform.scale") | |
animation.fromValue = 0.80 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ChallengeViewController.swift | |
// Challenge | |
// | |
// Created by Coder ACJHP on 27.06.2019. | |
// Copyright © 2019 Fitbest Bilgi Teknolojileri. All rights reserved. | |
// | |
import UIKit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// MultipleTapableAttributedStringTextView.swift | |
// TapOnAttributedText | |
// | |
// Created by Onur Işık on 18.09.2019. | |
// Copyright © 2019 Onur Işık. All rights reserved. | |
// | |
import UIKit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fileprivate func drawFaceFrame(sampleBuffer: CMSampleBuffer) { | |
let pixelBuffer = CMSampleBufferGetImageBuffer(sampleBuffer) | |
let cameraImage = CIImage(cvPixelBuffer: pixelBuffer!) | |
let faces = faceDetector?.features(in: cameraImage) | |
// For converting the Core Image Coordinates to UIView Coordinates | |
let ciImageSize = cameraImage.extent.size | |
var transform = CGAffineTransform(scaleX: 1, y: -1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private func drawFaceRectangle(sampleBuffer: CMSampleBuffer, detectedFaceRect: CGRect) { | |
let pixelBuffer = CMSampleBufferGetImageBuffer(sampleBuffer) | |
let cameraImage = CIImage(cvPixelBuffer: pixelBuffer!) | |
// For converting the Core Image Coordinates to UIView Coordinates | |
let ciImageSize = cameraImage.extent.size | |
var transform = CGAffineTransform(scaleX: 1, y: -1) | |
transform = transform.translatedBy(x: 0, y: -ciImageSize.height) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// AnimationView.swift | |
// autofix | |
// | |
// Created by Onur Işık on 31.03.2020. | |
// Copyright © 2020 Coder ACJHP. All rights reserved. | |
// | |
import UIKit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// Update image RGB colors with sliders | |
public func updateImageColorsWith(multiplier: [CGFloat], of: UIImage) -> UIImage { | |
guard let inputCGImage = of.cgImage else { | |
print("Unable to get cgImage") | |
return of | |
} | |
let colorSpace = CGColorSpaceCreateDeviceRGB() | |
let width = inputCGImage.width |