Skip to content

Instantly share code, notes, and snippets.

@priyans05
priyans05 / UIViewExtension.swift
Created November 2, 2018 01:40
Extend Any UIView on storyboard with shadow, corner radius etc.
//
// ExtensionUIView.swift
// SimpleLoginWithFirebase
//
// Created by PRIYANS on 2/11/18.
// Copyright © 2018 PRIYANS. All rights reserved.
//
//TODO: Go to identity inspector after selecting button/image/label and Change the class like configurableButton/configurableImage.
@priyans05
priyans05 / datesExtension.swift
Last active June 27, 2018 09:35
Swift Dates Extension to create String Array from date to date
extension Date {
// Give startDate and endDate -> reurns an array of strings of dates inbetween to use in URL or anyother places where you can input String.
static func uppendDatesBetweenInterval(_ startDate: Date, _ endDate: Date) -> [String]{
var dates = [String]()
var startDate = startDate
let calendar = Calendar.current
let fmt = DateFormatter()
fmt.dateFormat = "yyyy-MM-dd"
while startDate >= endDate {