又开始自我否定了,每天回去只有泡脚坚持下来了,没刷牙,没敲代码,天天刷知乎,连续有四天了,为啥是现在的水平,就是自己不努力啊,跟别人一样浪费时间啊,
早晨醒来一定要赖床半小时,晚上又不想早睡,没吊事,还装逼不下班,不下班还瞎搞不写代码
怎么办?
冥想,积极暗示,睡前冥想,早上写计划,白天别跟玉玉聊天,
睡前刷牙,洗脸,敲代码,敲点啥都行,
早上地忒上看笔记.
Ios6设置label字体多种颜色
/**
* iOS6设置label字符串多种颜色
*
* @param startString 开始的一段字符串
* @param colorString 变色字符串
* @param endString 结束字符串
* @param label 带变色文字的label
*/
- (void)ios6ColorStartString:(NSString *)startString
colorString:(NSString *)colorString
endString:(NSString *)endString
label:(UILabel *)label{
NSString *textStyle = @"<style color=#666666 font=14>%@</style><style font=14 color=#000000>%@</style><style font=14 color=#666666>%@</style>";
textStyle = [NSString stringWithFormat:textStyle, startString, colorString,endString];
[label hdf_setAttributedText:textStyle];
}
---------------------------------------------------------------------------------------------------------------------------------------------------
/**
* 纠正导航栏偏移
*/
- (void)makeNavTitleCentre {
if (kIsIOS7OrLater) {
NSArray *viewControllerArray = [self.navigationController viewControllers];
long previousViewControllerIndex = [viewControllerArray indexOfObject:self] - 1;
UIViewController *previous;
if (previousViewControllerIndex >= 0) {
previous = [viewControllerArray objectAtIndex:previousViewControllerIndex];
previous.navigationItem.backBarButtonItem = [[UIBarButtonItem alloc]
initWithTitle:@""
style:UIBarButtonItemStylePlain
target:self
action:nil];
}
}
}
---------------------------------------------------------------------------------------------------------------------------------------------------
pop到某个控制器的处理
JPG图片在imageName方法中要添加.JPG
------------------------------------------------------------------------------------------------
case加大括号 才能在里面new控制器 Alloc init
--------------------------------------------------------------------------------
滑动不能返回,因为自己写了 返回按钮, 用系统的就能滑动返回
--------------------------------------------------------------------------------
环境不行,因为配置了代理,去掉代理,就能正常访问网络了
------------------------------------------------------
-(void)finishButtonClick {
NSMutableArray * vcs = [[NSMutableArray alloc] init];
NSInteger num = [self.navigationController.viewControllers count]-1;
for (NSInteger i = num; i>=0; i-- ) {
UIViewController *vc = self.navigationController.viewControllers[i];
if ([vc isKindOfClass:[FlowViewController class]]) {
[(FlowViewController *)vc refreshCaseInfo];
// vc isKindOfClass:[]; // 如果有流控制器 // 流页面触发-去流页面
[self.navigationController popToViewController:vc animated:YES];
return;
}else if([vc isKindOfClass:[WorkSpaceViewController class]]){
NSMutableArray *controllers = [NSMutableArray arrayWithArray:self.navigationController.viewControllers];
[controllers removeObjectsInArray:vcs];
HDFPrescriptionListViewController *listVC = [HDFPrescriptionListViewController new];
[controllers addObject:listVC];
listVC.hidesBottomBarWhenPushed = YES;
[self.navigationController setViewControllers:controllers animated:YES];
return;
}
else if([vc isKindOfClass:[HDFPrescriptionViewController class]]){
[self.navigationController popToViewController:vc animated:YES];
return;
}
[vcs addObject:vc];
}
}