Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why I cant be able to change the UITableViewCell detailTextLabel's frame (just the label's position)?

Tags:

iphone

I am having a table view with default UITableViewCell of style UITableViewCellStyleValue2. I just want to move detailTextLabel few pixels to the right. I know it makes no sense to adjust its width and height :). I am trying to set detailTextLabel's frame with my x and y value. But its not affecting the its frame. I prefer to use default UITableViewCell, in this case, over a customized cell because the default UITableViewCell automatically manages the text alignment and centering of the labels..

  1. How to change UITableViewCell detailTextLabel's frame?
  2. Am I allowed to change its frame?

Thanks everyone..

like image 883
EmptyStack Avatar asked Feb 26 '23 10:02

EmptyStack


1 Answers

You said you want to change the frame of detailTextLabel without using the custom cell implementation then the answer to your questions will be :-

  1. It is not possible
  2. No, it is not possible

For that you have to use custom cell , and add probably a textview or a label to the cell's contentView according to your needs

like image 182
Iphone_bharat Avatar answered Mar 08 '23 23:03

Iphone_bharat