2015年7月24日

uibutton的常用属性

摘要: //UIButton UIButton *button=[UIButton buttonWithType:UIButtonTypeSystem]; button.frame=CGRectMake(100, 100, 100, 100); button.backgroundColor=[UIColor... 阅读全文

posted @ 2015-07-24 10:06 yucaijiang 阅读(233) 评论(0) 推荐(0) 编辑

uitextfield的常用属性

摘要: //文本框 UITextField *textField=[[UITextField alloc] initWithFrame:CGRectMake(50, 50, 200, 50)]; //textField.backgroundColor=[UIColor yellowColor]; //文本... 阅读全文

posted @ 2015-07-24 10:05 yucaijiang 阅读(314) 评论(0) 推荐(0) 编辑

uilabel的常用属性

摘要: UILabel *label=[[UILabel alloc] initWithFrame:CGRectMake(100, 100, 100, 200)]; label.backgroundColor=[UIColor yellowColor]; label.text=@"账号";//不可更改文... 阅读全文

posted @ 2015-07-24 10:04 yucaijiang 阅读(178) 评论(0) 推荐(0) 编辑

uiview的常用属性

摘要: //背景颜色 self.window.backgroundColor = [UIColor whiteColor]; //让window能够显示出来 //透明度 self.window.alpha=1.0; /* //所有的控件都继承与UIView //第一步:对视图开辟空间,并初始化 UIVie... 阅读全文

posted @ 2015-07-24 10:03 yucaijiang 阅读(169) 评论(0) 推荐(0) 编辑

根据服务器返回值做判断

摘要: if ([responseObject[@"msg"]isEqualToString:@"暂时还没有收藏产品!"]) {// UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"没有收藏产品" message:nil delegate:... 阅读全文

posted @ 2015-07-24 09:51 yucaijiang 阅读(229) 评论(0) 推荐(0) 编辑

解析字典套字典

摘要: //解析字典套字典-(void)requestUrl{ NSString *str = [NSString stringWithFormat:@"http://www.aliyueba.com:8080/ci/index.php/api/lists/shop_de?shopid=%@&cateid=... 阅读全文

posted @ 2015-07-24 09:47 yucaijiang 阅读(280) 评论(0) 推荐(0) 编辑

解析字典套数组套字典(有分业功能)

摘要: //解析字典套数组套字典-(void)requestUrl{ //NSUserDefaults *user = [NSUserDefaults standardUserDefaults]; //[user valueForKey:@"用户"]; NSUserDefaults *user = [NSU... 阅读全文

posted @ 2015-07-24 09:45 yucaijiang 阅读(372) 评论(0) 推荐(0) 编辑

跳转到storyboard控制器代码

摘要: - (IBAction)loginAction:(id)sender { UIStoryboard *main=[UIStoryboard storyboardWithName:@"Main" bundle:nil];//storyboard标示 RegisterViewController *... 阅读全文

posted @ 2015-07-24 09:41 yucaijiang 阅读(229) 评论(0) 推荐(0) 编辑

2015年7月23日

获取iOS各种文件路径

摘要: //得到Document目录:NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);NSString *documentsDirectory = [paths ... 阅读全文

posted @ 2015-07-23 13:36 yucaijiang 阅读(253) 评论(0) 推荐(0) 编辑

禁用系统休眠

摘要: [UIApplication sharedApplication].idleTimeDisabled = YES 阅读全文

posted @ 2015-07-23 13:33 yucaijiang 阅读(191) 评论(0) 推荐(0) 编辑

导航