YBPopupMenu
1.0.0
Podfile
中加入pod 'YBPopupMenu'
後pod install
即可樣式 | 圖例 |
---|---|
YBPopupMenuArrowStyleCurve 默認 | |
YBPopupMenuArrowStyleStraight |
dismissAllPopupMenu
方法,方便一鍵隱藏所有popupMenu[self updateUI]
方法YBPopupMenuAnimationStyleScale
和YBPopupMenuAnimationStyleFade
兩種,可自訂YBPopupMenuPriorityDirection
屬性,可以設定箭頭的第一優先方向,當將要超過螢幕時會自動反轉方向rectCorner
屬性,可以自訂圓角(反轉時會自動鏡像的反轉圓角)NSAttributedString
titles
, images
, tableView
, minSpace
等等YBPopupMenuPriorityDirectionLeft
/ YBPopupMenuPriorityDirectionRight
/ YBPopupMenuPriorityDirectionNone
時需手動設定arrowPosition
來設定箭頭在該行的位置#import "YBPopupMenu.h"
[YBPopupMenu showAtPoint:p titles:TITLES icons:nil menuWidth:110 otherSettings:^(YBPopupMenu *popupMenu) {
popupMenu.dismissOnSelected = NO;
popupMenu.showShadow = YES;
popupMenu.delegate = self;
popupMenu.offset = 10;
popupMenu.type = YBPopupMenuTypeDark;
popupMenu.rectCorner = UIRectCornerBottomLeft | UIRectCornerBottomRight;
popupMenu...;
}];
xcode7.0+
如果您在使用本庫的過程中發現任何bug或有更好建議,請歡迎@issues 我或聯絡本人email [email protected]