UITableViewCell和自定义accessoryDisclosureIndicator

时间:2015-10-28 15:47:37

标签: ios objective-c uitableview

我在toggleClass制作了自定义accessoryDisclosureIndicator。 我在替代UITableViewCell处有背景颜色,一旦为Table Cell插入自定义图像视图(细节),表格单元格背景颜色的右端就会改变。

我怎样才能让背景颜色相同? 问题显示在附件中。enter image description here

代码如下所示。

accessorydisclosureindicator

1 个答案:

答案 0 :(得分:0)

你必须改变:

procedure TForm1.btnChangePassUserClick(Sender: TObject);
var
  sNewPass,sOldPass:string;
begin
  sOldPass:= InputBox('Password verification','Please enter your current password','');

  if sOldPass = sPassword then
  begin
    sNewPass := inputBox('Password change','Please enter a new Password with at least 1 number and letter','');
    if isPasswordValid(sNewPass) then
    begin
      tblUsers.Active := True;

      // I'd think the search should be on the UserID rather than
      // the password. Are you certain this is what you want to do?
      if tblUsers.Locate('UserID', sPassword, []) then
      begin
        tblUsers.Edit;
        tblUsers['Password'] := sNewPass;
        tblUsers.Post;
      end;
      tblUsers.Active := False;

      if bRememberMe then
      begin
        ShowMessage('Password changed, please log in again for security purposes');
        imgLogoutClick(Sender);
      end;

      sPassword := sNewPass;
    end
    else ShowMessage('Please ensure your password contains at least 1 letter and 1 number');
  end
  else 
    ShowMessage('Incorrect Password');
end;

cell.contentView.backgroundColor = [UIColor colorWithRed:0.968 green:0.862 blue:0.925 alpha:0.5];

当附件视图开始时,单元格cell.backgroundColor = [UIColor colorWithRed:0.968 green:0.862 blue:0.925 alpha:0.5]; 会停止。

看看这个插图:

enter image description here