比如- (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component{ [self.pickerViewremoveFromSuperview]; .....
分类:
其他好文 时间:
2014-08-29 17:59:28
阅读次数:
222
//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
当使用Objective-C的时候,你总会遇到Foundation框架中的一些类,这些类包含NSString,NSNumber,NSArray和NSDictionary,这些数据结构都是自解释的。 Objective-C以简明具体的语法而著名,自从oc1.0有一个简单的方式定义一个NSStri...
分类:
其他好文 时间:
2014-08-27 20:31:28
阅读次数:
215
我们在编码中,很多时候需要将C里面原生的数据封装成对象,这样可以用NSDictionary或者NSArray来存取访问。尤其是一些做适配的情况下,这种封装是不可避免的。Objective-C提供了不少类可以帮助我们,比较常见的是NSNumber,NSValue和NSData。NSNumber主要是用...
分类:
其他好文 时间:
2014-08-26 11:15:06
阅读次数:
270
首先我们知道,UIAlertView实际上有多种样式,在xcode中,按住cmd点击UIAlertView,进入头文件我们看到:1 typedef NS_ENUM(NSInteger, UIAlertViewStyle) {2 UIAlertViewStyleDefault = 0, //默...
分类:
移动开发 时间:
2014-08-24 19:16:03
阅读次数:
338
.h文件。。。。。。。@interfacebook:NSObject
/*{
NSString*_bookName;//书名
CGFloat_bookThickness;//厚度
NSString*_bookType;//书类型
NSInteger_bookPrice;//书价格
NSString*_publishingHouse;//出版社
NSString*_publishintTime;//出版时间
}*///在@property里面,其..
分类:
其他好文 时间:
2014-08-23 19:11:51
阅读次数:
150
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
首先要创建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
MyScrollView.h@property (nonatomic,assign) NSInteger currentPage;@property (nonatomic,strong) NSInteger (^numberOfPage)(MyScrollView *);@property (non...
分类:
其他好文 时间:
2014-08-21 14:58:54
阅读次数:
166