一、实现效果实现图片的自动轮播 二、实现代码storyboard中布局代码: 1 #import "YYViewController.h" 2 3 @interface YYViewController () 4 @property (weak, nonatomic) IBOutl...
分类:
移动开发 时间:
2015-07-18 22:33:24
阅读次数:
255
#import "ViewController.h"#import @interface ViewController ()@property(nonatomic,strong)CLLocationManager*manager;@property (weak, nonatomic) IBOutle...
分类:
其他好文 时间:
2015-07-17 22:44:17
阅读次数:
176
#import "ViewController.h"#import @interface ViewController ()@property(nonatomic,weak)UITextField*destination;@end@implementation ViewController- (vo...
分类:
移动开发 时间:
2015-07-17 22:30:18
阅读次数:
149
一直都在疑惑属性定义中在什么情况下用strong、在什么情况下用weak?总结大致如下: 1.weak 是用来修饰代理(delegate)和UI控件。 2.strong 是用来修饰除了代理(delegate)、UI控件、字符串(NSString)以外的对象类型。 3.copy 是用来修饰字符串...
分类:
其他好文 时间:
2015-07-17 17:54:55
阅读次数:
86
#import @interface TestCell : UITableViewCell@property (weak, nonatomic) IBOutlet UIButton *btnTest;@end#import "ViewController.h"#import "TestCell.h"...
分类:
其他好文 时间:
2015-07-17 11:20:48
阅读次数:
135
//地理编码类
//1、用来根据地名来解析当前的经纬度和其他一些附属消息
//2、根据经纬度来解析地名和其他消息
@interface ViewController ()
@property (weak, nonatomic) IBOutlet MKMapView *mapView;
/* 地理编码**/
@property(nonatomic,strong)CLGeocod...
分类:
其他好文 时间:
2015-07-16 22:27:32
阅读次数:
141
#import "ViewController.h"
#import
#import
#import "JRAnnotation.h"
@interface ViewController ()
@property(nonatomic,strong) CLGeocoder * coder;
@property (weak, nonatomic) IBOutlet MKMapV...
分类:
其他好文 时间:
2015-07-16 22:25:17
阅读次数:
158
readwrite:是可读可写特性,需要生成getter和setter方法;readonly是之都特性,只会生成getter方法,不会生成setter方法,不希望属性在类外改变时候使用;alloc 对象分配后引用计数为1retain 对象的引用计数+1copy 一个对象变成新的对象(新内存地址) 引...
分类:
移动开发 时间:
2015-07-16 11:35:44
阅读次数:
197
1.系统自带pop方法">系统自带pop方法
如果我们没有对navigation中的back按钮进行自定义,我们可以直接使用系统自带的左滑pop方法。但是如果我们对back按钮,进行了自定义,我们就要对self.navigationController.interactivePopGestureRecognizer这个属性进行设置了。关键代码:__weak typeof(self) we...
分类:
移动开发 时间:
2015-07-15 21:03:52
阅读次数:
139