初始化NSDictionary:(工作经验)两种方法有时候效果不一样
方法1:
NSMutableDictionary *dic = [[NSMutableDictionary alloc] init];
[dic setObject:[Hp_KeysArray objectAtIndex:_textField.tag] forKey:@"hpb_id"];
[dic setObject:[NSNumber numberWithInt:_currentPage] forKey:@"currentPage"];
[dic setObject:[NSNumber numberWithInt:_pageSize] forKey:@"pageSize"];
[dic setObject:_seachtextField.text forKey:@"addr"];
方法2:
NSDictionary *dic = [[NSDictionary alloc]initWithObjectsAndKeys:
[Hp_KeysArray objectAtIndex:_textField.tag] ,@"hpb_id",
_seachtextField.text,@"addr",
_currentPage,@"currentPage",
_pageSize,@"pageSize",
nil];