IOS基础:NSTimer类的使用
摘要:创建一个 Timer+scheduledTimerWithTimeInterval: invocation: repeats:+ (NSTimer *)scheduledTimerWithTimeInterval:(NSTimeInterval)ti invocation:(NSInvocation *)invocation repeats:(BOOL)yesOrNo;+scheduledTimerWithTimeInterval: target: selector: userInfo: repeats:+ (NSTimer *)scheduledTimerWithTimeInterval..
阅读全文
IOS基础:ActionSheet(上拉菜单)的实现
摘要:一看图就明白了,毋需多说。[java] view plaincopyprint?UIActionSheet*mySheet=[[UIActionSheetalloc]initWithTitle:@"ActionChoose"delegate:selfcancelButtonTitle:@"Cancel"destructiveButtonTitle:@"Destroy"otherButtonTitles:@"OK",nil];[mySheetshowInView:self.view];与UIAlertView类似,我
阅读全文
IOS基础:深入理解Objective-c中@class的含义
摘要:objective-c中,当一个类使用到另一个类时,并且在类的头文件中需要创建被引用的指针时,如下面代码:A.h文件C代码 #import"B.h" @interfaceA:NSObject{ B*b; } @end#import "B.h" @interface A : NSObject { B *b;}@end 为了简单起见:A类是引用类,B类是被引用类,这里先不考虑A类的实现文件。通常引用一个类有两种办法: 一种是通过#import方式引入;另一种是通过@class引入;这两种的方式的区别在于:1、#import方式会包含被引用类的所有信息,包括被
阅读全文