码迷,mamicode.com
首页 >  
搜索关键字:nsinteger    ( 574个结果
ios 视频流H264硬编码---分解LFLiveKit
#import "LFHardwareVideoEncoder.h" #import @interface LFHardwareVideoEncoder (){ VTCompressionSessionRef compressionSession; // 编码器 NSInteger frameCou... ...
分类:移动开发   时间:2018-10-19 16:07:14    阅读次数:311
不用第三方变量交换两个数的值
1.利用两数之和减去另一个数的方式: NSInteger a=3,b=5; a=a+b; b=a-b; a=a-b; NSLog(@"a=%ld,b=%ld",a,b); 打印:a=5,b=3 2.利用位运算 ^ (异或): 异或的特点是:一个数据a与另一个数据b做异或运算之后,变成了另外一个数c, ...
分类:其他好文   时间:2018-09-17 14:36:28    阅读次数:174
Enum枚举
前言 iOS 5.0 之后,提供了新的枚举定义方式,定义枚举的同时,可以指定枚举中数据的类型。 位移型枚举: 使用 按位或 可以给一个参数同时设置多个 "类型"。在具体执行的时候,使用 按位与 可以判断具体的 "类型"。 OC 中 64 位操作系统 NSInteger 64 位 long = 能够表 ...
分类:编程语言   时间:2018-08-20 23:03:02    阅读次数:162
iOS开发进制转换
1、十进制转换为二进制 Objective C / 十进制转换为二进制 @param decimal 十进制数 @return 二进制数 / + (NSString )getBinaryByDecimal:(NSInteger)decimal { NSString binary = @""; whi ...
分类:移动开发   时间:2018-07-23 12:42:01    阅读次数:274
tableView 自动滚动到底部
- (void)addData:(id)object{ NSInteger count = self.dataArray.count; _index ++; NSString * str = [NSString stringWithFormat:@"当前第%zd行",_index]; [self.d ...
分类:其他好文   时间:2018-07-10 17:40:56    阅读次数:488
怎么去掉Xcode工程中的某种类型的警告 Implicit conversion loses integer precision: 'NSInteger' (aka 'long') to 'int32
unsigned long numComponents = CGColorGetNumberOfComponents([[UIColor blackColor] CGColor]); 2014年12月17日 17:40:59 阅读数:35626 unsigned long numComponents ...
分类:其他好文   时间:2018-06-30 11:04:11    阅读次数:141
获取指定<文字行数>的<高度>是多少 TextKit
- (CGSize)maxLineSizeWithLines:(NSInteger)lines constraintSize:(CGSize)size attributes:(NSDictionary*)dicAttr { //负责布局渲染 NSLayoutManager* manager = [[... ...
分类:其他好文   时间:2018-06-29 21:05:16    阅读次数:378
OC 线程操作 - GCD快速迭代
- (void)forDemo{ //全都是在主线程操作的 for (NSInteger i = 0; i{number = 1, name = main} 2018-06-27 11:33:44.226845+0800 5线程操作-GCD-快速迭代[7715:77291] --{number = ... ...
分类:编程语言   时间:2018-06-28 10:59:10    阅读次数:198
属性字符串添加图片
- (NSMutableAttributedString *)getAttributedStringWithSting:(NSString *)astring image:(UIImage *)image index:(NSInteger)index{ // 1.创建一个富文本 NSMutableA ...
分类:其他好文   时间:2018-05-16 11:00:29    阅读次数:348
iOS后台运行播放无声音频 测试可行
如果打回来了,就自认倒霉吧 制作无声音频。 @interface AppDelegate () { NSInteger count; } @property(strong, nonatomic)NSTimer *mTimer; @property(assign, nonatomic)UIBackgr ...
分类:移动开发   时间:2018-05-10 14:24:51    阅读次数:264
574条   上一页 1 2 3 4 ... 58 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!