2013年1月31日

SDWebImage自动下载图片

摘要: 加入SDWebImage文件夹(其实就一个NSString+URLEncoding,后面会贴出来)---------------------------------ViewController.m#import "ViewController.h"#import "UIImageView+WebCache.h"#import "NSString+URLEncoding.h"@implementation ViewController- (void)viewDidLoad{ [super viewDidLoad]; UIImageVi 阅读全文

posted @ 2013-01-31 10:34 灰色的人 阅读(2181) 评论(0) 推荐(0) 编辑

2013年1月30日

再用Udp--聊天工具

摘要: 加入AsynScoket ( 要用到里边的Udp) 导入CFNetwork.framework库------顶上加UINavigationControlle-------------1.第一个页面ViewController中 UI ipField输入框-----输入对方ip Event beginChat按钮点击事件-----跳转到第二个页面,并把ip字符串传过去2.第二个页面ChatViewController中 UI _tableView表单-----显示双方对话 sendView------自己操作模块 ---... 阅读全文

posted @ 2013-01-30 13:49 灰色的人 阅读(614) 评论(0) 推荐(0) 编辑

2013年1月29日

ASIHttpRequst异步下载

摘要: ViewController.h 1 #import <UIKit/UIKit.h> 2 #import "ASIHTTPRequest.h" 3 4 @interface ViewController : UIViewController 5 <ASIHTTPRequestDelegate> 6 { 7 UIImageView* imageView; 8 } 9 10 @endViewController.m 1 #import "ViewController.h" 2 3 @implementation ViewControl 阅读全文

posted @ 2013-01-29 15:55 灰色的人 阅读(433) 评论(0) 推荐(0) 编辑

URLConnection下载图片

摘要: ViewController.h 1 #import <UIKit/UIKit.h> 2 3 @interface ViewController : UIViewController 4 <NSURLConnectionDataDelegate> 5 { 6 UIImageView* imageView; 7 NSMutableData* imageData; 8 } 9 10 @endViewController.m 1 #import "ViewController.h" 2 3 @implementation ViewController 4 阅读全文

posted @ 2013-01-29 15:29 灰色的人 阅读(485) 评论(0) 推荐(0) 编辑

从网站获取用户数据写进tableView

摘要: ViewController.h 1 #import <UIKit/UIKit.h> 2 3 @interface ViewController : UIViewController 4 <UITableViewDataSource> 5 { 6 UITableView* _tableView; 7 NSMutableArray* dataArray; 8 } 9 10 @endViewController.m 1 #import "ViewController.h" 2 #import "UserItem.h" 3 #impor 阅读全文

posted @ 2013-01-29 15:09 灰色的人 阅读(1063) 评论(0) 推荐(0) 编辑

SBJson

摘要: 1 //{"code":"login_success","message":"abcdeeeee"} 2 //以{}表示的是字典 3 //“:”key,value分隔符 4 //“,”元素分隔符 5 6 NSString* str = @"{\"code\":\"login_success\",\"message\":\"abcedsdfsdf\"}"; 7 8 NSDictionary* dic = [str JS 阅读全文

posted @ 2013-01-29 14:26 灰色的人 阅读(285) 评论(0) 推荐(0) 编辑

简易UDP传输

摘要: ViewController.h 1 #import <UIKit/UIKit.h> 2 #import "AsyncUdpSocket.h" 3 4 @interface ViewController : UIViewController 5 <AsyncUdpSocketDelegate> 6 { 7 IBOutlet UITextField *ipField; 8 IBOutlet UITextField *sendField; 9 IBOutlet UITextView *contentView;10 11 AsyncUdpSocket *r 阅读全文

posted @ 2013-01-29 11:50 灰色的人 阅读(147) 评论(0) 推荐(0) 编辑

简易TCP传输

摘要: ViewController.h 1 #import <UIKit/UIKit.h> 2 #import "AsyncSocket.h" 3 4 @interface ViewController : UIViewController 5 <AsyncSocketDelegate> 6 { 7 IBOutlet UITextField *ipField; 8 IBOutlet UITextField *sendField; 9 IBOutlet UITextView *contentView;10 11 AsyncSocket *recvSocket 阅读全文

posted @ 2013-01-29 10:31 灰色的人 阅读(201) 评论(0) 推荐(0) 编辑

2013年1月28日

随机动画效果

摘要: ViewController.m 1 #import "ViewController.h" 2 #define MAX_SIZE 25//雪花大小 3 #define MAX_TIME 20//飘落时间 4 #define MIN_TIME 5 5 6 @implementation ViewController 7 8 - (void)viewDidLoad 9 {10 [super viewDidLoad];11 //背景颜色12 [self.view setBackgroundColor:[UIColor colorWithRed:0.45 green:0.4... 阅读全文

posted @ 2013-01-28 19:29 灰色的人 阅读(208) 评论(0) 推荐(0) 编辑

图片轮流显示

摘要: UIImageView内置的动画功能原理:轮流显示一组图片 1 #import "ViewController.h" 2 3 @implementation ViewController 4 5 - (void)viewDidLoad 6 { 7 [super viewDidLoad]; 8 9 NSMutableArray *array = [[NSMutableArray alloc]initWithCapacity:0];10 for (int i = 1; i <= 10; i++) {11 UIImage *img = [UIIm... 阅读全文

posted @ 2013-01-28 16:05 灰色的人 阅读(325) 评论(0) 推荐(0) 编辑

导航