Skip to content

Instantly share code, notes, and snippets.

View FredRuniT's full-sized avatar

Fred Burns FredRuniT

View GitHub Profile
@almassapargali
almassapargali / InstagramActivity.swift
Created January 11, 2018 18:54
UIActivity for Instagram image sharing
import Foundation
import UIKit
private let InstagramAppURL = URL(string: "instagram://app")!
class InstagramActivity: UIActivity, UIDocumentInteractionControllerDelegate {
override class var activityCategory: UIActivityCategory { return .share }
override var activityType: UIActivityType? { return UIActivityType("postToInstagram") }
override var activityTitle: String? { return "Instagram" }
override var activityImage: UIImage? { return #imageLiteral(resourceName: "instagram_activity") }
@powhu
powhu / GIF2MP4.swift
Last active December 28, 2023 22:41
Swift 5.0 GIF to MP4
//
// GIF2MP4.swift
//
// Created by PowHu Yang on 2020/4/24.
// Copyright © 2020 PowHu Yang. All rights reserved.
//
/* How to use
let data = try! Data(contentsOf: Bundle.main.url(forResource: "gif", withExtension: "gif")!)
let tempUrl = URL(fileURLWithPath: NSTemporaryDirectory()).appendingPathComponent("temp.mp4")
//
// UIBarButtonItem+Badge.swift
// PiGuardMobile
//
// Created by Stefano Vettor on 12/04/16.
// Copyright © 2016 Stefano Vettor. All rights reserved.
//
import UIKit