NSMutableSet *set=[NSMutableSet set]; [_list enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { [set addObject:obj[@"Measu...
分类:
移动开发 时间:
2014-10-27 12:21:34
阅读次数:
727
-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{//返回两个分区 return 2;}-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSect....
分类:
其他好文 时间:
2014-10-24 20:33:09
阅读次数:
142
ViewController.h
#import
@interface ViewController : UIViewController
{
UIImage *_image;
NSInteger _index;
}
@endViewController.m
#import "ViewController.h"
#import "Person.h"
@interface...
分类:
其他好文 时间:
2014-10-23 14:26:57
阅读次数:
161
判断横竖屏。http://www.cocoachina.com/ask/questions/show/121301//self.cameraView是相机view - (NSUInteger)supportedInterfaceOrientations{ UIInterfaceOrientat...
分类:
移动开发 时间:
2014-10-23 12:13:03
阅读次数:
289
1.iOS 5.0之前的做法- (UIImage *)stretchableImageWithLeftCapWidth:(NSInteger)leftCapWidth topCapHeight:(NSInteger)topCapHeight;2.iOS 5.0的做法- (UIImage *)resi...
分类:
移动开发 时间:
2014-10-21 15:11:45
阅读次数:
175
Objective-c 之Foundation之NSNumber ,NSValue, NSDate1、NSNumber具体用法如下:在Objective-c中有int的数据类型,那为什么还要使用数字对象NSNumber。这是因为很多类(如NSArray)都要求使用对象,而int不是对象。NSNumb...
分类:
其他好文 时间:
2014-10-18 22:15:55
阅读次数:
199
在POP源代码中如下代码片段:struct _POPPropertyAnimationState : _POPAnimationState{ NSUInteger valueCount; valueCount(nil)}使用Xcode6.0.1打开项目会出现如下截图错误(Xcode5中不会出现).....
分类:
其他好文 时间:
2014-10-16 14:15:32
阅读次数:
222
#import @interface ClassVirable : NSObject{ NSInteger year;//保护树形}@property int age;//不用在实现文件中写@synthesize age就会有setAge:和age方法了-(void)set:(NSIntege...
分类:
其他好文 时间:
2014-10-15 12:00:20
阅读次数:
147
创建一个类需要两个部分:接口和实现-----.h 头文件 相当于接口@interface Aa: NSObject //基类{//成员变量声明//大括号内部,添加当前类属性 //字符串类型 NSString *name; //姓名 NSString是一个类 //整型类型 NSInteger...
分类:
移动开发 时间:
2014-10-14 20:28:49
阅读次数:
213
NSRange的定义
typedef struct _NSRange
{
NSUInteger location;
NSUInteger length;
} NSRange;
NSRange是一个结构体,其中location是一个以0为开始的index,length是表示对象的长度。他们都是NSUInteger类型。 而NSUInteger类型...
分类:
其他好文 时间:
2014-10-14 18:25:29
阅读次数:
165