maxkonovalov / MKDropdownMenu

🔻 Dropdown Menu for iOS with many customizable parameters to suit any needs
MIT License
524 stars 83 forks source link

text cell size to fit problem? #40

Closed fukemy closed 6 years ago

fukemy commented 6 years ago

Hello, I run your example and change some text for row of table. Then got that problem: simulator screen shot - iphone 5s - 2017-11-11 at 00 35 25

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

fukemy commented 6 years ago

I modify your cell class, it work but it's still not satisfied. can u check it?

import "ShapeSelectView.h"

@implementation ShapeSelectView

simulator screen shot - iphone 5s - 2017-11-11 at 01 07 48

IvanivOleg commented 6 years ago

@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;

maxkonovalov commented 6 years ago

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.

fukemy commented 6 years ago

thanks @IvanivOleg Iva and @maxkonovalov . I used my own view and it work like expected :). + 1 for great lib