An easy interface to use all of chartjs.org's charts.
Inspired by my own pain and suffering of trying to add a simple chart to smashing
@import UIKit; | |
NS_ASSUME_NONNULL_BEGIN | |
@protocol MFBPreviewableCollectionView | |
- (nullable NSIndexPath *)mfb_previewableCollectionIndexPathForItemAtPoint:(CGPoint)point; | |
- (CGRect)mfb_previewableCollectionItemRectForIndexPath:(NSIndexPath *)indexPath; |
Inspired by my own pain and suffering of trying to add a simple chart to smashing
// Как сгенерировать obfuscatedSecretKey[] из uuid, который мы хотим захардкодить | |
- (void)generateString { | |
/** | |
* @author Цыганов Станислав | |
* | |
* Шаг 1. Получаем hex-овый массив | |
*/ | |
NSString *myString = @"Hello"; | |
- (NSString *)uuidForToken { | |
unsigned char obfuscatedSecretKey[] = {0xa, 0xd7, 0x55, 0x2f, 0x94}; | |
// Get the SHA1 of a class name, to form the obfuscator. | |
unsigned char obfuscator[CC_SHA1_DIGEST_LENGTH]; | |
NSData *className = [NSStringFromClass([self class]) | |
dataUsingEncoding:NSUTF8StringEncoding]; | |
CC_SHA1(className.bytes, (CC_LONG)className.length, obfuscator); | |