Skip to content

Instantly share code, notes, and snippets.

View egzonpllana's full-sized avatar
:octocat:
I'm addicted to challenges

Egzon Pllana egzonpllana

:octocat:
I'm addicted to challenges
View GitHub Profile
@egzonpllana
egzonpllana / AVPlayer+UIView.swift
Last active April 11, 2023 14:21
Loading AVPlayer into UIView with Swift 5
//
// BackgroundVideoPlayerViewController.swift
// DeveloperBelt
//
// Created by Egzon Pllana on 10/7/19.
// Copyright © 2019 Native Coders. All rights reserved.
//
import UIKit
import AVFoundation
## Pods ##
SwiftLint: https://github.com/realm/SwiftLint
Alamofire: https://github.com/Alamofire/Alamofire
RealmSwift: https://github.com/realm/realm-cocoa
Crashlytics: Crashlytics
TTTAttributedLabel: https://github.com/TTTAttributedLabel/TTTAttributedLabel
SwipeCellKit: https://github.com/SwipeCellKit/SwipeCellKit
Nuke: https://github.com/kean/Nuke
SwiftLocation: https://github.com/malcommac/SwiftLocation
InfiniteScrolling: https://github.com/Vishal-Singh-Panwar/InfiniteScrolling
//
// AVPlayer+Singleton.swift
// DeveloperBelt
//
// Created by Egzon Pllana on 11/5/19.
// Copyright © 2019 Native Coders. All rights reserved.
//
import Foundation
import MediaPlayer
//
// MediaPicker.swift
// DeveloperBelt
//
// Created by Egzon Pllana on 11/5/19.
// Copyright © 2019 Native Coders. All rights reserved.
//
/* Info.plist
Privacy - Camera Usage Description
Privacy - Photo Library Usage Description
// Improved and update **Luke Chase's** [answer][1] to Swift 5, XCode 11, iOS 13 to get text view number of lines and autoresize table view cell height.
// 1) You can use storyboard with static cell height to design it as you want.
// 2) In viewDidLoad add your estimated row height and your textView delegate.
override func viewDidLoad() {
super.viewDidLoad()
quoteTextView.delegate = self
tableView.estimatedRowHeight = 142
//
// Timestamp+ReadableDate.swift
// EReminder
//
// Created by Egzon Pllana on 3/12/20.
// Copyright © 2020 Native Coders. All rights reserved.
//
import Foundation
//
// Created by Egzon Pllana on 5/15/20.
// Copyright © 2020 Native Coders. All rights reserved.
//
import UIKit
class HomeTableViewController: UITableViewController {
// MARK: - Outlets
@egzonpllana
egzonpllana / IAPService.swift
Last active May 19, 2021 12:25
StoreKit iOS Swift InAppPurchase Process SKPayment
// Created on 7/9/2020.
//
// Developed by: Kilo Loco
// Improved by Egzon Pllana
import Foundation
import StoreKit
protocol IAPServiceDelegate: class {
@egzonpllana
egzonpllana / UIViewController+DragToDismissGesture.swift
Created October 5, 2020 06:15
Drag down view controller to dismiss. Swift 5
override func viewDidLoad() {
super.viewDidLoad()
let gestureRecognizer = UIPanGestureRecognizer(target: self,
action: #selector(panGestureRecognizerHandler(_:)))
view.addGestureRecognizer(gestureRecognizer)
}
@IBAction func panGestureRecognizerHandler(_ sender: UIPanGestureRecognizer) {
let touchPoint = sender.location(in: view?.window)
var initialTouchPoint = CGPoint.zero
@egzonpllana
egzonpllana / TabBarIndicatorView.swift
Last active July 26, 2023 19:03
Add Indicator View over tab bar item. (Swift 5)
//
// Created by Egzon Pllana on 13.4.23.
// Copyright © 2023 Native Coders. All rights reserved.
//
import UIKit
class IndicatingTabBarController: UITabBarController, UITabBarControllerDelegate {
// MARK: - Properties -