iTofu / LCActionSheet

一款简约而不失强大的 ActionSheet,微博、微信和 QQ 都采用了极其类似的样式,完全支持 Swift。
https://note.leodev.me/LCActionSheet/
MIT License
821 stars 144 forks source link

最大高度问题? #64

Open shingohu opened 6 years ago

shingohu commented 6 years ago

因为item个数不定,太多时超出屏幕高度,能否提供api限定view最大高度占屏幕高度的比例

iTofu commented 6 years ago

这两个属性好像满足你的需求:

/**
 If buttons' bottom view can scrolling. Default is NO.
 */
@property (nonatomic, assign, getter=canScrolling) BOOL scrolling;

/**
 Visible buttons' count. You have to set `scrolling = YES` if you want to set it.
 */
@property (nonatomic, assign) CGFloat visibleButtonCount;
shingohu commented 6 years ago

@iTofu 恩 这个可以解决一部分问题,适配好像有点问题,比如我设置visibleButtonCount = 10 在iphonex上可以完全显示,但是可能小屏上就超出屏幕显示了,需要一个最大高度控制

shingohu commented 6 years ago

你可以试下item个数很多, visibleButtonCount = 10,部分选项超出了屏幕