加载中
& | ^ << >> 与OC枚举 字 字节 比特 word byte bit uint8_t 16 32

/* 1 1 2 10 3 11 4 100 5 101 6 110 7 111 8 1000 */ NSLog(@"%d", 1 & 2); //01 10 -> 00 ->0 NSLog(@"%d", 1...

2017/12/14 16:48
16
从零开始 - iOSRTMP推流篇(1)

一:想从0开始首页需要RTMP服务器吧 请看去年写的这篇文章 30分钟跑直播 客户端(iOS)+服务端(nginx--rtmp-module) 二:从哪开始呢~啥都不管 我第一步先从建立链接开始吧 - (void)connectToSer...

2017/12/14 15:21
10
iOSUICollectionView轮播 解决怎么左滚动到最后到第一个的问题

很丢脸的是做了这么久的iOS 并没有自己写过轮播 解决怎么左滚动到最后到第一个的问题! import UIKit private let cellID = "cellID" class ViewController: UIViewController { ...

2017/09/27 16:01
21
[组件化开发]pod Specs 远程私有库

/Users/point/.cocoapods //本地 /Users/point/Library/Caches/CocoaPods/Pods //本地下载缓存 https://github.com/CocoaPods/Specs //远程 pod spec create name //创建 name.podspec https...

2017/05/08 18:39
37
比load慢一步的方法

struct SRECaptureHooker { SRECaptureHooker () { [DCTest exchangeMethodWithOriginalCls:[EAGLContext class] originalSel:@selector(presentRenderbuffer:) swapCls:[EAG...

2017/05/02 17:40
73
快速生成 测试文件

size_t s = 1000*50000; char *big = malloc(s); NSData *d = [NSData dataWithBytesNoCopy:big length:s freeWhenDone:YES]; NSString *name = @"dacai";//[[[[NSUUID UUI...

2017/04/28 17:21
40
swift3 获取当前工程的名字 & 字符串生成类

贡献者:赵大财 博客:https://my.oschina.net/zhaodacai GitHub:https://github.com/dacaizhao 邮箱: dacai_zhao@163.com QQ:327532817 ============================= //获取工程的名字 ...

swift tableView 回到最后一个Cell

贡献者:赵大财 博客:https://my.oschina.net/zhaodacai GitHub:https://github.com/dacaizhao 邮箱: dacai_zhao@163.com QQ:327532817 ============================= fileprivate func ...

2016/12/14 18:07
64
swift3.0 Timer 定时器

贡献者:赵大财 博客:https://my.oschina.net/zhaodacai GitHub:https://github.com/zhaodacai 邮箱: zhaodacai@yeah.com QQ:327532817 ============================= var cycyleTimer :...

2016/11/22 16:43
2.6K
swift3.0 泛型 <T> 小例子

贡献者:赵大财 博客:https://my.oschina.net/zhaodacai GitHub:https://github.com/zhaodacai func swapTwoInts <T> ( a:inout T , b:inout T) { let temp = a a = b ...

swift3.0属性block

//定义 typealias funcBlock = (_ result : Bool) -> () var blockProperty : funcBlock? //使用 vc.blockProperty = { [unowned self] (param) -> () in ...

2016/11/21 16:48
174
swift3.0layer折叠 淘宝商品View折叠

func angle2Radian(offset:Double, ref:Double)->Double { return offset * M_PI / ref; } var transfrom:CATransform3D = CATransform3DIdentity let d:CGFloat = ...

swift3.0计算label,button的文字大小 rect size

//计算文字大小 class func getTextRectSize(text: NSString,font: UIFont,size: CGSize) -> CGRect { let attributes = [NSFontAttributeName: font] let option = NSS...

2016/11/19 10:11
50
swift3.0 label行高extension封装

class func lineSpacing(_ content: String , _ space: Int) -> NSAttributedString { let attributedString:NSMutableAttributedString = NSMutableAttributedString(string: conte...

2016/11/19 10:09
19
swift3.0 fileprivate private 测试效果

在一个文件的代码: class User { fileprivate var name = "dacai" private var age = "18" var sex = "dacai" var accessPrivateAge: String { return age } } ...

2016/11/18 14:38
10
swift3.0 UIView获取父控制器

public func viewController() -> UIViewController? { var responder = self.next; repeat { if (responder?.isKind(of: UIViewController.classForC...

swift3.0 for循环

let numberList = [11, 12, 13, 14, 15,16] for item in numberList{ print(item) } for item in numberList.enumerated(){ ...

2016/11/17 09:19
27
swift3.0 上传图片旋转问题

extension UIImage { func rotate(aImage:UIImage) -> UIImage { // 向上 直接返回 if aImage.imageOrientation == .up { return aImage } ...

linux 常用命令

find . -name "ss" //查找 /usr/local/Cellar //homebrew的安装扩展的路径 pod repo update //升级pod本地版本仓库 ========================git 系列 git log //查看历史版本 git branch -...

2016/11/10 21:25
14
swif3.0 判断frame相交

fileprivate func buttonCenterInButtons(curbtn:UIButton) -> UIButton { for btn in btnArr { if curbtn == btn as! UIButton { continue ...

2016/11/04 10:07
10

没有更多内容

加载失败,请刷新页面

返回顶部
顶部