码迷,mamicode.com
首页 >  
搜索关键字:nsinteger nsuinteger nsnumber    ( 1059个结果
回调中释放自己会不会导致崩溃?
比如- (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component{ [self.pickerViewremoveFromSuperview]; .....
分类:其他好文   时间:2014-08-29 17:59:28    阅读次数:222
移除array中重复的item
//move the repeated item NSInteger index = [orignalArray count] - 1; for (id object in [orignalArray reverseObjectEnumerator]) { if ([orignalArray ind...
分类:其他好文   时间:2014-08-29 12:47:57    阅读次数:154
Effective Objective-C 2.0 笔记三(Literal Syntax简写语法)
当使用Objective-C的时候,你总会遇到Foundation框架中的一些类,这些类包含NSString,NSNumber,NSArray和NSDictionary,这些数据结构都是自解释的。 Objective-C以简明具体的语法而著名,自从oc1.0有一个简单的方式定义一个NSStri...
分类:其他好文   时间:2014-08-27 20:31:28    阅读次数:215
NSNumber,NSValue和NSData
我们在编码中,很多时候需要将C里面原生的数据封装成对象,这样可以用NSDictionary或者NSArray来存取访问。尤其是一些做适配的情况下,这种封装是不可避免的。Objective-C提供了不少类可以帮助我们,比较常见的是NSNumber,NSValue和NSData。NSNumber主要是用...
分类:其他好文   时间:2014-08-26 11:15:06    阅读次数:270
iOS7_ios7_如何实现UIAlertView以及监听点击事件(其它样式)_如何修改UITextField默认键盘样式
首先我们知道,UIAlertView实际上有多种样式,在xcode中,按住cmd点击UIAlertView,进入头文件我们看到:1 typedef NS_ENUM(NSInteger, UIAlertViewStyle) {2 UIAlertViewStyleDefault = 0, //默...
分类:移动开发   时间:2014-08-24 19:16:03    阅读次数:338
对不同类型assgin,retain,和copy内部实现的方法
.h文件。。。。。。。@interfacebook:NSObject /*{ NSString*_bookName;//书名 CGFloat_bookThickness;//厚度 NSString*_bookType;//书类型 NSInteger_bookPrice;//书价格 NSString*_publishingHouse;//出版社 NSString*_publishintTime;//出版时间 }*///在@property里面,其..
分类:其他好文   时间:2014-08-23 19:11:51    阅读次数:150
【IOS】int,NSInteger,NSUInteger,NSNumber
1.当需要使用int类型的变量的时候,可以像写C的程序一样,用int,也可以用NSInteger,但更推荐使用NSInteger,因为这样就不用考虑设备是32位的还是64位的。2.NSUInteger是无符号的,即没有负数,NSInteger是有符号的。3.有人说既然都有了NSInteger等这些基...
分类:移动开发   时间:2014-08-22 15:44:20    阅读次数:175
创建简易计算器
@interface AppDelegate () { UIView *_containerView; UILabel *_lable; CGFloat _fristNum; CGFloat _secondNum; NSInteger _tempNum; NSMutableString *_str; } @end...
分类:其他好文   时间:2014-08-22 10:58:46    阅读次数:270
用OC写一个可以分字母组,的电话薄,并实现功能
首先要创建AddressContact类,#import<Foundation/Foundation.h>//---------AddressContact的.h文件 @interfaceAddressContact:NSObject { NSString*_name; NSString*_sex; NSString*_phone; NSString*_address; NSString*_groupName; NSInteger_age; } -(insta..
分类:其他好文   时间:2014-08-22 02:52:46    阅读次数:168
block对象传递事件
MyScrollView.h@property (nonatomic,assign) NSInteger currentPage;@property (nonatomic,strong) NSInteger (^numberOfPage)(MyScrollView *);@property (non...
分类:其他好文   时间:2014-08-21 14:58:54    阅读次数:166
1059条   上一页 1 ... 95 96 97 98 99 ... 106 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!