摘要:+(void)setAppIconNumber:(NSInteger)num{ if ([UIParam getIOSVersion]>8.0) { UIUserNotificationSettings *settings = [UIUserNotificationSetting...
阅读全文
摘要:1、监测UI变量的变化return 后把值传递下去。1.1、输出[self.usernameTextField.rac_textSignal subscribeNext:^(id x){ NSLog(@"%@", x);}];1.2、过滤->输出[[self.usernameTextField.r...
阅读全文
摘要:MVCView直接访问Model,View包含Model信息,包括业务逻辑。 MVC模型里Model不变,Model不依赖于View,但是 View依赖于Model。因为View实现了一些业务逻辑,导致更改View比较困难,业务逻辑无法重用。MVVM页面与数据逻辑分离。通过绑定技术把页面和数据关联起...
阅读全文
摘要:1.添加pch文件2、修改工程配置文件Building Settings->All->Apple LLVM 6.0 -Language -> Prefix Header
阅读全文
摘要:1、安装CocoaPods 1.00、参考 CocoaPods 文档 卸载: https://www.jianshu.com/p/8b61b421dd76 1.01、是否已安装 which pod 1.1、升级gem命令 sudo gem update --system 1.2、切换CocoaPod
阅读全文
摘要:发送消息: NSDictionary *dict=[[NSDictionary alloc]initWithObjectsAndKeys:@"num",[NSString stringWithFormat:@"%d",person.i_Msg], nil]; [[NSNotificationCent...
阅读全文
摘要:效果:重影原因:多次创建控件元素解决:在initWithStyle中进行初始化元素
阅读全文
摘要:[tableView deselectRowAtIndexPath:indexPath animated:YES];
阅读全文
摘要:-(void)initTimer{ //时间间隔 NSTimeInterval timeInterval = 1.0 ; //定时器 NSTimer *showTimer = [NSTimer scheduledTimerWithTimeInterval:timeInterval target:se
阅读全文
摘要:-(void) playSound{ NSString *path = [[NSBundle mainBundle] pathForResource:@"in" ofType:@"caf"]; if (path) { //注册声音到系统 AudioServic...
阅读全文
摘要:UIResponder* nextResponder = [self.view.superview.superview nextResponder]; if ([nextResponder isKindOfClass:[UIViewController class]]) { ...
阅读全文
摘要:+(CoachType *)sharedInstance{ static CoachType *sharedInstance = nil; static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ ...
阅读全文
摘要:1.sudo gem install cocoapods: ERROR:While executing gem ... (Errno:EPERM) Operation not permitted - /usr/bin/pod 1.1 解决尝试一 1.1.1 步骤 自定义GEM_HOME$ mkdir
阅读全文
摘要:UIWindow *win = [[UIApplication sharedApplication].windows objectAtIndex:0]; for (UIView* uv in win.rootViewController.view.subviews) { if([...
阅读全文
摘要:方式一:[UIView animateWithDuration:1 animations:^{ //动画的内容 CGRect frame = CGRectMake([UIParam widthScreen]-25, 54, 0, 0); [self setF...
阅读全文
摘要:UITapGestureRecognizer *doubleClick = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(PictureClick:)]; doubleClick.numberOfTaps...
阅读全文