Skip to content

Instantly share code, notes, and snippets.

@tsafrir
tsafrir / SSLPinningValidator.swift
Last active March 16, 2021 08:10 — forked from angelolloqui/SSLPinningValidator.swift
SSL pinning validator with implementation for the Subject public key info (SPKI), based on the one at https://github.com/datatheorem/TrustKit
//
// SSLPinningValidator.swift
//
// Created by Angel Garcia on 17/08/16.
//
import Foundation
import Security
import CommonCrypto
@tsafrir
tsafrir / gist:5627179
Last active May 19, 2016 15:47
Use SDWebImage to download an image the display in UITableViewCell with fade in and the image cache build in SDWebImage. https://github.com/rs/SDWebImage
#import "UIImageView+WebCache.h"
// load the image in:
// - (void)configureCell:(MyCell*)cell atIndexPath:(NSIndexPath*)indexPath
// or in - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
NSString *imageURLString = item.imageURL;
if (imageURLString) {
NSURL *url = [NSURL URLWithString:imageURLString];
if (url) {