摘要:
1、首先在plist表里边添加Privacy - Location Usage Description和NSLocationWhenInUseUsageDescription(这个是在程序使用期间进行定位,如果需要一直获取,添加NSLocationAlwaysUsageDescription),都为 阅读全文
摘要:
webView有一个delegate方法,可以从中获取到: - (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigat 阅读全文
摘要:
一开始封装了一个tableView的headerView,感觉完成得还不错,后来测试的时候发现,最下边的两个button的点击事件不响应。然后就。。。着急了。在网上查询了button点击事件不响应的原因,first,最低级的错误就是没写点击方法。可是我上边的button和下边的调用的是一个方法啊,这 阅读全文
摘要:
首先在viewDidLoad- (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. //设置允许摇一摇功能 [[UIApp... 阅读全文
摘要:
//日期转换为时间戳 (日期转换为秒数) NSDate *date = [NSDate date]; NSLog(@"当前日期为(0时区):%@",date); NSDateFormatter *dateFormetter = [[NSDateFormatter alloc] init]; [dat... 阅读全文
摘要:
第一种方法:用tag值进行判断第二种方法:block在自定义cell里面@property (weak, nonatomic) IBOutlet UIButton *btn;@property (nonatomic, strong) void ((^btnClick)());- (void)btn:... 阅读全文
摘要:
关系如下,和tableView一样:要在自定义的cell里面添加如下代码:- (id)initWithFrame:(CGRect)frame{ self = [super initWithFrame:frame]; if (self) { // 初始化时加载collectionCell.xib文件 ... 阅读全文
摘要:
拖拉控件TableView关系如下:并且要在cellForRow方法里面添加如下代码:-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ Firs... 阅读全文