Concept: Truth, Information Flow, Clear Responsibilities and Immutability 1. Truth 1.1 Single Source of Truth 单一的事实/真想来源 Ref[2] Ref[3] "One core principle that is good to keep in mind when modelling various states is to try to stick to a “single sour…
Systems and methods are provided to manage risk associated with access to information within a given organization. The overall risk tolerance for the organization is determined and allocated among a plurality of subjects within the organization. Allo…
By Bohdan Orlov on 21 Mar 2016 - 0 Comments iOS FYI: Slides from my presentation at NSLondon are available here. Feeling weird while doing MVC in iOS? Have doubts about switching to MVVM? Heard about VIPER, but not sure if it worth it? Keep reading t…
iOS中有时候UI给的一个色号就像 #54e1b7 这个,而我们一般设置颜色都是根据RBG来设置的,所以这里需要把这个16进制的色号转为RGB值,这里我们就使用一下的方法来调用设置颜色. + (UIColor *)getColor:(NSString *)hexColor { ) { NSLog(@"color string is nil."); return [UIColor blackColor]; } unsigned int red,green,blue; NSRange ra…
目前ios的指令集有以下几种: 1,armv6,支持的机器iPhone,iPhone2,iPhone3G及对应的iTouch 2,armv7,支持的机器iPhone4,iPhone4S 3,armv7s,支持的机器iPhone5,iPhone5C 4,arm64,支持的机器:iPhone5S 机器对指令集的支持是向下兼容的,因此armv7的指令集是可以运行在iphone5S的,只是效率没那么高而已~ ======================== Architecture : 指你想支持的指令…
目前ios的指令集有以下几种: armv6 iPhone iPhone2 iPhone3G 第一代和第二代iPod Touch armv7 iPhone4 iPhone4S armv7s iPhone5 iPhone5C arm64 iPhone5S 机器对指令集的支持是向下兼容的,因此armv7的指令集是可以运行在iphone5S的,只是效率没那么高而已~ ================================================ Architecture : 指你想支持…
// // ViewController.m // text // // Created by 李东旭 on 16/1/22. // Copyright © 2016年 李东旭. All rights reserved. // #import <UIKit/UIKit.h> #import "ViewController.h" // 定义个宏,方便实用,>> 16 的意思是把16进制转换成2进制后,右移16位(移动掉的直接舍弃) #define UIColorF…
原文网址:http://www.voidcn.com/blog/u012198553/article/p-4976772.html /// 将十六进制的字符串转化为NSData - (NSData )transStrHexToData:(NSString )strHex { /// bytes索引 NSUInteger j = 0; NSInteger len = strHex.length; if (len % 2 == 1) { /// 若不能被2整除则说明16进制的字符串不满足图片图.特此…
项目中经常会用到颜色转换,有的是通过十六进制转成数字转颜色,想简单的点直接通过字符串转一下,简单扩展了一下分类UIColor,代码如下: +(UIColor *)colorWithHex:(NSString *)hexColor{ return [self colorWithHex:hexColor alpha:1.0f]; } //http://www.cnblogs.com/xiaofeixiang iOS技术交流:228407086 +(UIColor *)colorWithHex:(NS…
#define RGB(r,g,b) ([UIColor colorWithRed:r/255.0 green:g/255.0 blue:b/255.0 alpha:1]) #define HEXTOCOLOR(hexValue) ([UIColor colorWithRed:((float)((hexValue & 0xFF0000) >> 16))/255.0 green:((float)((hexValue & 0xFF00) >> 8))/255.0 blu…