摘要: iOS MD5加密算法 1 #import // Need to import for CC_MD5 access 2 3 4 - (NSString *)md5:(NSString *)str 5 { 6 const char *cStr = [str UTF8String]; 7 ... 阅读全文
posted @ 2014-10-08 15:59 hshd123 阅读(397) 评论(0) 推荐(0)
摘要: 一 控制器的创建方式1、storyboard创建 1 self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; 2 3 self.window.backgroundColor = [UI... 阅读全文
posted @ 2014-10-03 22:30 hshd123 阅读(246) 评论(0) 推荐(0)
摘要: @interface UIView : UIResponder/*** 通过一个frame来初始化一个UI控件*/- (id)initWithFrame:(CGRect)frame;// YES:能够跟用户进行交互@property(nonatomic,getter=isUserInteractio... 阅读全文
posted @ 2014-10-03 01:08 hshd123 阅读(246) 评论(0) 推荐(0)
摘要: 一.UIPickerView1.UIPickerView的常见属性// 数据源(用来告诉UIPickerView有多少列多少行)@property(nonatomic,assign) id dataSource;// 代理(用来告诉UIPickerView每1列的每1行显示什么内容,监听UIPick... 阅读全文
posted @ 2014-10-03 01:02 hshd123 阅读(906) 评论(0) 推荐(0)
摘要: 一 、用XIB封装View的步骤1.新建一个xib文件描述一个view的内部结构(假设叫做SDTgCell.xib)●2.新建一个自定义的类(自定义类需要继承自系统自带的view, 继承自哪个类, 取决于xib根对象的Class)●3.新建类的类名最好跟xib的文件名保持一致(比如类名就叫做SDTg... 阅读全文
posted @ 2014-10-02 00:27 hshd123 阅读(282) 评论(0) 推荐(0)
摘要: //知识点说明 一、MVC 设计模式 M (Model-数据模型)用于存储数据的数据模型,以及NSArray,NSDictionary等存储数据的Fundation对象 V (view-视图)用于显示数据的视图,(UIView及其子类,还有我们自己封装的视图类等) C (Controller-控制器... 阅读全文
posted @ 2014-09-29 09:05 hshd123 阅读(225) 评论(0) 推荐(0)
摘要: 1 1.取较大文件,大图 2 NSString *Path = [[NSBundle mainBundle] pathForResource:@"data" ofType:@"plist"]; 3 NSString *str = [NSString stringWithContentsOf... 阅读全文
posted @ 2014-09-29 09:04 hshd123 阅读(407) 评论(0) 推荐(0)
摘要: 1,iOS中AFN Get请求包含中文时崩溃NSString *search = @"http://60.206.137.156:8020/video_api/user/search/51234562346412e86a730d94fef7cc73/中";[manger GET: search pa... 阅读全文
posted @ 2014-09-28 19:24 hshd123 阅读(140) 评论(0) 推荐(0)
摘要: 1 // 帮助实现单例设计模式 2 3 // .h文件的实现 4 #define SingletonH(methodName) + (instancetype)shared##methodName; 5 6 // .m文件的实现 7 #if __has_feature(objc_arc) //... 阅读全文
posted @ 2014-09-26 23:13 hshd123 阅读(216) 评论(0) 推荐(0)
摘要: /** 获得颜色*/#define kGetColor(r, g, b) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1]/** 导航栏默认高度*/#define NavigationBar_HEIGHT ... 阅读全文
posted @ 2014-09-26 10:05 hshd123 阅读(254) 评论(0) 推荐(0)