Skip to content

Instantly share code, notes, and snippets.

View abhimuralidharan's full-sized avatar
🍎
Apple Developer

Abhilash KM abhimuralidharan

🍎
Apple Developer
View GitHub Profile
@abhimuralidharan
abhimuralidharan / toast.swift
Last active October 27, 2020 12:31
toast in swift for debugging
extension UIViewController {
public func showToast(message : String, seconds: Double = 1.0) {
let toast = UIAlertController(title: nil, message: message, preferredStyle: .alert)
toast.view.alpha = 0.5
present(toast, animated: true)
DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + seconds) {
toast.dismiss(animated: true)
}
}
class CustomLabel: UILabel {
let edgeInsets: UIEdgeInsets
init(frame: CGRect, insets: UIEdgeInsets) {
edgeInsets = insets
super.init(frame: frame)
}
convenience init(text: String?, dx: CGFloat, dy: CGFloat) {
class A{
class func classFunction(){
}
static func staticFunction(){
}
class func classFunctionToBeMakeFinalInImmediateSubclass(){
}
}
class B: A {
@abhimuralidharan
abhimuralidharan / QRScannerView.swift
Created March 11, 2019 06:40
QRCode scanner in iOS swift
//
// QRScannerView.swift
// QRCodeReader
//
// Created by KM, Abhilash a on 08/03/19.
// Copyright © 2019 KM, Abhilash. All rights reserved.
//
import Foundation
import UIKit
// PBRevealViewController.swift
// PBRevealViewController
//
// Created by Patrick BODET on 29/06/2016.
// Copyright © 2016 iDevelopper. All rights reserved.
//
import QuartzCore
import UIKit
import UIKit.UIGestureRecognizerSubclass
//
// ScreenRecordingDetector.m
// ScreenCaptureDetector
//
// Created by Abhilash on 29/12/17.
// Copyright © 2017 Abhilash. All rights reserved.
//
#import "ScreenRecordingDetector.h"
float const kScreenRecordingDetectorTimerInterval = 1.0;
//
// ScreenRecordingDetector.h
// ScreenCaptureDetector
//
// Created by Abhilash on 29/12/17.
// Copyright © 2017 Abhilash. All rights reserved.
//
/*
ScreenRecordingDetector checks for screen capturing as well as airplay mirroring
extension UITextContentType {
@available(iOS 10.0, *)
public static let name: UITextContentType
@available(iOS 10.0, *)
public static let namePrefix: UITextContentType
@available(iOS 10.0, *)
public static let givenName: UITextContentType
//
// StoreReviewHelper.swift
// Template1
//
// Created by Apple on 14/11/17.
// Copyright © 2017 Mobiotics. All rights reserved.
//
import Foundation
import StoreKit
{
"applinks": {
"apps": [],
"details": [
{
"appID": "HKJGHKJG.com.facebook.ios",
"paths": [ "NOT /e/*", "*", "/", “/archives/201?/* ]
},
{
"appID": "JKHKJJHK.com.twitter.ios",