随笔分类 - iOS
摘要:#import @interface TestCell : UITableViewCell@property (weak, nonatomic) IBOutlet UILabel *firstLabel;@property (weak, nonatomic) IBOutlet UILabel *en...
阅读全文
摘要:使用方法:在故事版上把imageview的class名称设置为APAvatarImageView就可以显示圆形图,其他相关属性可以参考此类。demo下载地址https://github.com/ankurp/APAvatarImageView
阅读全文
摘要:#import #import "HMBannerView.h" @interface ViewController : UIViewController // Banner@property (nonatomic, strong) HMBannerView *bannerView; @end #...
阅读全文
摘要:#import "ViewController.h"@interface ViewController ()@end@implementation ViewController- (void)viewDidLoad{ [super viewDidLoad]; [self testDynamic...
阅读全文
摘要:#import "ViewController.h"@interface ViewController (){ NSArray *pickerArray;}@property (weak, nonatomic) IBOutlet UIPickerView *myPickerView;@end@...
阅读全文
摘要:#import @interface ZSDProgressView : UIView{ UIView *progressView;//进度view}//进度值@property(nonatomic,assign)float progress;@end#define UIColorFromRG...
阅读全文
摘要:#import @interface ZSDHelpCell : UITableViewCell@property (weak, nonatomic) IBOutlet UIImageView *selectImageView;@property(nonatomic,copy)NSString *q...
阅读全文
摘要:1:可以为类添加新的方法,但不能添加实例变量。2:第一,无法向类中添加新的实例变量。类别没有位置容纳实例变量。第二,名称冲突,即类别中的方法与现有的方法重名。当发生名称冲突时,类别具有更高的优先级。你的类别方法将完全取代初始方法,从而无法再使用初始方法。有些编程人员在自己的类别方法名中增加一个前缀,...
阅读全文
摘要:#import typedef void(^compeletionHandler) (NSInteger selectButtonIndex);@class ZSDCustom;@protocol ZSDCustomDelegate -(void)showCustomView:(ZSDCustom ...
阅读全文
摘要:#import "ViewController.h"@interface ViewController (){ UILabel *dynamicLabel;}@end@implementation ViewController- (void)viewDidLoad { if (!dynamic...
阅读全文
摘要:#import @interface FirstViewController : UIViewController@property (weak, nonatomic) IBOutlet UITextField *contentTxtField;@end#import "SecondViewCont...
阅读全文
摘要:#import @class ZSDCustomCell;//协议@protocol ZSDCustomCellDelegate //判断选择某行以及某行中的按钮-(void)deleteDidSelectCell:(ZSDCustomCell *)customCell andClickButton...
阅读全文
摘要:#import @interface ViewController : UIViewController@end#import "ViewController.h"@interface ViewController (){ NSMutableArray *dataArray;//uitablevi...
阅读全文
摘要:1:创建一个model数据模型#import @interface DataModel : NSObject//保存section中每行的数据@property(nonatomic,strong)NSMutableArray *array;//section名@property(nonatomic,...
阅读全文
摘要:40个GitHub上最受欢迎的iOS开源项目(一)http://www.weste.net/2013/8-1/92975.html40个GitHub上最受欢迎的iOS开源项目(二)http://www.weste.net/2013/8-1/92976.html
阅读全文
摘要:typedef void (^ simpleBlock) (void);typedef double (^multiplyTwoValues)(double, double);typedef void (^ simpleTestBlock) (int ,int);@implementati...
阅读全文
摘要:NSString *lookup=@"Hearts"; typedef void (^CaseBlock)(); NSDictionary *diction=@{@"Diamonds": ^(){ NSLog(@"Rich...
阅读全文
摘要:#import int main(int argc, const char * argv[]){ @autoreleasepool { //block的规则 //返回值类型(^block名称)(形参参数列表)一般形参变量名不用写= ^返回值类型(实参数列表){block体}...
阅读全文
摘要:#import NSInteger myCompare(id obj1,id obj2,void *context){ //不分大小写进行升序排序 //return [obj1 caseInsensitiveCompare:obj2]; return -[obj1 caseInsensitive...
阅读全文
摘要:- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{ self.window = [[UIWindowalloc] initWith...
阅读全文

浙公网安备 33010602011771号