自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(2)
  • 资源 (5)
  • 收藏
  • 关注

原创 关于iOS 各个iPhone 尺寸图标的适配

现在主流的iPhone的屏幕有三种:iPhone5/5s  iPhone6/6s  iPhone6P/iPhone/6sP 也就是我们所说的1倍  2倍 3倍。最标准的适配方式因该是UI切三套图,图标分别以 *.png  *2@x.png  *3@x.png命名,程序运行会自动选取对应的图片。指的注意的是当某个倍数的图标缺失时,会选择其他倍数的图标代替,这样就会造成iPhone的适配问题。例如

2016-07-25 19:54:04 7090

原创 iOS8 UIAlertView 和 UIActionSheet 的新用法 UIAlertController详解

添加了新的类 UIAlertController 和 UIAlertAction 来取代曾经的 UIAlertView 和 UIActionSheet,感觉警告窗口的结构更容易理解了,使用起来也更简便。但是曾经用 Xcode 5 创建过 iOS 7程序在iOS 8 设备上运行就会出现各种问题。我清晰地记得刚刚升级 iOS 8 后连微信的警示操作表也出了问题,猜测可能是因此而起的。  

2016-07-30 11:29:42 431

iOS SDK 9.3下载 解决Could not find Developer Disk Image问题

iOS 9.3 真机调试解决“Could not find Developer Disk Image”问题,资源包: 将文件解压拖入目录 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport 中,运行Xcode即可

2016-04-22

时尚最牛逼最好用最简单的分段选择控制器

分选选择器 修改一些参数可以当做选项卡来用

2016-04-14

自己封装的轮播滚动控件ScrollViewpage

用collection view封装的非常好用的ScrollViewpage轮播控件

2016-01-29

飞机大战小游戏

自己写的一个非常简单的飞机大战小游戏,对于动画的基础学习有帮助

2016-01-29

iOS http 学习

简单的http demo - (IBAction)get_btn_touch_up_inside:(id)sender { //K1+车次+K2 NSString *url=[K1 stringByAppendingString:self.m_trainName.text]; url=[url stringByAppendingString:K2]; NSURL *urlRquest=[NSURL URLWithString:k4]; NSURLRequest *request=[NSURLRequest requestWithURL:urlRquest]; NSLog(@"get_begin");//开始get的方法发送数据最好写成GCD的方式 NSURLResponse *response=nil;//获取服务器的响应返回 NSError *error=nil;//获取错误的信息 NSData *data=[NSURLConnection sendSynchronousRequest:request returningResponse:&response error:&error];//等到了要刷新界面 NSHTTPURLResponse *httpResponse=(NSHTTPURLResponse*)response; NSString *str=[[NSString alloc]initWithData:data encoding:NSUTF8StringEncoding]; NSDictionary *dict=[NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableLeaves error:nil]; NSLog(@"%@",str); } //post方法 - (IBAction)post_btn_touch_up_inside:(id)sender { NSString *strTrainCode=self.m_trainName.text;//获取火车车次代码 NSString *strUserId=@"";//用户id,不需要赋值 NSString *strURL=k4;//请求的URL地址 NSString *strBody=[NSString stringWithFormat:@"TrainCode=%@&UserIDR=%@",strTrainCode,strUserId];//表示后面 NSString *length=[NSString stringWithFormat:@"%d",[strBody length]]; NSMutableURLRequest *request=[[NSMutableURLRequest alloc]init];//客户端向服务端请求的类 [request setURL:[NSURL URLWithString:strURL]];//设置http地址 [request setHTTPMethod:@"POST"];//设置发送方法 [request setTimeoutInterval:10];//设置连接超时,默认240秒 [request setValue:length forHTTPHeaderField:@"Content-Length"];//设置数据长度 [request setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Contene-Type"];//设置数据格式 [request setHTTPBody:[strBody dataUsingEncoding:NSUTF8StringEncoding]];//设置携带的消息体,准备请求 NSURLResponse *response=nil;//获取服务器的响应返回 NSError *error=nil;//获取错误的信息 NSData *data=[NSURLConnection sendSynchronousRequest:request returningResponse:&response error:&error];//等到了要刷新界面 NSHTTPURLResponse *httpResponse=(NSHTTPURLResponse*)response; NSString *str=[[NSString alloc]initWithData:data encoding:NSUTF8StringEncoding]; NSLog(@"%@",str); self.m_textView.text=str; }

2015-08-13

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除