摘要: - (void)viewDidLoad { [super viewDidLoad]; NSString *docPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES)lastObj 阅读全文
posted @ 2016-04-07 15:25 蜗牛才是大牛 阅读(328) 评论(0) 推荐(0) 编辑
摘要: APPDelegate: - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.window = [[UIWindow a 阅读全文
posted @ 2016-04-07 15:10 蜗牛才是大牛 阅读(325) 评论(0) 推荐(0) 编辑
摘要: //redView和父视图左边距10 [redView mas_makeConstraints:^(MASConstraintMaker *make) { make.leading.equalTo(self.view.mas_leading).offset(10); make.top.equalTo 阅读全文
posted @ 2016-04-07 15:04 蜗牛才是大牛 阅读(355) 评论(0) 推荐(0) 编辑
摘要: - (void)viewDidLoad { [super viewDidLoad]; } - (IBAction)selectedPhoto:(id)sender { if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerCo 阅读全文
posted @ 2016-04-07 14:56 蜗牛才是大牛 阅读(966) 评论(0) 推荐(0) 编辑
摘要: GCD方法,通过向主线程队列发送一个block块,使block里的方法可以在主线程中执行。 NSOperation 方法 NSThread 方法 RunLoop方法 阅读全文
posted @ 2016-04-07 14:51 蜗牛才是大牛 阅读(3697) 评论(0) 推荐(0) 编辑
摘要: @property (nonatomic,strong) CLLocationManager *locationManager; @property (nonatomic,strong) CLGeocoder *geoCoder; if([CLLocationManager locationServ 阅读全文
posted @ 2016-04-07 14:24 蜗牛才是大牛 阅读(223) 评论(0) 推荐(0) 编辑
摘要: 创建一个手势操作 UITapGestureRecognizer点击手势 UILongPressGestureRecognizer长按手势 UISwipeGestureRecognizer滑动手势 UIPinchGestureRecognizer按捏手势 UITapGestureRecognizer 阅读全文
posted @ 2016-04-07 14:08 蜗牛才是大牛 阅读(258) 评论(0) 推荐(0) 编辑
摘要: Dog类.h: @interface Dog : NSObject{ NSString *dogName; } Person类.h: #import "Dog.h" @interface Person : NSObject{ NSString *name; int age; Dog *dg; } P 阅读全文
posted @ 2016-04-07 13:38 蜗牛才是大牛 阅读(118) 评论(0) 推荐(0) 编辑
摘要: @property (nonatomic,strong) UIPageControl *pageControl; @property (nonatomic,strong) UIScrollView *scorllView; //创建一个图片切换器,4张图片切换 self.scorllView = [ 阅读全文
posted @ 2016-04-07 13:31 蜗牛才是大牛 阅读(158) 评论(0) 推荐(0) 编辑
摘要: UITextField定义了一套代理,用来监听输入的内容 //设置默认提示文本 self.loginTextField.placeholder = @"手机号/QQ号/邮箱"; //设置textfield 的边框类型boardstyled self.loginTextField.borderStyl 阅读全文
posted @ 2016-04-07 13:22 蜗牛才是大牛 阅读(177) 评论(0) 推荐(0) 编辑