cell = [tableView dequeueReusableCellWithIdentifier:@"identify"];
if ( cell == nil )
{
cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:@"identify"] autorelease];
cell.text = _(PASSWORDLOCK);
cell.textAlignment = UITextAlignmentLeft;
cell.selectionStyle = UITableViewCellSelectionStyleNone;
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
statelabel = [ [ UILabel alloc ] initWithFrame:CGRectMake(235, cell.frame.origin.y+3, 60, cell.frame.size.height-10) ];
userDefaults = [ NSUserDefaults standardUserDefaults ];
if ( [ userDefaults objectForKey:PASSWORD ] )
{
statelabel.text = _(OPEN);
}
else
{
statelabel.text = _(CLOSE);
}
statelabel.textColor = [ UIColor colorWithRed:0.18 green:0.39 blue:0.73 alpha:1 ];
statelabel.tag = PASSWORD_STATE;
[ cell.contentView addSubview:statelabel ];
[ statelabel release ];
}