摘要: 知识点 1.HTTP协议的简介 2.URLConnection同步请求 1 //1转化成URL 2 NSURL * url = [NSURL URLWithString:QQURLSTING]; 3 //2生成请求对象 4 NSURLRequest * request = [... 阅读全文
posted @ 2015-12-08 00:05 GXcoder 阅读(816) 评论(0) 推荐(0) 编辑
摘要: 创建一个继承于UITableViewCell的类重写父类方法1 //先重写父类方法2 - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{3 ... 阅读全文
posted @ 2015-12-07 23:46 GXcoder 阅读(279) 评论(0) 推荐(0) 编辑
摘要: 把tableView的头视图 设置为一个searchBar创建一个新的数组 用来存储搜索到的信息1 _searchBar = [[UISearchBar alloc]initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, 50)]... 阅读全文
posted @ 2015-12-07 23:43 GXcoder 阅读(186) 评论(0) 推荐(0) 编辑
摘要: 1 #import "ViewController.h" 2 3 @interface ViewController () 4 { 5 //创建数据源 6 NSMutableArray * _dataArray; 7 8 } 9 10 @end 11... 阅读全文
posted @ 2015-11-29 23:04 GXcoder 阅读(202) 评论(0) 推荐(0) 编辑
摘要: 1 //创建一个全屏大小的scrollerView 2 UIScrollView * scrollerView = [[UIScrollView alloc]initWithFrame:self.view.bounds] ; 3 //添加到self.view上 4 [sel... 阅读全文
posted @ 2015-11-29 22:59 GXcoder 阅读(163) 评论(0) 推荐(0) 编辑
摘要: webView使用loadRequest: 方法请求数据的加载 1 - (void)createWebView{ 2 //创建全屏大小的webView 3 UIWebView * view = [[UIWebView alloc]initWithFrame:self.view.bou... 阅读全文
posted @ 2015-11-29 22:17 GXcoder 阅读(268) 评论(0) 推荐(0) 编辑
摘要: UITabBarController的创建与基本属性 1 - (void)customTabbarController{ 2 3 //声明一个UITabBarController 4 UITabBarController * tab = [[UITabBarCont... 阅读全文
posted @ 2015-11-29 22:10 GXcoder 阅读(207) 评论(0) 推荐(0) 编辑
摘要: 一.UITouch 1 //任何视图都可以触发此方法 2 - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ 3 NSLog(@"视图被触摸了"); 4 } 5 6 - (void)touchesCancel... 阅读全文
posted @ 2015-11-29 22:01 GXcoder 阅读(230) 评论(0) 推荐(0) 编辑
摘要: 创建文本输入框 UITextField * textField = [[UITextField alloc]initWithFrame:CGRectMake(50, 50, 250, 40)];设置边框样式 textField.borderStyle = UITextBorderStyl... 阅读全文
posted @ 2015-11-24 01:20 GXcoder 阅读(224) 评论(4) 推荐(0) 编辑
摘要: 创建UITextView//创建一个单例对象 存储_str字符串 NSUserDefaults * hd = [NSUserDefaults standardUserDefaults]; _str = [hd objectForKey:@"str"]; UIText... 阅读全文
posted @ 2015-11-24 01:13 GXcoder 阅读(205) 评论(0) 推荐(0) 编辑