摘要: 1.IOS8 注册远程通知 if([[UIDevice currentDevice].systemVersion floatValue] >= 8.0) { [[UIApplication sharedApplication] registerUserNotificationSettings:[UI 阅读全文
posted @ 2014-10-29 15:59 bluefi 阅读(281) 评论(0) 推荐(0) 编辑
摘要: 告警等级系统有四种内存警告,定义如下: typedef enum { OSMemoryNotificationLevelAny = -1, OSMemoryNotificationLevelNormal = 0, OSMemoryNotificationLe... 阅读全文
posted @ 2014-10-29 15:40 bluefi 阅读(262) 评论(0) 推荐(0) 编辑
摘要: [[[self view] layer] setBackgroundColor:[[UIColor blackColor] CGColor]]; UIImage *balloon = [UIImage imageNamed:@"dengni37.jpg"]; //图片层 CALayer... 阅读全文
posted @ 2014-08-20 15:46 bluefi 阅读(139) 评论(0) 推荐(0) 编辑
摘要: 设计模式六大原则(1):单一职责原则设计模式六大原则(2):里氏替换原则设计模式六大原则(3):依赖倒置原则设计模式六大原则(4):接口隔离原则设计模式六大原则(5):迪米特法则设计模式六大原则(6):开闭原则 阅读全文
posted @ 2014-08-19 11:34 bluefi 阅读(134) 评论(0) 推荐(0) 编辑
摘要: 23种设计模式全解析策略模式Strategy(对象行为型)状态模式State(对象行为型)模板方法模式桥接模式外观模式装饰者模式组合模式UML类图符号 各种关系说明以及举例 阅读全文
posted @ 2014-08-19 11:27 bluefi 阅读(85) 评论(0) 推荐(0) 编辑
摘要: 1.Serial Dispatch Queue 串行队列,每次只能执行一个线程,线程采用先进先出的执行顺序。 各个队列之间并行处理,也即每个队列对应一个系统线程,所以要注意不能过多生成Serial Dispatch Queue。2.Concurrent Dispatch Queue 并行队列,... 阅读全文
posted @ 2014-08-12 14:49 bluefi 阅读(178) 评论(0) 推荐(0) 编辑
摘要: 第三方框架: SDWebImage使用——一个可管理远程图片加载的类库 RegexKitLite 实现正则表达式 iPhone开发之全景展示(panoramagl) 富文本类库RTLabel MBProgressHUD提示框 EGOTableViewPullRefresh(一)实现下拉刷新 日历,万 阅读全文
posted @ 2014-07-29 14:50 bluefi 阅读(265) 评论(0) 推荐(0) 编辑
摘要: #define ColorWithString(string) [MPUniversal colorWithString:string]/*** 转换字符串为UIColor** @param string 字符串类型:ffffff六位,ffffffff八位,#ffffff,#ffffffff; 字符... 阅读全文
posted @ 2014-07-29 14:14 bluefi 阅读(494) 评论(0) 推荐(0) 编辑
摘要: #import @interface CXUnderLineButton : UIButton+ (CXUnderLineButton *) underlinedButton;@end#import "CXUnderLineButton.h"@implementation CXUnderLineBu... 阅读全文
posted @ 2014-07-29 10:22 bluefi 阅读(354) 评论(0) 推荐(0) 编辑
摘要: //可以不被电池栏挡住+ (UILabel *)alertLabel{ UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 20.f, 320.f, 0.f)]; label.backgroundColor = [UICo... 阅读全文
posted @ 2014-07-29 10:06 bluefi 阅读(252) 评论(0) 推荐(0) 编辑
摘要: 1.证书cer文件需要上传电脑CSR文件,所以其他电脑如需使用需要创建者导出,用于在项目在真机运行或archive的时候签名,Code Signing Identity.项目App ID,Provisioning Profile只要有管理员权限就可以申请,与cer文件对应。2.项目运行的目标设备设置... 阅读全文
posted @ 2014-07-29 10:03 bluefi 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 1.加载RowView.xib文件,创建Objects下面的所有控件: NSArray *views = [[NSBundle mainBundle] loadNibNamed:@"RowView" owner:nil options:nil]; 2.取出xib中的第一个子控件: UIView... 阅读全文
posted @ 2014-07-25 13:52 bluefi 阅读(395) 评论(0) 推荐(0) 编辑
摘要: 监听-(void)viewWillAppear:(BOOL)animated{ [super viewWillAppear:animated]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(key... 阅读全文
posted @ 2014-07-23 10:17 bluefi 阅读(250) 评论(0) 推荐(0) 编辑
摘要: #import @interface DPopoverView : UIView+ (void)showPopoverAtPoint:(CGPoint)point inView:(UIView *)view withContentView:(UIView *)cView;- (void)showPo... 阅读全文
posted @ 2014-07-23 10:11 bluefi 阅读(219) 评论(0) 推荐(0) 编辑
摘要: @property(nonatomic) UITextAutocapitalizationType autocapitalizationType; // default is UITextAutocapitalizationTypeSentences@property(nonatomic) UITe... 阅读全文
posted @ 2014-07-15 10:32 bluefi 阅读(466) 评论(0) 推荐(0) 编辑
摘要: m_listView:textview在tableview上,同时需要修改tableview高度//注册观察者 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboarWillShow:) na... 阅读全文
posted @ 2014-07-08 20:12 bluefi 阅读(265) 评论(0) 推荐(0) 编辑
摘要: 1.push消息机制细节2.网络请求(网络状况,断点续传)3.UML4.设计模式5.opengl 2.06.ios7 原生条码扫描,二维码7.java自学 阅读全文
posted @ 2014-07-08 18:04 bluefi 阅读(141) 评论(0) 推荐(0) 编辑
摘要: //如果图片大于maxSize,将图片高宽等比例缩放至maxSize- (UIImage *)imageWithConstrainSize:(CGSize)maxSize{ if(self.size.width <= maxSize.width && self.size.height <= max... 阅读全文
posted @ 2014-07-08 14:11 bluefi 阅读(171) 评论(0) 推荐(0) 编辑
摘要: #import @interface CXTextView : UITextView@property (strong, nonatomic) NSString *placeHolder;@property (strong, nonatomic) UIColor *placeHolderColor;... 阅读全文
posted @ 2014-07-08 11:17 bluefi 阅读(277) 评论(0) 推荐(0) 编辑
摘要: - (void)showPopoverAtPoint:(CGPoint)point inView:(UIView *)view withContentView:(UIView *)cView{ //self为弹出内容cView的superview self.boxFrame = cView.fram... 阅读全文
posted @ 2014-07-08 10:40 bluefi 阅读(128) 评论(0) 推荐(0) 编辑
摘要: http://nshipster.com/nsoperation/ 阅读全文
posted @ 2014-07-07 14:02 bluefi 阅读(96) 评论(0) 推荐(0) 编辑
摘要: 单一职责原则(SingleResponsibilityPrinciple)定义:不要存在多于一个导致类变更的原因。通俗的说,即一个类只负责一项职责。问题由来:类T负责两个不同的职责:职责P1,职责P2。当由于职责P1需求发生改变而需要修改类T时,有可能会导致原本运行正常的职责P2功能发生故障。解决方... 阅读全文
posted @ 2014-07-04 17:55 bluefi 阅读(176) 评论(0) 推荐(0) 编辑
摘要: 当你程序的view使用了手势UIGestureRecognizer,而你在这个view上面又添加了按钮,那么按钮的响应回调事件方法是不会被调用的,但是按钮是可以看到被按下的高亮效果。(ios4,ios5的bug,ios6就没有了)因为 根据响应链来看,这个view上的所有触摸事件都被手势给吸收了,所... 阅读全文
posted @ 2014-07-03 17:24 bluefi 阅读(263) 评论(0) 推荐(0) 编辑