代码改变世界

细节知识点的记忆

2015-10-02 20:50  真实16  阅读(163)  评论(0)    收藏  举报
1:字符串的拼接
NSTring *path = [NString stringWithFormat:@“%@%@%@@“,需要打印的东西];
 
2: 消除状态栏对View 中的影响
self.edgesForExtendedLayout = UIRectEdgeNone;
 
3: 隐藏状态栏
- (BOOL) prefersStarsBarHidder
{
    return YES;
 
}
 

    一句代码,导航栏上的左右按钮(添加标题,添加突发事件)

      self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc]initWithTitle:nil style:UIBarButtonItemStylePlain target:self action:@selector(selectRightAction:)]; 

字符串替换
     stringByReplaceingOccurrencesOfString: withString;
 
 
给定一个字符串,判断字符中是否还有png ,有就删除他,?
[string stringByReplacingOccurenceOfString:@“png”withString:@“”];