摘要: googlecode http://code.google.com/p/skpsmtpmessage/svn checkout http://skpsmtpmessage.googlecode.com/svn/trunk/ skpsmtpmessage-read-onlygithub:git clone https://github.com/kailoa/iphone-smtp.gitskpsmtpmessage 是由Skorpiostech, Inc.为我们带来的一个SMTP协议的开源实现,使用Objective-c 实现,iOS系统的项目可以直接调用 =]skpsmtpmessage能够实 阅读全文
posted @ 2012-07-30 17:13 GreyWolf 阅读(377) 评论(0) 推荐(0) 编辑
摘要: 寫iOS App我最怕遇到的三樣處理, 大概就是1.影音, 2.網路 3.圖片沒了這三樣還能叫App嗎? 大概是我coding功力不夠吧今天來講講圖片的處理...圖片的處理大概就分這幾樣了截圖(capture), 縮放(scale),設定大小(resize), 儲存(save)這幾樣比較好處理, 另外還有濾鏡, 擦拭等, 以後再說在這個Demo code裡, 我寫了幾個方法1.等比率縮放- (UIImage *)scaleImage:(UIImage *)imagetoScale:(float)scaleSize{UIGraphicsBeginImageContext(CGSizeMake(i 阅读全文
posted @ 2012-07-30 16:19 GreyWolf 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 这段“许靖昕”先生分享的代码将示范如何缩小 UIImage@implementationUIImage(Extras)#pragmamark-#pragmamarkScaleandcropimage-(UIImage*)imageByScalingAndCroppingForSize:(CGSize)targetSize{UIImage*sourceImage=self;UIImage*newImage=nil;CGSizeimageSize=sourceImage.size;CGFloatwidth=imageSize.width;CGFloatheight=imageSize.height 阅读全文
posted @ 2012-07-30 15:50 GreyWolf 阅读(126) 评论(0) 推荐(0) 编辑
摘要: + (void)alert:(NSString *)msg{ UIAlertView *alertView = [[[UIAlertView alloc] initWithTitle:msg message:@"" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil, nil] autorelease]; [alertView showWithBackground];}+ (void) makeCall:(NSString *)phoneNumber{ if ([DeviceDetect 阅读全文
posted @ 2012-07-30 15:11 GreyWolf 阅读(282) 评论(0) 推荐(0) 编辑
摘要: 导入MessageUI.framework.h文件中#import<MessageUI/MessageUI.h>#import<MessageUI/MFMailComposeViewController.h>实现MFMailComposeViewControllerDelegate,MFMessageComposeViewControllerDelegate.m文件//邮件-(void)showMailPicker { ClassmailClass = (NSClassFromString(@"MFMailComposeViewController" 阅读全文
posted @ 2012-07-30 14:47 GreyWolf 阅读(307) 评论(0) 推荐(0) 编辑
摘要: 邮件发送功能是由MessageUI Framework提供的,这个框架是iPhone sdk中最简单的框。由一个类、一个视图控制器,一个protocol组成。一、创建视图控制器:MFMailComposeViewController *mc = [[MFMailComposeViewController alloc] init]; mc.mailComposeDelegate = self; 二、设置邮件主题: [mc setSubject:@"Hello, World!"];三、设置收件人,收件人有三种:1、设置主收件人[mc setToRecipients:[NSArr 阅读全文
posted @ 2012-07-30 14:40 GreyWolf 阅读(169) 评论(0) 推荐(0) 编辑
摘要: Math.round:如果参数是小数,则求本身的四舍五入。Math.ceil:如果参数是小数,则求最小的整数但不小于本身.Math.floor:如果参数是小数,则求最大的整数但不大于本身. 阅读全文
posted @ 2012-07-28 11:11 GreyWolf 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 将字符串声明称@property(copy, nonatomic),因为MKAnnotation的title等的字符串是copy不是retain的。 阅读全文
posted @ 2012-07-27 16:33 GreyWolf 阅读(152) 评论(0) 推荐(0) 编辑
摘要: 如果要移除一个 UIView 的所有子视图,SDK 里没有 remove all 之类的方法。可以用 for loop 循环调用 – removeFromSuperview 来移除 例如:for(UIView *view in [self.view subviews]){ [view removefromsuperview]}除了遍历移除subView 还可以用这个方法:[[self.view subviews] makeObjectsPerformSelector:@selector(removeFromSuperview)]; 阅读全文
posted @ 2012-07-27 12:11 GreyWolf 阅读(257) 评论(0) 推荐(0) 编辑
摘要: 转自:http://langhua9527.iteye.com/blog/1377741如果想调用某个类的某个方法可以写成这样,这个方法来自NSObject类C代码performSelector:performSelector:withObject:performSelector:withObject:withObject:实际调用C代码[selfperformSelector:@selector(displayViews)withObject:nilafterDelay:1.0f]; 有三个方法分别是C代码//父视图[self.viewsuperview]//所有子视图[self.views 阅读全文
posted @ 2012-07-27 12:10 GreyWolf 阅读(183) 评论(0) 推荐(0) 编辑