摘要: #import "ViewController.h" @interface ViewController () @property (nonatomic, strong) UIScrollView *scrollView; @end @implementation ViewController - 阅读全文
posted @ 2016-02-22 17:59 弓林 阅读(1975) 评论(0) 推荐(0) 编辑
摘要: //使用模糊图片 #import "ViewController.h" @interface ViewController () @end @implementation ViewController - (void)viewDidLoad { [super viewDidLoad]; UIImag 阅读全文
posted @ 2016-02-21 18:47 弓林 阅读(679) 评论(0) 推荐(0) 编辑
摘要: //使用地图 #import "ViewController.h" #import <MapKit/MapKit.h> @interface ViewController ()<MKMapViewDelegate> @end @implementation ViewController - (voi 阅读全文
posted @ 2016-02-21 15:37 弓林 阅读(517) 评论(0) 推荐(0) 编辑
摘要: viewController .m 内部的写法: 1 首先在新建的时候需要勾选 Use Core Data 选项 2 需要创建 coreData 数据 #import "ViewController.h" #import "AppDelegate.h" #import "Student+CoreDa 阅读全文
posted @ 2016-02-19 15:15 弓林 阅读(128) 评论(0) 推荐(0) 编辑
摘要: Xcode工程下; 1 command + N 新建 2 选择 Objectiove-C File 3 File: 设置新建的类的名字; File Type:Category(选择) Class:(选择具体要创建的类名) //此方法是把 日期类型的数据转化为 字符串类型 + (NSString *) 阅读全文
posted @ 2016-02-18 19:15 弓林 阅读(184) 评论(0) 推荐(0) 编辑
摘要: // .h 内部的声明部分 (即:fourthController ) //1 声明协议 //UI中的协议名称为,当前类名 + Delegate @protocol FourthViewControllerDelegate <NSObject> //不加说明:默认是必须实现的方法 - (void)p 阅读全文
posted @ 2016-02-18 17:21 弓林 阅读(182) 评论(0) 推荐(0) 编辑
摘要: 1.1 Block内部写方法,其声明和实现部分: #import <Foundation/Foundation.h> //重定义 typedef void (^String)(NSString *); @interface AppTool : NSObject - (void)sendNumber: 阅读全文
posted @ 2016-02-18 16:58 弓林 阅读(260) 评论(0) 推荐(0) 编辑
摘要: 此工程使用Storyboard来实现的: #import "ViewController.h" @interface ViewController ()<UIImagePickerControllerDelegate,UINavigationControllerDelegate> @property 阅读全文
posted @ 2016-02-18 12:37 弓林 阅读(1206) 评论(0) 推荐(0) 编辑
摘要: 1 声明单例字符串类型,以copy类型 2 单例是类方法 3 返回值类型是 instancetype 4 单例不能释放 #import "Handler.h" static Handler *handler = nil;//需要把单例创建为全局变量 @implementation Handler + 阅读全文
posted @ 2016-02-18 12:12 弓林 阅读(515) 评论(0) 推荐(0) 编辑
摘要: #import "SearchViewController.h" @interface SearchViewController ()< UISearchResultsUpdating, UITableViewDelegate, UITableViewDataSource>//UISearchCon 阅读全文
posted @ 2016-02-18 11:52 弓林 阅读(686) 评论(0) 推荐(0) 编辑