摘要: 代码方法://日期阳历转换为农历;- (NSString *)convertDateToNongLi:(NSString *)aStrDate{ NSDate *dateTemp = nil; NSDateFormatter *dateFormater = [[NSDateFormatter alloc]init]; [dateFormater setDateFormat:@"yyyy-MM-dd"]; dateTemp = [dateFormater dateFromString:aStrDate]; NSCalendar* calendar = [[N... 阅读全文
posted @ 2013-06-20 18:42 cocoajin 阅读(2039) 评论(0) 推荐(0) 编辑
摘要: 一: // UIButton *editSome; 为全局变量,已开启ARC; editSome = [UIButton buttonWithType:UIButtonTypeCustom]; editSome.frame = kCCR(0, 0, 45, 25); [editSome setTitle:@"编辑" forState:UIControlStateNormal]; [editSome setTitleColor:[UIColor whiteColor] forState:UIControlStateNor... 阅读全文
posted @ 2013-06-20 12:00 cocoajin 阅读(909) 评论(0) 推荐(0) 编辑
摘要: 一:引入包和头文件; 需要在frameworks中添加QuartzCore.framework 在接口程序中加上头文件 #import <QuartzCore/QuartzCore.h>二:使用 CATransition *myAnimation = [CATransition animation]; myAnimation.duration = 0.8f; myAnimation.type = kCATransitionPush; myAnimation.subtype = kCATransitionFromBottom; [self.navigat... 阅读全文
posted @ 2013-06-20 10:35 cocoajin 阅读(470) 评论(0) 推荐(0) 编辑
摘要: 思路: 写一个 UILbel的子类;在子类里面重新布置UILbel的字体间距;如代码 .h#import <UIKit/UIKit.h>@interface AdjustableUILable : UILabel{ CGFloat characterSpacing;}@property CGFloat characterSpacing;@end 代码 .m#import "AdjustableUILable.h"@implementation AdjustableUILable@synthesize characterSpacing;- (id)initWith 阅读全文
posted @ 2013-06-18 13:25 cocoajin 阅读(1150) 评论(0) 推荐(0) 编辑
摘要: label.font=[UIFontfontWithName:@"Arial-BoldItalicMT"size:24];字体名如下:Font Family: American TypewriterFont: AmericanTypewriterFont: AmericanTypewriter-BoldFont Family: AppleGothicFont: AppleGothicFont Family: ArialFont: ArialMTFont: Arial-BoldMTFont: Arial-BoldItalicMTFont: Arial-ItalicMTFont 阅读全文
posted @ 2013-06-18 12:55 cocoajin 阅读(312) 评论(0) 推荐(0) 编辑
摘要: 方案一: [self.tableView setAllowsSelection:NO];方案二: [cell setSelectionStyle:UITableViewCellSelectionStyleNone]; 阅读全文
posted @ 2013-06-18 11:14 cocoajin 阅读(180) 评论(0) 推荐(0) 编辑
摘要: 方法一: [historyTodayTableVC setSeparatorStyle:UITableViewCellSeparatorStyleNone];方法二: [historyTodayTableVC setSeparatorColor:[UIColor clearColor]];注意:historyTodayTableVC 为当前的 tableView; 阅读全文
posted @ 2013-06-18 10:53 cocoajin 阅读(520) 评论(0) 推荐(0) 编辑
摘要: //适用于调试代码,当程序执行出错时,程序立即停止,并抛出异常; //这是一个宏 --称之为 断言; int x = 1; NSAssert(x!=0, @"**********************不能为0"); /* 1: 如上代码,当 !=0时,不会打印上述 不能为0; 2:当 x=0 时,就会打印上述信息,并程序立即抛出异常; */内部实现--------- #define NSAssert(condition, desc, ...) \ do { \ __PRAGMA_PUSH_NO_EXTRA_ARG_W... 阅读全文
posted @ 2013-06-05 17:00 cocoajin 阅读(220) 评论(0) 推荐(0) 编辑
摘要: 1. iOS APP Project or Mac APP Project编译错误提示:“The run destination My Mac 64-bit is not valid for Running the scheme '***'.The scheme '***' contains no buildables that can be built for the SDKs supported by the run destination My Mac 64-bit. Make sure your targets all specify SDKs that 阅读全文
posted @ 2013-06-03 21:40 cocoajin 阅读(250) 评论(0) 推荐(0) 编辑
摘要: 如同自定义Cell一样,使用UITableView的函数,可以自定义Section:- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section;例子代码:- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {NSString *sectionTitle=[self tableView:tableViewtitleForHeaderInSection:se 阅读全文
posted @ 2013-05-26 21:12 cocoajin 阅读(638) 评论(0) 推荐(0) 编辑