开发笔记

2017-02-18  本文已影响0人  xiAo__Ju

上架流程

http://www.jianshu.com/p/391f6102b4fb

IAP(内购)

开始

http://yimouleng.com/2015/12/17/ios-AppStore/
二次验证流程

NSURLCache(缓存)

NSURLCache
http://www.cnblogs.com/madpanda/p/4700741.html

https抓包

http://simcai.com/2016/01/31/ios-http-https%E6%8A%93%E5%8C%85%E6%95%99%E7%A8%8B/
http://www.cnblogs.com/dsxniubility/p/4621314.html

Runtime 笔记

http://blog.csdn.net/hello_hwc/article/details/49682857
http://v.youku.com/v_show/id_XODIzMzI3NjAw.html
http://www.jianshu.com/p/9d649ce6d0b8

RunLoop

项目图片

http://get.ftqq.com/1370.get

Python3安装

https://stringpiggy.hpd.io/mac-osx-python3-dual-install/#step3

浏览器通过连接打开App

http://www.cocoachina.com/industry/20140522/8514.html
http://sspai.com/31500#01
http://sspai.com/33969

vim入门

http://blog.jobbole.com/86132/

iOS - 通用链接

http://www.jianshu.com/p/415a5add49c8

正则

isKindOf逆向

http://m.blog.csdn.net/article/details?id=51672087

UIScrollView

http://www.jianshu.com/p/5804fa72aaed
http://tech.glowing.com/cn/practice-in-uiscrollview/

UICollectionView

CoreGraphics

GCD

缓存

YYCache 设计思路

FlexBox

Flex 布局教程:语法篇
FLEXBOX FROGGY

优化

*如何正确地写好一个界面

AsyncDisplayKit

使用 ASDK 性能调优 - 提升 iOS 界面的渲染性能
从 Auto Layout 的布局算法谈性能
预加载与智能预加载(iOS)
新大陆:AsyncDisplayKit
https://www.youtube.com/watch?v=sqkinHYXTuc
https://www.youtube.com/watch?v=RY_X7l1g79Q

Swift DEBUG

http://www.cnblogs.com/Bob-wei/p/5237761.html

Markdown
https://www.zybuluo.com/static/editor/cmd-manual.html

一维数组转二维数组

let count = 3

            for (i, answer) in answers.enumerated() {
                if _answers.isEmpty || i % count == 0 {
                    _answers.append([answer])
                } else {
                    _answers[i / count].append(answer)
                }
            }

响应链
http://hongchaozhang.github.io/blog/2015/10/21/touch-event-in-ios/
http://www.jianshu.com/p/12ef1c9f9741
http://zhoon.github.io/ios/2015/04/12/ios-event.html

版本比较

// 6.5.1 < 7.0
let flag = "6.5.1".compare("7.0", options: .numeric) == .orderedAscending
/// true

// 6.5.1 > 7.0
let flag = "6.5.1".compare("7.0", options: .numeric) == .orderedDescending
//  false

进位除法

(a + b - 1) / b

16进制字符串对100求余

let target = [
            76,
            16,
            56,
            96,
            36
        ]

        let str = "2131412EB552"
        var result = 0
        for (i, char) in str.reversed().enumerated() {
            let number = Int("\(char)", radix: 16)!
            if i == 0 {
                result = number
                continue
            }
            let idx = i % 5
            let n = target[idx]
            result += (number * n)
        }
        result %= 100
- (int)calculateHexMod:(NSString *)hexString {
    static NSArray <NSNumber *>*targets;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        targets = @[
                    @76,
                    @16,
                    @56,
                    @96,
                    @36
                    ];
    });

    int result = 0;
    NSInteger strLength = hexString.length;
    for (int i = 0; i < strLength; i++) {
        NSString *subStr = [hexString substringWithRange:NSMakeRange(strLength - 1 - i, 1)];
        int number = (int)strtoull([subStr UTF8String], NULL, 16);
        if (i == 0) {
            result = number;
            continue;
        }
        int idx = i % 5;
        int n = targets[idx].intValue;
        result += (number * n);
    }

    result %= 100;

    return result;
}

打印内存地址

let a = [1, 2, 3, 4]
var b = [1, 2, 3, 4]
print(address(o: a))
a.withUnsafeBufferPointer {
   print($0)
}
b.withUnsafeBufferPointer {
  print($0)
}
b.append(5)
b.withUnsafeBufferPointer {
  print($0)
}

func address(o: UnsafeRawPointer) -> String {
        return String(format: "%018p", Int(bitPattern: o))
    }

Swift 中的锁和线程安全

iOS 开发中的八种锁

上一篇下一篇

猜你喜欢

热点阅读