随笔分类 -  iOS

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