摘要:
+(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 阅读全文
摘要:
#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] 阅读全文
摘要:
//每页宽度CGFloat pageWidth = sender.frame.size.width;//根据当前的坐标与页宽计算当前页码int currentPage = floor((sender.contentOffset.x - pageWidth/2)/pageWidth)+1; 阅读全文