摘要: 1 1. 地图 2 1. 获取用户的经纬度(CLLocationManager) 3 创建属性:CLLocationManager *mgr; 4 遵守协议: 5 a> 创建定位管理器 6 self.mgr = [[CLLocationManager alloc] i... 阅读全文
posted @ 2015-09-26 23:26 初冬夏末 阅读(177) 评论(0) 推荐(0)
摘要: 1 #import 2 //记得要遵守协议> 3 @interface person : NSObject 4 @property(nonatomic,copy)NSString *name; 5 @property(nonatomic,assign)int age; 6 @end 1 #impor... 阅读全文
posted @ 2015-09-25 23:45 初冬夏末 阅读(174) 评论(0) 推荐(0)
摘要: 使用偏好设置我们不需要关心文件的名字进行键值对的存储其实质就是对字典的封装 我们一定要记得同步不然有时候不能及时更新数据//存数据 1 -(IBAction)save:(id)sender{ 2 NSUserDefaults *us =[NSUserDefaults standardU... 阅读全文
posted @ 2015-09-25 23:14 初冬夏末 阅读(109) 评论(0) 推荐(0)
摘要: 单间介绍一下用最简单的语言表示 1 - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { 2 3 // Return the number of sections. 4 return 1; 5 } 6... 阅读全文
posted @ 2015-09-25 23:03 初冬夏末 阅读(174) 评论(0) 推荐(0)
摘要: 1NSString *urlString =[NSString stringWithFormat:@"http://baidu.v.ifeng.com/kan/aIAX8?fr=v.baidu.com/"]; NSURL *url =[NSURL URLWithString:urlString];... 阅读全文
posted @ 2015-09-25 02:11 初冬夏末 阅读(176) 评论(0) 推荐(0)
摘要: 记得导入iAd.framework#import @interface ViewController : UIViewController@end#import "ViewController.h"#import 广告代理@interface ViewController ()首先设置ADBanne... 阅读全文
posted @ 2015-09-24 19:51 初冬夏末 阅读(132) 评论(0) 推荐(0)
摘要: 定义一个普通的类1#import #import@interface LXXperson : NSObject@property(nonatomic,copy)NSString *name;@property(nonatomic,assign)NSInteger age;@property(nona... 阅读全文
posted @ 2015-09-24 19:39 初冬夏末 阅读(203) 评论(0) 推荐(0)