06 2014 档案

摘要:1、字符串转换为URL字符串NSString分类#import @interface NSString (URLEncoding)-(NSString *)URLEncodedString;-(NSString *)URLDecodedString;@end#import "T20140628013... 阅读全文
posted @ 2014-06-29 02:22 so_tm_what 阅读(428) 评论(0) 推荐(0)
摘要:一、创建联系人1、创建联系人记录ABRecord person = ABPersonCreate();2、保存或修改单值属性bool ABRecordSetValue( ABRecordRef record, ABPropertyID property, CFTypeRef value, C... 阅读全文
posted @ 2014-06-26 15:59 so_tm_what 阅读(349) 评论(0) 推荐(0)
摘要:1、移动设备上都有一个很重要的内置数据库 -- 通讯录,苹果把它扩展到了iCloud上,使苹果设备间可以共享通讯录信息。2、在iOS上,通讯录放在SQLite3数据库中,但是应用之间不能直接访问,也就是说我们自己编写的应用不能采用数据持久化技术直接访问通讯录数据库。为了实现通讯录数据库的访问,苹果开... 阅读全文
posted @ 2014-06-26 13:03 so_tm_what 阅读(226) 评论(0) 推荐(0)
摘要:1、相关函数介绍1、创建通讯录对象函数ABAddressBookRef ABAddressBookCreateWithOptions( CFDictionaryRef options, CFErrorRef *error);例子:CFErrorRef error = NULL;ABAdressB... 阅读全文
posted @ 2014-06-26 12:05 so_tm_what 阅读(435) 评论(0) 推荐(0)
摘要:#import #import #import @interface T20140621002009ViewController : UIViewController@property (weak, nonatomic) IBOutlet UITextField *txtQueryKey;@prop... 阅读全文
posted @ 2014-06-22 10:53 so_tm_what 阅读(213) 评论(0) 推荐(0)
摘要:#import #import #import @interface T20140621001526ViewController : UIViewController@property (weak, nonatomic) IBOutlet UITextField *txtQueryKey;@prop... 阅读全文
posted @ 2014-06-22 10:52 so_tm_what 阅读(313) 评论(0) 推荐(0)
摘要:#import #import @interface T20140621000000ViewController : UIViewController@property (weak, nonatomic) IBOutlet MKMapView *mapView;@end#import "T20140... 阅读全文
posted @ 2014-06-22 10:51 so_tm_what 阅读(211) 评论(0) 推荐(0)
摘要:#import @interface MapLocation : NSObject//街道信息属性@property (nonatomic, copy) NSString *streetAddress;//城市信息属性@property (nonatomic, copy) NSString *cit... 阅读全文
posted @ 2014-06-22 10:49 so_tm_what 阅读(186) 评论(0) 推荐(0)
摘要:#import #import #import #import @interface T20140621221104ViewController : UIViewController@property (weak, nonatomic) IBOutlet UITextField *txtQueryK... 阅读全文
posted @ 2014-06-22 10:47 so_tm_what 阅读(212) 评论(0) 推荐(0)
摘要:#import #import #import #import @interface T20140621213001ViewController : UIViewController//经度@property (weak, nonatomic) IBOutlet UITextField *txtLn... 阅读全文
posted @ 2014-06-22 10:46 so_tm_what 阅读(173) 评论(0) 推荐(0)
摘要:#import #import #import @interface T20140621195534ViewController : UIViewController//经度@property (weak, nonatomic) IBOutlet UITextField *txtLng;//纬度@p... 阅读全文
posted @ 2014-06-22 10:44 so_tm_what 阅读(185) 评论(0) 推荐(0)
摘要:#import #import "Persistence02Note.h"#define FILE_NAME @"Persistence02NotesList.archive"#define ARCHIVE_KEY @"Persistence02NotesList"@interface Persis... 阅读全文
posted @ 2014-06-18 01:55 so_tm_what 阅读(240) 评论(0) 推荐(0)
摘要:#import #import @interface Persistence04NoteCoreDataDAO : NSObject//被管理的对象上下文@property (readonly, strong, nonatomic) NSManagedObjectContext *managedOb... 阅读全文
posted @ 2014-06-18 01:55 so_tm_what 阅读(314) 评论(0) 推荐(0)
摘要:#import #import "Persistence03Note.h"#import "sqlite3.h"#define DBFILE_NAME @"Persistence03NotesList.sqlite3"@interface Persistence03NoteDAO : NSObjec... 阅读全文
posted @ 2014-06-18 01:55 so_tm_what 阅读(276) 评论(0) 推荐(0)
摘要:#import #import "Persistence01Note.h"@interface Persistence01NoteDAO : NSObject#pragma mark 单例+(Persistence01NoteDAO *)sharedManager;#pragma mark Note... 阅读全文
posted @ 2014-06-18 01:50 so_tm_what 阅读(293) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2014-06-16 00:37 so_tm_what 阅读(115) 评论(0) 推荐(0)
摘要:1、案例截图2、注意点:》新建Cocoa Touch Static Library时千万别选OS X的,如图》添加包依赖》添加头文件搜索 阅读全文
posted @ 2014-06-14 21:48 so_tm_what 阅读(243) 评论(0) 推荐(0)
摘要:1、案例介绍2、工程结构3、Main_iPad.storyboard4、代码Layered02DetailViewController.h#import #import "Layered02NoteBL.h"@class Layered02DetailViewController;@interfac... 阅读全文
posted @ 2014-06-12 00:20 so_tm_what 阅读(256) 评论(0) 推荐(0)
摘要:1、案例介绍,如下图:2、工程如下图:3、Main_iPhone.storyboard4、代码Layered01ViewController.h#import #import "Layered01NoteBL.h"@class Layered01DetailViewController;@inter... 阅读全文
posted @ 2014-06-11 23:59 so_tm_what 阅读(382) 评论(0) 推荐(0)
摘要:1、案例如图2、代码TextKit02ViewController.h#import @interface TextKit02ViewController : UIViewController@property (nonatomic,strong) IBOutlet UITextView *text... 阅读全文
posted @ 2014-06-08 14:11 so_tm_what 阅读(729) 评论(0) 推荐(0)
摘要:1、案例视图,如下图2、代码TextKit01ViewController.h#import @interface TextKit01ViewController : UIViewController@property (nonatomic,strong) IBOutlet UITextView *... 阅读全文
posted @ 2014-06-08 13:38 so_tm_what 阅读(344) 评论(0) 推荐(0)
摘要:WTDelegate#import @protocol WTDelegate @required- (void)sleep;- (void)eat;- (void)work;@endWTPhilosopher.h#import #import "WTDelegate.h"@interface WTP... 阅读全文
posted @ 2014-06-08 10:13 so_tm_what 阅读(152) 评论(0) 推荐(0)
摘要:使用单例模式的类:UIApplicationUIAccelerometerNSUserDefaultsNSNotificationCenterNSFileManagerNSBundle等Singleton.h#import @interface Singleton : NSObject// 始终返回... 阅读全文
posted @ 2014-06-08 09:46 so_tm_what 阅读(192) 评论(0) 推荐(0)
摘要:1、案例介绍:iPad上使用多种风格的ModalView,如图01,02,03,04,05图01图02图03图04图052、代码ViewController.h#import @interface ViewController : UIViewController- (IBAction)onclic... 阅读全文
posted @ 2014-06-07 01:01 so_tm_what 阅读(343) 评论(0) 推荐(0)
摘要:1、案例介绍:如图01,02,点击openByView弹出由故事版直接连接的popover视图;点击openByCoding弹出由代码创建的popover视图。图01图022、案例步骤:2.1、创建案例工程,新增iPadC02SelectTableViewController类,如图03,04图03... 阅读全文
posted @ 2014-06-06 23:12 so_tm_what 阅读(340) 评论(0) 推荐(0)
摘要:1、案例介绍:演示UISplitViewController的基本使用,如图01,02,点击左侧MasterView中的行会改变右侧DetailView中的颜色。图01图022、案例步骤:2.1、选择Simple View Aplication新建项目,如图03;图032.2、生成项目结构如图04,... 阅读全文
posted @ 2014-06-06 03:03 so_tm_what 阅读(863) 评论(0) 推荐(0)
摘要:1、案例介绍:表视图中单元格的增加、删除、移动,如图01,02图01图022、.h#import @interface CQ26ViewController : UIViewController@property (weak,nonatomic) IBOutlet UINavigationItem ... 阅读全文
posted @ 2014-06-03 23:20 so_tm_what 阅读(296) 评论(0) 推荐(0)
摘要:1、使用表视图的分组,静态单元格布局,如图01图012、Main.storyboard 阅读全文
posted @ 2014-06-03 22:44 so_tm_what 阅读(185) 评论(0) 推荐(0)
摘要:1、案例介绍:具备索引功能的分节表视图,如图01图012、team_dictionary.plist A组 A1-南非 A2-墨西哥 A3-乌拉圭 A4-法国 B组 B1-阿根廷 ... 阅读全文
posted @ 2014-06-03 22:35 so_tm_what 阅读(499) 评论(2) 推荐(0)
摘要:1、案例介绍:一个具备搜索功能的表视图,如图01,02,03图01图02图032、Main.storyboard,如图04图043、.h#import @interface CQ23ViewController : UITableViewController// 搜索栏@property (weak... 阅读全文
posted @ 2014-06-03 22:26 so_tm_what 阅读(571) 评论(0) 推荐(0)
摘要:1、案例介绍:最简单的表视图,如图01图012、team.plist name A1-南非 image SouthAfrica nam... 阅读全文
posted @ 2014-06-03 20:39 so_tm_what 阅读(197) 评论(0) 推荐(0)
摘要:一、案例介绍:以集合形式展现图片,如图01图01二、案例步骤:1、选择Simple View Aplication,取名cq.38.集合视图,如图02图022、Main.storyboard,如图03图033、events.plist,如图04,054、CQ38ViewController.h#im... 阅读全文
posted @ 2014-06-03 01:23 so_tm_what 阅读(329) 评论(0) 推荐(0)
摘要:一、案例介绍:点击UIButton,将选中的省市信息显示在UILabel中,如图01,02图01图02二、案例步骤:1、选择Simple View Aplication,取名cq.37.普通选择器,如图03图032、Main.storyboard,如图043、provinces_cities.pli... 阅读全文
posted @ 2014-06-03 01:09 so_tm_what 阅读(271) 评论(0) 推荐(0)
摘要:一、案例介绍:点击屏幕中的UIButton,将在UIDatePicker选择的日期显示在UILabel中,如图01,02图01图02二、案例步骤:1、选择Simple View Aplication,取名cq.36.日期选择器,如图03图032、Main.storyboard,如图043、CQ36V... 阅读全文
posted @ 2014-06-03 00:39 so_tm_what 阅读(269) 评论(0) 推荐(0)
摘要:一、点击UINavigationBar中的UIBarButtonItem,改变UILabel中的文本,如图01,02,03图01图02图03二、项目步骤:1、选择Simple View Aplication,取名cq.40.UINavigationBar,如图04图042、Main.storyboa... 阅读全文
posted @ 2014-06-03 00:22 so_tm_what 阅读(241) 评论(0) 推荐(0)
摘要:一、案例介绍:点击UIToolbar中的UIBarButtonItem,改变UILabel中的文本,如图01,02,03图01图02图03二、案例步骤:1、选择Simple View Aplication,取名cq.33.工具栏和导航栏,如图042、Maim.storyboard,如图053、CQ3... 阅读全文
posted @ 2014-06-03 00:02 so_tm_what 阅读(192) 评论(0) 推荐(0)
摘要:一、案例介绍:点击第一个按钮弹出提示框;点击第二个按钮弹出操作表。如图01,图02,图03图01图02图03二、案例步骤:1、选择Simple View Aplication,取名cq.32.警告框和操作表,如图042、Main.storyboard3、CQ32ViewController.h#im... 阅读全文
posted @ 2014-06-02 23:26 so_tm_what 阅读(199) 评论(0) 推荐(0)
摘要:一、案例介绍:点击按钮upload,活动指示器转动,再次点击停止转动;点击download按钮进度条加载满后提示,如图01,图02。图01图02二、案例步骤:1、选择Simple View Aplication,取名cq.31.活动指示器和进度条,如图03。图032、Main.storyboard,... 阅读全文
posted @ 2014-06-02 22:47 so_tm_what 阅读(197) 评论(0) 推荐(0)
摘要:一、案例介绍:利用UIScrollView, 避免键盘遮挡控件;图01、图02其实是存在第三个UIButton的,滑动屏幕可以看到,如图06。效果如图01,图02。图01图02图03图06二、案例步骤:1、选择Single View Application新建项目,取名cq.30.ScrollVie... 阅读全文
posted @ 2014-06-02 20:46 so_tm_what 阅读(282) 评论(0) 推荐(0)
摘要:一、案例介绍:两个开关保持一致;点击分段控制两个开关显示和隐藏;显示滑块的值;如图01图01图02图03二、案例步骤:1、选择Single View Aplication新建项目,取名cq.29.开关_滑块_分段控件,如图02。2、Main.storyboard如图03。3、CQ29ViewCont... 阅读全文
posted @ 2014-06-02 17:49 so_tm_what 阅读(171) 评论(0) 推荐(0)
摘要:一、案例介绍:包含UITextField和UITextView,键盘可以打开、关闭,如图01。图01图02图03二、案例步骤:1、选择Single View Application新建项目,取名cq.28.TextField和TextView,如图02。2、Main.storyboard如图03。3... 阅读全文
posted @ 2014-06-02 17:10 so_tm_what 阅读(224) 评论(0) 推荐(0)
摘要:图01图02图03图04一、案例介绍:点击图01中的Button,Label文本变为“Hello World”,如图02。二、案例步骤:1、选择Single View Application新建项目,取名cq.39.UIButton_UILabel,如图03。2、在Main.storyboard中拖... 阅读全文
posted @ 2014-06-02 11:08 so_tm_what 阅读(187) 评论(0) 推荐(0)
摘要:1、UIView全体成员UIViewUIWindow (窗口) -- 装载子视图,继承它的oc类对象可以提示用户UILabel (标签) -- 相当于html中的label,多用来显示文字信息UITableViewCell (表示图单元格) -- 包含“图标”、“主标题”、“副标题”、“扩展视图”U... 阅读全文
posted @ 2014-06-02 01:26 so_tm_what 阅读(199) 评论(0) 推荐(0)