text cell size to fit problem?
fukemy opened this issue · 4 comments
Hello, I run your example and change some text for row of table. Then got that problem:
I think u used size to fit method to label text or something like that but i can not find the code. Plz help me how to make text become clipped like "đasadasdasd..." . Thanks # # @ @maxkonovalov @IvanivOleg
I modify your cell class, it work but it's still not satisfied.
can u check it?
#import "ShapeSelectView.h"
@implementation ShapeSelectView
- (void)awakeFromNib {
[super awakeFromNib];
self.shapeView.fillColor = [UIColor clearColor];
self.shapeView.strokeColor = self.textLabel.textColor;
self.shapeView.lineWidth = 1;
self.textLabel.numberOfLines = 0;
self.textLabel.lineBreakMode = NSLineBreakByWordWrapping;
}
@fukemy Looks like the default adjustsFontSizeToFitWidth property value of that label is YES. If you want to change it go to the ShapeSelectView.m and add the next line of code into the awakeFromNib method:
self.textLabel.adjustsFontSizeToFitWidth = NO;
Hi, @fukemy!
The ShapeSelectView
is just an example of a custom view for menu rows, you can set up your own view the way you like.
You can customize the height of the rows for each menu component using the delegate method - (CGFloat)dropdownMenu:(MKDropdownMenu *)dropdownMenu rowHeightForComponent:(NSInteger)component
, but please note that varying row heights within a single component are not supported at the moment.
thanks @IvanivOleg Iva and @maxkonovalov . I used my own view and it work like expected :). + 1 for great lib