摘要:- (void)viewDidLoad { [super viewDidLoad]; UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom]; btn.frame = CGRectMake(100, 100, 100, 50); bt 阅读全文
OC数组中文排序
2016-02-14 16:00 by xiangjune, 248 阅读, 0 推荐, 收藏, 编辑
摘要:-(void)sortStudentInfo { if(studentInfoArray && studentInfoArray.count > 0) { for(TWDetaiAnswerResultStudentInfoVO *studentInfo in studentInfoArray) { 阅读全文
uiwebview加载中文URL
2016-02-14 15:55 by xiangjune, 358 阅读, 0 推荐, 收藏, 编辑
摘要:uiwebview加载中文URL _paperGamePath = [_paperGamePath stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; NSLog(@"paper game path is: %@", _p 阅读全文
ios判断点击的坐标点
2015-12-03 14:30 by xiangjune, 574 阅读, 0 推荐, 收藏, 编辑
摘要:-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ NSSet *allTouches = [event allTouches]; //返回与当前接收者有关的所有的触摸对象 UITouch *touch = [all... 阅读全文
获取字符串在另一个字符串中出现的次数
2015-11-26 11:05 by xiangjune, 310 阅读, 0 推荐, 收藏, 编辑
摘要:-(int)getAppearCount:(NSString *)withStr{ NSString *searchStr = @"#BLANK#"; int count=0; for (int i = 0; i < withStr.length - searchStr.length + 1... 阅读全文
NSFileHandle
2015-11-20 15:48 by xiangjune, 174 阅读, 0 推荐, 收藏, 编辑
摘要:NSArray *pathArray = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentPath = [pathArray firstObj... 阅读全文
NSFileManager
2015-11-20 15:30 by xiangjune, 201 阅读, 0 推荐, 收藏, 编辑
摘要:NSArray *pathArray = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentPath = [pathArray firstObj... 阅读全文
NSData
2015-11-20 13:54 by xiangjune, 151 阅读, 0 推荐, 收藏, 编辑
摘要:NSArray *pathArray = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentPath = [pathArray firstObje... 阅读全文
UICollectionView
2015-11-18 17:15 by xiangjune, 234 阅读, 0 推荐, 收藏, 编辑
摘要:-(void)drawContentGridView:(int) yHeight{ // 设置layout UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc]init]; layout.scrollD... 阅读全文
CALayer 图层
2015-11-17 20:30 by xiangjune, 209 阅读, 0 推荐, 收藏, 编辑
摘要:// CALayer 图层属性,继承UIView都有该属性,可设置边框宽度、颜色、圆角、阴影等 UIImageView *imageView = [[UIImageView alloc]initWithFrame:CGRectMake(100, 100, 200, 150)]; image... 阅读全文