Skip to content

Instantly share code, notes, and snippets.

View shishirthedev's full-sized avatar

Ahidul Islam shishirthedev

View GitHub Profile
import UIKit
import UserNotifications
import Firebase
import FirebaseInstanceID
import FirebaseMessaging
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
<?php
// Configuration.................................
$destination_folder = "files/"; // Folder name to store images.
$file_key = 'images';
$max_image_size = 7000;
$image_extensions_allowed = ['jpeg','jpg','png'];
$response = array();
import UIKit
class ViewController: UIViewController {
@IBOutlet weak var imageView: UIImageView!
var imagePicker: UIImagePickerController!
enum ImageSource {
case photoLibrary
public class FacebookAccountKitService {
public static FacebookAccountKitService shared = new FacebookAccountKitService();
// Phone Login....................................................................
public void phoneLogin(Context context,final int PHONE_LOGIN_CODE){
final Intent phoneAuthIntent = new Intent(context, AccountKitActivity.class);
AccountKitConfiguration.AccountKitConfigurationBuilder configurationBuilder = new AccountKitConfiguration.AccountKitConfigurationBuilder(
LoginType.PHONE, AccountKitActivity.ResponseType.TOKEN);
@shishirthedev
shishirthedev / Android-multi-text-listener.java
Last active April 3, 2019 09:42
This is for listening multiple android editText at a time.
public class SSMultiTextListener {
private TextWatcherWithInstance callback;
public SSMultiTextListener setCallback(TextWatcherWithInstance callback) {
this.callback = callback;
return this;
}
public class SnStickyHeaderItemDecoration extends RecyclerView.ItemDecoration {
private SnStickyListener mListener;
private Integer mHeaderHeight;
public SnStickyHeaderItemDecoration(SnStickyListener listener) {
this.mListener = listener;
}
import UIKit
class ErrorHandler {
private init(){}
static var view: NetworkViewProtocol?
static func handleError(httpSatusCode: Int?, error: Error?){
import UIKit
enum VersionError: Error {
case invalidResponse, invalidBundleInfo
}
class VersionCheck: NSObject {
private override init() {}
import UIKit
import SafariServices
class AppUtils: NSObject {
private override init() {}
public static let shared: AppUtils = AppUtils()
func showSafariVc(in vc: UIViewController, for url: String){
@shishirthedev
shishirthedev / iOS-tableView-adapter.swift
Last active May 15, 2019 05:42
iOS tableview adapter custom code with pagination and refresh Control....
import UIKit
protocol SSAdapterDelegate {
func willDisplay(cell: UITableViewCell, indexPath: IndexPath)
func didSelected(indexPath: IndexPath)
func hasNextPage()->Bool
func isLoadingFooterAdded()->Bool
func loadMoreData()
func refreshTableData()