摘要:
//将网络数据加载到本地 NSString *strUrl=@"http://10.0.8.8/sns/my/user_list.php?page=1&number=5"; NSURL *url=[NSURL URLWithString:strUrl]; NSData *data=[[NSDa...
阅读全文
posted @ 2015-04-24 20:10
jsonUserList
阅读(333)
推荐(0)
编辑
摘要:
//获得本应用程序的沙盒目录 NSArray *array=NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *path=[array objectAtIndex:0...
阅读全文
posted @ 2015-04-22 21:02
jsonUserList
阅读(205)
推荐(0)
编辑
摘要:
UIImageView *imgView=[[UIImageView alloc]initWithFrame:CGRectMake(100, 100, 75, 75)]; imgView.image=[UIImage imageNamed:@"a"]; imgView.tag=200; [se...
阅读全文
posted @ 2015-04-16 20:26
jsonUserList
阅读(241)
推荐(0)
编辑
摘要:
- (UIImage *)clipImage: (UIImage *)image inRect: (CGRect) rect{//返回image中rect范围内的图片 CGImageRef imageRef = CGImageCreateWithImageInRect(image.CGImage,...
阅读全文
posted @ 2015-04-16 17:21
jsonUserList
阅读(605)
推荐(0)
编辑
摘要:
//创建警告框对象UIAlertView *alertView=[[UIAlertView alloc]initWithTitle:@"警告!" message:@"您确定退出吗?" delegate:self cancelButtonTitle:@"取消" otherButtonTitles:@"...
阅读全文
posted @ 2015-04-14 19:18
jsonUserList
阅读(340)
推荐(0)
编辑
摘要:
//创建UIView对象//可以将其他空间添加到view上,当挪动View时,其他控件随之挪动UIView *view=[[UIView alloc]init];view.frame=CGRectMake(100,200,100,100);view.backgroundColor=[UIColor ...
阅读全文
posted @ 2015-04-10 19:54
jsonUserList
阅读(292)
推荐(0)
编辑
摘要:
UIView *redView=[[UIView alloc]initWithFrame:CGRectMake(0,20,200,200)];redView.backgroundColor=[UIColor redColor];//允许子视图放大或缩小 默认autoresizeSubviews的就为...
阅读全文
posted @ 2015-04-10 19:06
jsonUserList
阅读(343)
推荐(0)
编辑
摘要:
NSMutableArray *mutArray=[[NSMutableArray alloc]init];for(int i=1;i<13;i++){//创建图片名称NSString *imgName=[[NSString alloc]initWithFormat:@"player%i.png",...
阅读全文
posted @ 2015-04-10 09:01
jsonUserList
阅读(370)
推荐(1)
编辑
摘要:
static 关键字,只初始化一次如果程序运行中没有改变它的值的话会一直根据程序变化 NSArray *array=@[@"车",@"马",@"象",@"王",@"后",@"象",@"马",@"车"]; for (int i=0; i<8; i++) { for (int j=0; j<8; j++
阅读全文
posted @ 2015-04-10 08:48
jsonUserList
阅读(112)
推荐(0)
编辑
摘要:
//旋转180度button.transfrom=CGAffineTransformMakeRotation(M_PI);//将字符串按照+-*/进行分割NSArray *array=[self.showLabel.text componentSeparatedByCharactersInSet:[...
阅读全文
posted @ 2015-04-09 14:20
jsonUserList
阅读(119)
推荐(0)
编辑