Skip to content

Instantly share code, notes, and snippets.

View Satish's full-sized avatar
🏠
Working from home

Satish Kr Chauhan Satish

🏠
Working from home
  • Vinsol
  • New Delhi, India
  • 07:23 (UTC +05:30)
View GitHub Profile
@Satish
Satish / stackoverflow_questions_51830431.swift
Last active August 21, 2018 08:10
Make a list with images inside a tableview cell Using UIStackView SWIFT
// Solution https://stackoverflow.com/questions/51830431/right-way-to-make-a-list-with-images-inside-a-tableview-cell-swift/51836776
import UIKit
class ViewController: UIViewController {
@IBOutlet weak private var tableView: UITableView! {
didSet {
tableView.delegate = self
tableView.dataSource = self
@Satish
Satish / DeviceUID.m
Created July 3, 2018 10:11 — forked from miguelcma/DeviceUID.m
iOS Unique Device ID that persists between app reinstalls
/* DeviceUID.h
#import <Foundation/Foundation.h>
@interface DeviceUID : NSObject
+ (NSString *)uid;
@end
*/
// Device.m
@Satish
Satish / String+MD5.swift
Created August 22, 2017 08:16
MD5 String Swift 3
extension String {
var md5: String {
let messageData = data(using:.utf8)!
var digestData = Data(count: Int(CC_MD5_DIGEST_LENGTH))
_ = digestData.withUnsafeMutableBytes {digestBytes in
messageData.withUnsafeBytes {messageBytes in
CC_MD5(messageBytes, CC_LONG(messageData.count), digestBytes)
}
@Satish
Satish / ioslocaleidentifiers.csv
Created June 6, 2016 11:46 — forked from jacobbubu/ioslocaleidentifiers.csv
iOS Locale Identifiers
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
mr Marathi
bs Bosnian
ee_TG Ewe (Togo)
ms Malay
kam_KE Kamba (Kenya)
mt Maltese
ha Hausa
es_HN Spanish (Honduras)
ml_IN Malayalam (India)
ro_MD Romanian (Moldova)
@Satish
Satish / Loop Labels
Created May 12, 2016 07:41
Use labels for your loops
struct Section {
let rows: [Row]
}
struct Row {
let id: Int
let flag: Bool
}
var sections = [
#import "MyTableViewController.h"
@interface MyTableViewController ()
@property (strong, nonatomic) NSArray *records;
@end
@implementation MyTableViewController