码迷,mamicode.com
首页 >  
搜索关键字:nsinteger    ( 574个结果
C中的int和OC中的NSInteger区别
在c语言中,int和long的字节数是和操作系统指针所占位数相等。 但c语言中说,long的长度永远大于或等于int objective-c里,苹果的官方文档中总是推荐用NSInteger 它和int有什么区别呢,stackoverflow这帮大神给了答案。 原来在苹果的api实现中,NSInteg ...
分类:其他好文   时间:2017-06-15 00:41:32    阅读次数:161
植物大战僵尸
#import <Foundation/Foundation.h> @interface CommonZomble : NSObject { NSString * _zombleKind;//僵尸种类 NSInteger _totalBloodVolume;//总血量 NSInteger _ever ...
分类:其他好文   时间:2017-06-14 22:33:50    阅读次数:180
IOS开发教程--怎样使用点9图片
事先准备一张图片: UIImage *image = [UIImage imageNamed:@"red.png"]; 在iOS 5.0之前能够这么用: NSInteger leftCapWidth = image.size.width * 0.5f; NSInteger topCapHeight ...
分类:移动开发   时间:2017-06-13 19:47:10    阅读次数:348
UIPickerView的使用(三)
//UIPickerViewDataSource中定义的方法,该方法的返回值决定该控件包含的列数 - (NSInteger)numberOfComponentsInPickerView:(UIPickerView*)pickerView { return 2; // 返回2表明该控件只包含2列 } ... ...
分类:其他好文   时间:2017-06-12 22:25:07    阅读次数:181
UIPickerView的使用(二)
//UIPickerViewDataSource中定义的方法,该方法的返回值决定该控件包含的列数 - (NSInteger)numberOfComponentsInPickerView:(UIPickerView*)pickerView { return 2; // 返回2表明该控件只包含2列 } ... ...
分类:其他好文   时间:2017-06-12 22:14:35    阅读次数:207
设置TableView section header的颜色
- (void)tableView:(UITableView *)tableView willDisplayHeaderView:(UIView *)view forSection:(NSInteger)section { view.tintColor = [UIColor clearColor]; ...
分类:其他好文   时间:2017-06-06 14:26:21    阅读次数:246
NSDate获取当前时区的时间
[NSDate date]获取的是GMT时间,要想获得某个时区的时间,以下代码可以解决这个问题 NSDate *date = [NSDate date]; NSTimeZone *zone = [NSTimeZone systemTimeZone]; NSInteger interval = [zo ...
分类:其他好文   时间:2017-06-06 12:59:08    阅读次数:125
OC 属性修饰符篇
一、MRC 与 ARC 各自的属性修饰符 二、内存管理修饰符 MRC 模式下属性修饰符 retain: 引用计数加1。 assign: 分配内存,类似于copy。常用于基本数据类型,比如:int,long,NSInteger等。 ARC 模式下属性修饰符 weak: 当引用计数为零时,将其置为nil ...
分类:其他好文   时间:2017-05-07 15:39:37    阅读次数:146
Block系列2:Block内存管理
ViewController.h #import <UIKit/UIKit.h> @interface ViewController : UIViewController { UIImage *_image; NSInteger _index; } @endViewController.m #imp ...
分类:其他好文   时间:2017-05-01 14:20:01    阅读次数:148
iOS大神班笔记03-UIApplication
UIApplication简介: 利用UIApplication对象能进行一些应用级别的操作。 设置应用程序图标右上角的红色提醒数字 @property(nonatomic) NSInteger applicationIconBadgeNumber; //代码实现和效果 UIApplication ...
分类:移动开发   时间:2017-04-25 13:24:52    阅读次数:332
574条   上一页 1 ... 3 4 5 6 7 ... 58 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!