摘要: 1.发短信引入 MEssageUI.framework#import "MessageUI/MessageUI.h"实现这个 <MFMessageComposeViewControllerDelegate>-(void) sendmyMessage{Class messageClass = (NSClassFromString(@"MFMessageComposeViewController")); NSLog(@"can send SMS [%d]", [messageClass canSendText]); if (m 阅读全文
posted @ 2013-03-15 15:53 金建彤 阅读(420) 评论(0) 推荐(0) 编辑
摘要: 认为delegate 也是nsnotication一样的一种消息发送机制.1.定义delegatetestA类的h文件@protocol testDelegate;1.@interface testA:NSObject@property(assign) id<testDelegate> mydelegate;@end@protocel testDelegate<NSObject>//要让别的类实现的方法-(void) testDelegateFunc;@end调用delegate方法testa.m文件@implementation testA@synthesize my 阅读全文
posted @ 2013-03-15 12:14 金建彤 阅读(379) 评论(0) 推荐(0) 编辑
摘要: 1.通知者想发送通知消失的时候NSString * test=@"mytest"; NSDictionary * notifyObject= [NSDictionary dictionaryWithObjectsAndKeys:test,@"test",nil];[[NSNotificationCenter defaultCenter] postNotificationName: @"myNotification" object:mynotifyObject];这里notifyObject为参数要字典形式,如果没有参数可写nilmyN 阅读全文
posted @ 2013-03-15 11:56 金建彤 阅读(191) 评论(0) 推荐(0) 编辑