Skip to content

Instantly share code, notes, and snippets.

//
// Copyright © 2017 Kalpesh Talkar. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
@KalpeshTalkar
KalpeshTalkar / KPopupMenu.swift
Created March 31, 2017 07:47
Popup menu written in swift 2.2
//
// KPopupMenu.swift
//
// Created by Kalpesh on 30/03/17.
// Copyright © 2017 Kalpesh Talkar. All rights reserved.
//
import UIKit
protocol KPopupMenuDelegate {
@KalpeshTalkar
KalpeshTalkar / CustomActivity.swift
Created March 24, 2017 11:47
Custom UIActivity written in Swift 2.2
//
// CustomActivity.swift
//
// Created by Kalpesh on 24/03/17.
// Copyright © 2017 Kalpesh Talkar. All rights reserved.
//
//
class CustomActivity: UIActivity {
override func activityType() -> String? {
@KalpeshTalkar
KalpeshTalkar / htmlParserFunction.m
Created November 4, 2016 07:08
This is a small function to parse string/data from <html> tags.
//
// Created by Kalpesh Talkar on 16/12/15.
// Copyright © 2015 Kalpesh Talkar. All rights reserved.
//
/**
Function to parse string/data from <html> tags.
@param htmlStartTag start tag for e.g. <h1>
@param htmlEndTag edn tag for e.g. </h1>
import android.app.Activity;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.drawable.BitmapDrawable;
import android.text.Spannable;
import android.text.SpannableStringBuilder;
import android.text.style.ImageSpan;
import android.util.AttributeSet;
@KalpeshTalkar
KalpeshTalkar / UIViewController+PresentationStyle.h
Created September 3, 2016 14:09
A UIViewController category to present viewcontroller as popover controller in iPhone devices
//
// UIViewController+PresentationStyle.h
//
// Created by Kalpesh Talkar on 22/08/16.
// Copyright © 2016 Kalpesh Talkar. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface UIViewController (PresentationStyle) <UIPopoverPresentationControllerDelegate>
//
// TouchIDAuthenticationObject.swift
//
// Created by Kalpesh Talkar on 03/06/16.
// Copyright © 2016 Kalpesh. All rights reserved.
//
import UIKit
import LocalAuthentication
//
// MessageObject.swift
//
// Created by Kalpesh Talkar on 29/05/16.
// Copyright © 2016 Kalpesh Talkar. All rights reserved.
//
import UIKit
import MessageUI
//
// ShareObject.swift
//
// Created by Kalpesh Talkar on 28/05/16.
// Copyright © 2016 Kalpesh. All rights reserved.
//
import UIKit
@IBDesignable class ShareObject: NSObject {
@KalpeshTalkar
KalpeshTalkar / KImageCache
Created April 1, 2016 12:32
KImageCache, a swift class for loading images from url and caching.
//
// KImageCache.swift
//
// Created by Kalpesh Talkar on 01/04/16.
// Copyright © 2016 Kalpesh. All rights reserved.
//
import UIKit
class KImageCache {