Skip to content

Instantly share code, notes, and snippets.

Avatar

Deepakraj Murugesan deepakraj27

View GitHub Profile
@deepakraj27
deepakraj27 / DPImageView+LettersExtension.swift
Created Jun 25, 2018
An easy, helpful UIImageView category that generates letter initials as a placeholder for user images, with a custom background color and double border with custom stroke width Completely supports SWIFT 4 and SWIFT 3, written excusively for you.
View DPImageView+LettersExtension.swift
//
// UIImageView+Letters.swift
// UIImageViewLettersDemo
//
// Created by Deepakraj Murugesan on 23/02/18.
// Copyright © 2018 Deepak. All rights reserved.
//
import Foundation
import UIKit
@deepakraj27
deepakraj27 / AttachmentHandler.swift
Last active Mar 21, 2021
Access Camera, Photo Library, Video and File from User device using Swift 4
View AttachmentHandler.swift
//
// AttachmentHandler.swift
// AttachmentHandler
//
// Created by Deepak on 25/01/18.
// Copyright © 2018 Deepak. All rights reserved.
//
import Foundation
import UIKit
@deepakraj27
deepakraj27 / ViewController.swift
Created Nov 2, 2017 — forked from DejanEnspyra/ViewController.swift
Example of organizing UIViewController class with the help of extensions
View ViewController.swift
//
// ViewController.swift
//
// Created by Dejan Atanasov on 01/04/2017.
// Copyright © 2017 Dejan Atanasov. All rights reserved.
//
import UIKit
class ViewController: UIViewController {
@deepakraj27
deepakraj27 / multipart.swift
Created Nov 2, 2017 — forked from DejanEnspyra/multipart.swift
Alamofire 4 — Multipart file upload with Swift 3 (http://theappspace.com/multipart-file-upload/)
View multipart.swift
func requestWith(endUrl: String, imageData: Data?, parameters: [String : Any], onCompletion: ((JSON?) -> Void)? = nil, onError: ((Error?) -> Void)? = nil){
let url = "http://google.com" /* your API url */
let headers: HTTPHeaders = [
/* "Authorization": "your_access_token", in case you need authorization header */
"Content-type": "multipart/form-data"
]
Alamofire.upload(multipartFormData: { (multipartFormData) in