我们希望在iPhone上使用证书来验证MS Exchange Sync.我们不确定如何实施安全性概念来保护此证书.
例如,如果没有启用ScreenLock,是否可以在iPhone上获得"完整"Keychain访问权限?(或使用越狱iPhone).
有没有人有这方面的链接?
我实际上没有看到我的错误:
- (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)
我究竟做错了什么?我检查了两次..但没有看到错误.
谢谢你的帮助!
我有一个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一直空着?我究竟做错了什么?
如何将像"Fri Oct 17 00:00:00 +0200 2003"这样的字符串格式化为简单的日期字符串,如2003年10月17日星期五?
有没有简单的解决方案?
我简单地尝试重新格式化日期:
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 ×3
objective-c ×2
certificate ×1
ios ×1
keychain ×1
nsarray ×1
nsdictionary ×1
string ×1
uitableview ×1