01 2013 档案

摘要:2013.10.05补充 参考自 http://www.cnblogs.com/chinapcc/archive/2013/04/03/2673092.html要把自定义类保存到plist文件里,要注意一下三点:1、自定义类要继承NSCoding协议,实现 -(void)encodeWithCoder:(NSCoder *)coder 方法和 - (id) initWithCoder: (NSCoder *)coder方法2、在写入plist文件时要对数据序列化然后写入:[NSKeyedArchiver archiveRootObject:array toFile:filename];arra 阅读全文
posted @ 2013-01-29 21:19 仙外仙 阅读(5192) 评论(0) 推荐(0)
摘要:1 #import <UIKit/UIKit.h> 2 3 @interface TWFXViewController : UIViewController 4 5 @property (retain,nonatomic) NSMutableData *weatherData; 6 7 @property (retain, nonatomic) IBOutlet UILabel *outlet_weatherInfo; 8 9 - (IBAction)btnClick_getWeather:(UIButton *)sender;10 11 @end 1 // 2 // TWFX.. 阅读全文
posted @ 2013-01-25 21:16 仙外仙 阅读(6170) 评论(0) 推荐(0)
摘要:http://blog.csdn.net/kaizi318/article/details/8294127每一个进程都有一个默认的NSNotificationCenter,可以通过类方法defaultCenter获取该消息中心的实例。消息中心可以处理同一进程中不同对象之间的消息。如果要在同一台机器上进行进程间的通信,需要使用NSDistributedNotificationCenter。消息中心以同步的方式将消息分发到所有的观察者中,换言之,直到所有的观察者都收到消息并处理完毕以后,控制权才会回到调用者的手里。 1 //第一步:实现回调函数 2 -(void)callback 3 { 4 .. 阅读全文
posted @ 2013-01-24 16:28 仙外仙 阅读(477) 评论(0) 推荐(0)
摘要:1 #import <Foundation/Foundation.h> 2 3 //TWFXStuData类作为Model层里的类,用于管理数据 4 @interface TWFXStuData : NSObject 5 { 6 NSString *Name; 7 NSInteger Age; 8 } 9 10 @property (retain, nonatomic) NSString *schoolName;11 12 @end13 14 15 16 17 #import "TWFXStuData.h"18 19 @implementation TWFXSt 阅读全文
posted @ 2013-01-24 14:36 仙外仙 阅读(363) 评论(0) 推荐(1)
摘要:toolbar除了可以和navigationController一起用之外,也可以独立用到view里 1 // 2 // TWFXToolBarViewController.m 3 // DemoToolBar 4 // 5 // Created by Lion User on 13-1-19. 6 // Copyright (c) 2013年 Lion User. All rights reserved. 7 // 8 9 #import "TWFXToolBarViewController.h" 10 11 @interface TWFXToolBarView... 阅读全文
posted @ 2013-01-19 14:42 仙外仙 阅读(8820) 评论(0) 推荐(0)
摘要:文件目录如下:基本导航顺序: root -> First -> Second -> Third。其中,FirstViewController作为 navigation堆栈的rootview1、创建navigation。如果是想直接把navigation导航作为项目一开始的跟视图,把RootViewController.h文件里的nav属性放到AppDelegate.h里即可,再把RootViewController.m文件里的action的代码复制到 AppDelegate.m里的didFinishLaunchingWithOptions 方法里,最后把 self.windo 阅读全文
posted @ 2013-01-17 15:09 仙外仙 阅读(8926) 评论(0) 推荐(0)
摘要:1 // 2 // TWFXSecondViewController.m 3 // DemoMultiView 4 // 5 // Created by Lion User on 12-12-24. 6 // Copyright (c) 2012年 Lion User. All rights reserved. 7 // 8 9 #import "TWFXSecondViewController.h" 10 #import "TWFXThirdViewController.h" 11 12 @interface TWFXSecondViewControl 阅读全文
posted @ 2013-01-14 12:32 仙外仙 阅读(19341) 评论(0) 推荐(0)