Objective-C数组相关操作。// insert code here...NSLog(@"数组");//指定多个字符串创建数组NSArray *array;array=[NSArrayarrayWithObjects:@"0-asd",@"1-fds",@"2-哈咯",@"3-个人",nil]...
分类:
编程语言 时间:
2015-04-07 13:30:01
阅读次数:
151
从ViewController跳转到FirstViewController, 在FirstViewController中传一个NSInteger值回来
ViewController.m
#import "ViewController.h"
#import "FirstViewController.h"
@interface
ViewControl...
分类:
移动开发 时间:
2015-04-03 17:33:55
阅读次数:
312
-(BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string{ ?? ? ? ? NSInteger existedLength = textField.text.length; ? ? NS...
分类:
移动开发 时间:
2015-04-03 01:41:11
阅读次数:
353
原理iOS 和 SQL的对应关系Model类结构 => SQL表结构Model实例 => SQL表中的一行Model实例的属性 => SQL表中的一列Model和Table的对应@interface TestModel :NSObject
@property (assign, nonatomic) NSInteger age;
@property (assi...
分类:
移动开发 时间:
2015-04-01 23:48:00
阅读次数:
181
#import typedef NS_ENUM(NSInteger, EcolorDirectionType){ EcolorDirectionUp, //上 EcolorDirectionDown, //下 EcolorDirectionRight, //右 Eco...
分类:
其他好文 时间:
2015-04-01 19:51:30
阅读次数:
121
int是静态类型NSInteger是动态类型苹果官方推荐使用NSInteger,因为在苹果的api实现中,NSInteger是一个封装,它会识别当前操作系统的位数,自动返回最大的类型。定义的代码类似于下:#if __LP64__ || TARGET_OS_EMBEDDED || TARGET_OS_...
分类:
其他好文 时间:
2015-03-31 12:33:26
阅读次数:
120
首先,在tableViewController中设置好 代理和数据源方法:@interface FirstTableViewController()实现一系列的数据源方法:让其显示数据 例如 简单显示 几行 :#pragma mark 数据源方法/*** 一共有多少组数据*/-(NSInteger)...
分类:
其他好文 时间:
2015-03-29 14:59:44
阅读次数:
130
@interface JSIndexPath : NSObject@property (nonatomic, assign) NSInteger column;
@property (nonatomic, assign) NSInteger leftOrRight;
@property (nonatomic, assign) NSInteger leftRow;
@property (nonatom...
分类:
其他好文 时间:
2015-03-28 15:48:34
阅读次数:
132
拾取器是个常用控件。 在使用拾取器之前需要引用两个协议 还需要连接 datesource & delegate 调用协议后,需要重写三个方法 -(NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView ...
分类:
移动开发 时间:
2015-03-21 15:31:16
阅读次数:
137
#import NSInteger codeLineCount(NSString *path){ //1.获取文件管理者,这是一个单例 NSFileManager *manage = [NSFileManager defaultManager]; //2.判断文件夹or文件 BOOL dir...
分类:
其他好文 时间:
2015-03-20 23:41:01
阅读次数:
155