小编phx*_*phx的帖子

iOS Keychain安全性

我们希望在iPhone上使用证书来验证MS Exchange Sync.我们不确定如何实施安全性概念来保护此证书.

例如,如果没有启用ScreenLock,是否可以在iPhone上获得"完整"Keychain访问权限?(或使用越狱iPhone).

有没有人有这方面的链接?

iphone certificate keychain ios

54
推荐指数
2
解决办法
3万
查看次数

UITableView dataSource必须从tableView返回一个单元格:cellForRowAtIndexPath:Exception

我实际上没有看到我的错误:

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
  static NSString *CellIdentifier = @"Cell";

  FriendTableViewCell *cell = (FriendTableViewCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
  if (cell == nil) {
      cell = [[[FriendTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
      [[NSBundle mainBundle] loadNibNamed:@"FriendTableViewCell" owner:self options:nil];
      cell = friendCell;
  }
  cell.lblNickname.text =  @"Tester";
  return cell;
}
Run Code Online (Sandbox Code Playgroud)

我究竟做错了什么?我检查了两次..但没有看到错误.

谢谢你的帮助!

iphone uitableview

43
推荐指数
2
解决办法
6万
查看次数

NSDictionary到NSArray?

我有一个NSDictionary看起来像:

{
"Item1" = 2.4;
"Item2" = 5.5;
"Item3" = 15.6;
}
Run Code Online (Sandbox Code Playgroud)

NSDictionary在表格视图中使用此项目,我必须将其转移到a NSArray,我是对的吗?

所以我尝试:

NSDictionary *dict = [myDict objectForKey:@"items"];

for (id item in dict) {
    [_myArray addObject:[dict objectForKey:item]];
}
Run Code Online (Sandbox Code Playgroud)

但_myArray一直空着?我究竟做错了什么?

objective-c nsdictionary nsarray

34
推荐指数
4
解决办法
11万
查看次数

Objective C中的格式字符串

如何将像"Fri Oct 17 00:00:00 +0200 2003"这样的字符串格式化为简单的日期字符串,如2003年10月17日星期五?

有没有简单的解决方案?

string objective-c

4
推荐指数
2
解决办法
3174
查看次数

NSDateFormatter仅适用于模拟器?

我简单地尝试重新格式化日期:

 NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
 NSDate *date = [[NSData alloc] init];
 //Mon, 05 Apr 2010 14:27:48 -0700
 [formatter setDateFormat:@"E, dd MMM yyyy HH:mm:ss Z"];
 date = [formatter dateFromString:self.currentItemValue];        

 [formatter setDateFormat:@"yyyy-MM-dd HH:mm"];
 self.currentItem.pubDate = [formatter stringFromDate:date];
 [formatter release];
Run Code Online (Sandbox Code Playgroud)

它适用于模拟器,但在设备上我只得到(null).

谢谢你的帮助!

更多测试:

NSString *string = @"Fri, 12 Dec 2008 18:45:15 -0800";
NSDateFormatter *dateFormatter = [[[NSDateFormatter alloc] init] autorelease];
dateFormatter setDateFormat:@"EEE, d MMM yyyy HH:mm:ss Z"];
NSDate *date = [dateFormatter dateFromString:string];
[dateFormatter setDateStyle:NSDateFormatterLongStyle];
//here i got (null) on the device but …
Run Code Online (Sandbox Code Playgroud)

iphone nsdateformatter

2
推荐指数
1
解决办法
1928
查看次数