摘要: +(NSString *)getWeekday{NSDate *date = [NSDate date];NSDateComponents *componets = [[NSCalendar autoupdatingCurrentCalendar] components:NSWeekdayCalendarUnit fromDate:date];NSString *weekday = [self getWeekdayWithNumber:[componets weekday]];return weekday;}//1代表星期日、如此类推+(NSString *)getWeekdayWithNum 阅读全文
posted @ 2014-03-25 16:33 Rex·Wei 阅读(172) 评论(0) 推荐(0) 编辑
摘要: #define UIColorFromRGB(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0] 阅读全文
posted @ 2014-03-25 16:12 Rex·Wei 阅读(142) 评论(0) 推荐(0) 编辑
摘要: //每页宽度CGFloat pageWidth = sender.frame.size.width;//根据当前的坐标与页宽计算当前页码int currentPage = floor((sender.contentOffset.x - pageWidth/2)/pageWidth)+1; 阅读全文
posted @ 2014-03-25 16:10 Rex·Wei 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 1.等比率缩放- (UIImage *)scaleImage:(UIImage *)image toScale:(float)scaleSize{UIGraphicsBeginImageContext(CGSizeMake(image.size.width * scaleSize, image.size.height * scaleSize);[image drawInRect:CGRectMake(0, 0, image.size.width * scaleSize, image.size.height * scaleSize)];UIImage *scaledImage = UIGraph 阅读全文
posted @ 2013-03-21 11:57 Rex·Wei 阅读(240) 评论(0) 推荐(0) 编辑