- Introduction to Functional Programming Johannes Weiß - https://vimeo.com/100786088
- ReactiveCocoa at MobiDevDay Andrew Sardone - https://vimeo.com/65637501
- The Future Of ReactiveCocoa Justin Spahr-Summers - https://www.youtube.com/watch?v=ICNjRS2X8WM
- Enemy of the State Justin Spahr-Summers - https://www.youtube.com/watch?v=7AqXBuJOJkY
- WWDC 2014 Session 229 - Advanced iOS Application Architecture and Patterns Andy Matuschak - https://developer.apple.com/videos/play/wwdc2014/229/
- Functioning as a Functionalist Andy Matuschak - https://www.youtube.com/watch?v=rJosPrqBqrA
- Controlling Complexity in Swift Andy Matuschak - https://realm.io/news/andy-matuschak-controlling-complexity/
As of iOS 11/macOS High Sierra, and only including ones in Foundation and CoreFoundation | |
Strings: | |
_NSCFString - a CFStringRef or CFMutableStringRef. This is the most common type of string object currently. | |
- May have 8 bit (ASCII) or 16 bit (UTF-16) backing store | |
_NSCFConstantString - a compile time constant CFStringRef, like you'd get with @"foo" | |
- May also be generated by dynamic string creation if matches a string in a pre-baked table of common strings called the StringROM | |
NSBigMutableString - an NSString backed by a CFStorage (https://github.com/opensource-apple/CF/blob/master/CFStorage.h) for faster handling of very large strings | |
NSCheapMutableString - a very limited NSMutableString that allows for zero-copy initialization. Used in NSFileManager for temporarily wrapping stack buffers. |
获取应用的 Bundle ID 方法:在 iTools 下,找到 app 名字命名的文件夹 xxx.app,找到 Info.plist,导出,Xcode 打开。
得到 Bundle ID 如:
com.tencent.mipadqq iPad 版 QQ 4.1
com.tencent.xin 微信 5.3.1.17
NSZombieEnabled
is an environment variable which controls whether the Foundation runtime will use zombies. When zombies are enabled, a deallocated object's class is dynamically changed to be _NSZombie, and by default, the memory region is never marked as free, although this can be controlled separately(so, remember to disable NSZombieEnabled for Archived Release Build).
The end result is that, with zombies enabled, messages to deallocated objects will no longer behave strangely or crash in difficult-to-understand ways, but will instead log a message and die in a predictable and debugger-breakpointable way. This is the tool to use when trying to track down over-releases and premature releases.
Zombies will take effect for all Objective-C objects that are deallocated through normal means, including most Cocoa classes as well as user-created classes. On 10.4 and earlier, a rather important exception to this is most/all TollFreeBridged classes, as they are deallocated using CoreFoundation which NSZombieEnab
/** | |
* 判断两个版本字符串的大小 | |
* @param {string} v1 原始版本 | |
* @param {string} v2 目标版本 | |
* @return {number} 如果原始版本大于目标版本,则返回大于0的数值, 如果原始小于目标版本则返回小于0的数值。0当然是两个版本都相等拉。 | |
*/ | |
function compareVersion(v1, v2) { | |
var _v1 = v1.split("."), | |
_v2 = v2.split("."), |
- (void)viewDidAppear:(BOOL) animated { | |
[super viewDidAppear:animated]; | |
// Register notification when the keyboard will be show | |
[[NSNotificationCenter defaultCenter] addObserver:self | |
selector:@selector(keyboardWillShow:) | |
name:UIKeyboardWillShowNotification | |
object:nil]; | |
// Register notification when the keyboard will be hide | |
[[NSNotificationCenter defaultCenter] addObserver:self |
- (UIImage *)compressImage:(UIImage *)image{ | |
float actualHeight = image.size.height; | |
float actualWidth = image.size.width; | |
float maxHeight = 600.0; | |
float maxWidth = 800.0; | |
float imgRatio = actualWidth/actualHeight; | |
float maxRatio = maxWidth/maxHeight; | |
float compressionQuality = 0.5;//50 percent compression | |
if (actualHeight > maxHeight || actualWidth > maxWidth) { |
// For details, see http://mindsea.com/2012/12/18/downscaling-huge-alassets-without-fear-of-sigkill | |
#import <AssetsLibrary/AssetsLibrary.h> | |
#import <ImageIO/ImageIO.h> | |
// Helper methods for thumbnailForAsset:maxPixelSize: | |
static size_t getAssetBytesCallback(void *info, void *buffer, off_t position, size_t count) { | |
ALAssetRepresentation *rep = (__bridge id)info; | |
NSError *error = nil; |
i386 : iPhone Simulator | |
x86_64 : iPhone Simulator | |
arm64 : iPhone Simulator | |
iPhone1,1 : iPhone | |
iPhone1,2 : iPhone 3G | |
iPhone2,1 : iPhone 3GS | |
iPhone3,1 : iPhone 4 | |
iPhone3,2 : iPhone 4 GSM Rev A | |
iPhone3,3 : iPhone 4 CDMA | |
iPhone4,1 : iPhone 4S |
[ | |
{name: 'Afghanistan', code: 'AF'}, | |
{name: 'Åland Islands', code: 'AX'}, | |
{name: 'Albania', code: 'AL'}, | |
{name: 'Algeria', code: 'DZ'}, | |
{name: 'American Samoa', code: 'AS'}, | |
{name: 'AndorrA', code: 'AD'}, | |
{name: 'Angola', code: 'AO'}, | |
{name: 'Anguilla', code: 'AI'}, | |
{name: 'Antarctica', code: 'AQ'}, |