美文网首页
iOS知识点积累,持续更新中

iOS知识点积累,持续更新中

作者: 超_iOS | 来源:发表于2017-07-27 13:47 被阅读40次

1.iOS上架流程

2.替换文本

xcode全局替换.png

3.JS知识点
http://www.jianshu.com/p/069622ce3a07

4.打开Archive
选中Xcode然后 状态栏Window - >Organizer就可以看到所有的Archive版本啦

5.AFN发送AU

 [manager.requestSerializer setValue: [self getAU] forHTTPHeaderField:@"User-Agent"];

- (NSString *)getAU{//AU传的随意
    NSString *str = @"zidingyi";
    NSString *version = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"];
    NSString *system = [[UIDevice currentDevice] systemVersion];
    NSString *sysName = [[UIDevice currentDevice] systemName];
    NSString *model = [[UIDevice currentDevice] model];
    NSString *AUStr = [NSString stringWithFormat:@"%@/%@ (%@; %@ %@)",str,version,model, sysName,system];
    // DLog(@"%@",AUStr);
    return AUStr;
}

6.指定UIView的某几个角为圆角

 self.numLB.frame = CGRectMake(0, 15 + 20 + 8,  self.numWidth , 20);
 UIBezierPath *path = [UIBezierPath bezierPathWithRoundedRect:self.numLB.bounds byRoundingCorners:UIRectCornerBottomRight cornerRadii:CGSizeMake(10, 10)];
    CAShapeLayer *layer = [[CAShapeLayer alloc] init];
    layer.frame = self.numLB.bounds;
    layer.path = path.CGPath;
    self.numLB.layer.mask = layer;

7.UIButton设置不同颜色文字

NSAttributedString *str = ...
 [btn setAttributedTitle:str forState:UIControlStateNormal];

8.XCODE查看某段代码是谁写的
选中哪行代码,右键 , show blame for line.

9.XCODE 跳转带某行
command+L
10.tableview CELL 分割线置顶

- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
{
    if ([cell respondsToSelector:@selector(setSeparatorInset:)]) {
        [cell setSeparatorInset:UIEdgeInsetsZero];
    }
    if ([cell respondsToSelector:@selector(setPreservesSuperviewLayoutMargins:)])
    {
        [cell setPreservesSuperviewLayoutMargins:NO];
    }
    if ([cell respondsToSelector:@selector(setLayoutMargins:)])
    {
        [cell setLayoutMargins:UIEdgeInsetsZero];
    }
}
  1. tableview
tableView.separatorStyle = UITableViewCellSeparatorStyleNone;//取消cell分割线
cell.selectionStyle =  UITableViewCellSelectionStyleNone;//取消选中效果

cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
 cell.accessoryView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"更多"]];//小箭头图片修改

12.状态栏颜色修改

[UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleDefault

13.阴影效果

_imgView.layer.shadowColor = [UIColor blackColor].CGColor;//设置阴影的颜色

_imgView.layer.shadowOpacity = 0.8;//设置阴影的透明度

_imgView.layer.shadowOffset = CGSizeMake(1, 1);//设置阴影的偏移量

_imgView.layer.shadowRadius = 3;//设置阴影的圆角


更多点击:知识点2

相关文章

网友评论

      本文标题:iOS知识点积累,持续更新中

      本文链接:https://www.haomeiwen.com/subject/irezkxtx.html