上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 17 下一页
摘要: iPhone开发之消息通信机制NSNotificationCenter是本文要介绍的内容,主要是来学习消息通信机制NSNotificationCenter的学习。最近写程序需要用到这类,研究了下,现把成果和大家分享。NSNotificationCenter是专门供程序中不同类间的消息通信而设置的,使用起来极为方便,长话短说。设置通知,就是说要在什么地方(哪个类)接受通知,一般在初始化中做。[[NSNotificationCenterdefaultCenter]addObserver:selfselector:@selector(test:)name:@"test"objec 阅读全文
posted @ 2012-06-05 15:02 高笑228 阅读(223) 评论(0) 推荐(0)
摘要: 1,使用presentModalViewController可创建模式对话框,可用于视图之间的切换。如何关闭presentModalViewController弹出来得时模式窗口presentModalViewController弹出来得时模式窗口如果[A presentModalViewController:B animated:YES];那么触发关闭事件的一般是在 B里面。除非使用后台线程计时器关闭(不实用)B 里面可以 通过 [self dismissModalViewControllerAnimated:YES]; 实现还可以通过发 消息给A,通知A关闭B还可以通过委托实现 阅读全文
posted @ 2012-06-04 11:39 高笑228 阅读(264) 评论(0) 推荐(0)
摘要: [self performSelector:@selector(testLog:andString2:andString3:) withObject:@"aaa" withObject:@"bbbb" withObject:@"ccccc"]; 阅读全文
posted @ 2012-06-03 01:26 高笑228 阅读(252) 评论(0) 推荐(0)
摘要: 1.首先在Appdalegate.h 修改如下@interface AppDelegate : UIResponder <UIApplicationDelegate>{ UINavigationController *_navigationController;}@property (nonatomic, retain)UINavigationController *navigationController;2.然后在Appdalegate.m 修改如下 self.navigationController = [[UINavigationController alloc]initW 阅读全文
posted @ 2012-05-31 23:37 高笑228 阅读(2456) 评论(0) 推荐(0)
摘要: NSXMLParser解析xml格式的数据 用法如下:首先,NSXMLParser必须继续NSXMLParserDelegate协议@interface XMLHelper : NSObject <NSXMLParserDelegate>首先设置XML数据,并初始化NSXMLParser- (void)viewDidLoad {NSMutableString *Strxml=[NSMutableString stringWithString:@"<Body><xml1>11111111</xml1><xml2><xml 阅读全文
posted @ 2012-05-30 23:57 高笑228 阅读(206) 评论(0) 推荐(0)
摘要: 第一种:直接从场景切换到UIViewController视图(网上流传的版本)- (void) showUIViewController:(UIViewController *) controller{ [[Director sharedDirector] pause];[UIView beginAnimations:nil context:NULL]; [UIView setAnimationDuration:.5]; [UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:[[Director share 阅读全文
posted @ 2012-05-30 14:36 高笑228 阅读(317) 评论(0) 推荐(0)
摘要: 慎用ViewCtrl的跳转!搞iphone开发的,应该都知道MVC,顶半边天的UIViewCtrl,区分好Modle、View、Controller各自的作用。这里要提醒的是,勿滥用UIViewCtrl的跳转。从一个Controller跳转到另一个Controller时,一般有以下2种:1、利用UINavigationController,调用pushViewController,进行跳转;这种采用压栈和出栈的方式,进行Controller的管理。调用popViewControllerAnimated方法可以返回。2、利用UIViewController自身的presentModalViewC 阅读全文
posted @ 2012-05-30 14:32 高笑228 阅读(3526) 评论(0) 推荐(0)
摘要: http://blog.csdn.net/likendsl/article/details/7417878 阅读全文
posted @ 2012-05-30 01:25 高笑228 阅读(199) 评论(0) 推荐(0)
摘要: 在cocoachina 上看到一篇文章 http://www.cocoachina.com/newbie/basic/2012/0511/4237.html UITableView 异步加载图片缓存正好我也在学习UITableView 所以模仿了一个 拿来练手- (void)viewDidLoad{ [super viewDidLoad]; self.listTableViewArray = [NSMutableArray arrayWithCapacity:1]; NSString *jsonStr = [NSString stringWithContentsOfURL:[NSUR... 阅读全文
posted @ 2012-05-28 22:40 高笑228 阅读(2641) 评论(0) 推荐(0)
摘要: 首先、对UITableView进行讲解,下面有对它进行实际的应用UITableView显示大型内容的列表单行,多列垂直滚动,没有水平滚动 大量的数据集性能强大,而且普遍存在于iPhone的应用程序中TableView Styles UITableView有两个默认的内置风格,第一个是UITableViewStylePlain(简明风格,简明风格表明表格视图自身没有真正地在你自己实际地提供任何外观之前提供很多的外观,大部分情况下,它会做的唯一的事情是它会给你这些header和footer,在顶部的章节header有章节F,它是当前固定在屏幕的顶部,即使你滚动那个内容章节的header F会保持. 阅读全文
posted @ 2012-05-28 22:36 高笑228 阅读(20983) 评论(0) 推荐(0)
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 17 下一页