当将一个形式为@"Tue Aug 01 16:12:41 +0800 2017"的字符串转换成NSDate时,需要NSDateFormatter设置本地化信息NSLocale,否则会出现转换失败 NSDateFormatter *fmt = [[NSDateFormatter alloc] init ...
分类:
其他好文 时间:
2017-08-01 17:54:22
阅读次数:
209
inline static NSData* encodeBCD(NSString *value){ //NSString *value = @"123456"; NSMutableData *vdata = [[NSMutableData alloc] init]; __uint8_t bytes[ ...
分类:
移动开发 时间:
2017-07-31 18:57:04
阅读次数:
226
创建 tableView UITableViewStyle 有两种选择 #pragma mark - 创建 tableView - (void)createTableView { // 枚举类型共同拥有两个 self.mainTableView = [[UITableView alloc] init ...
分类:
其他好文 时间:
2017-07-29 15:25:38
阅读次数:
199
- (void)viewDidLoad { UIButton *backItem = [UIButton buttonWithType:UIButtonTypeCustom]; UIBarButtonItem *back = [[UIBarButtonItem alloc] initWithCust ...
分类:
其他好文 时间:
2017-07-28 17:38:01
阅读次数:
158
1 defineClass('JPViewController', { 2 handleBtn: function(sender) { 3 var tableViewCtrl = JPTableViewController.alloc().init() 4 self.navigationContro... ...
分类:
Web程序 时间:
2017-07-23 15:31:32
阅读次数:
178
一 注意堆栈大小,简单来说,栈空间用于局部变量空间(size=0x400一般够用),堆(size=0x200一般够用)空间用于 alloc 或者 malloc函数动态申请变量空间 ...
分类:
其他好文 时间:
2017-07-20 22:09:47
阅读次数:
166
//对比的时间 NSCalendar *gregorian = [[NSCalendar alloc]initWithCalendarIdentifier:NSCalendarIdentifierGregorian]; [gregorian setFirstWeekday:2]; NSDateFor ...
分类:
其他好文 时间:
2017-07-19 20:32:28
阅读次数:
136
- (IBAction)sendMessage1:(id)sender { UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"短信编辑"message:nil delegate:self cancelButtonTitle:@"确定" ... ...
分类:
其他好文 时间:
2017-07-17 17:09:11
阅读次数:
128
ACAccountStore *account = [[ACAccountStore alloc] init]; ACAccountType *type = [account accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierSi ...
分类:
移动开发 时间:
2017-07-15 12:43:23
阅读次数:
283
1、引入 在文件导入 #import <CoreText/CoreText.h> 2、程序 NSMutableAttributedString *attributedString =[[NSMutableAttributedString alloc]initWithString:@"你的字符串"]; ...
分类:
其他好文 时间:
2017-07-14 10:18:29
阅读次数:
242