WMZDailog – the most functional style of the most complete popover controls all use chain programming, all attributes can be customized

(If there are any other interesting popovers can be screenshots for me, I will spare time to add this style)~ ~

WMZDailog

features

  • Chain syntax is elegant in structure
  • Single/multiple options are supported
  • Level 1, 2, and 3 are supported
  • Supports infinite level linkage
  • Support time selection
  • Supports multiple animations
  • Supports all font color/font size Settings
  • Support for Payment View
  • Ios13Persent pop-ups are supported
  • Supports the calendar
  • Support menu selection
  • Supports custom pop-ups

Call enumeration description

typedef enum : NSUInteger{DialogTypeNornal = 1, // default popup DialogTypeSheet, // bottom popup DialogTypeAuto, // Default popup disappears DialogTypePay, // Pay password box DialogTypeShare, // share popup DialogTypeWrite, // edit popup DialogTypePickSelect, // select popup DialogTypePickSelect, // Select DialogTypeMenusSelect, // select DialogTypeMenusSelect, DialogTypeLocation, // Select DialogTypeDatePicker, // Date select DialogTypeNaviMenu, //QQ top popup DialogTypeLoading, // load box DialogTypeBuyCar, WMZTags DialogTypeCardPresent, ios13 Present effect DialogTypeCalander, calendar popup DialogTypeMyView, }DialogType;Copy the code

The default Windows

At the bottom of the popup window

Disappear hud popup automatically

Payment password box

Popover with share

Popover with edit box

Popover with selection

Pickups pop up

Popover with countdown

Select pop-ups from the drop-down list

Popover with download

Drop down infinite level menu popup

Regional popup window

Date selection popup

Top and bottom pop-ups

Loading frame

Shopping cart popover

Ios13 effect of the present

The calendar pop-up

Custom pop-ups

Parameter Description (See Demo for details)

# # # DialogTypeNornal/DialogTypeSheet/DialogTypeSelect…

You can set general parameters type Function (default)
wData id The data source
wShowAnimation DialogShowAnination The animation default AninatonZoomIn appears
wHideAnimation DialogHideAnination Disappear animation default None
wAnimationDurtion NSTimeInterval Animation time default 0.8
wParentVC UIViewController Parent controller default Current VC
wType DialogType Pop-up type Default DialogTypeNornal
wWidth CGFloat The width of popover view is default 500
wHeight CGFloat Height of the popover view default Adaptive height 300
wMainOffsetY CGFloat Y spacing Default 20
wMainOffsetX CGFloat X space default 15
wMainBtnHeight CGFloat Button height Default 60
wMyCell UITableViewCell Custom cell
wMainToBottom BOOL The view is at the bottom default NO
wLineColor UIColor The line color is default 333333
wLineAlpha CGFLoat The opacity of the line is default 0.5
wTitle NSString Title Text Default Title
wMessage NSString Content Text Default content
wOKTitle NSString The text of the button default is ok
wCancelTitle NSString Cancel button text default cancel
wOKColor UIColor Determine the color of the button default 0xFF9900
wCancelColor UIColor Cancel button color default 0x666666
wMainBackColor UIColor The background color of the pop-up view is default 0xFFFFFF
wTitleColor UIColor The color of the title text is default 0x333333
wMessageColor UIColor Content text color default 0x333333
wOKFont CGFLoat Determine the font size of the button default 16.0F
wCancelFont CGFLoat The font size of the cancel button is default 16.0F
wTitleFont CGFLoat The font size of the title text is default 14.0F
wMessageFont CGFLoat The font size of the content text is default 16.0F
wMainRadius CGFLoat Pop up the rounded corners of the view default 15.0f
wShadowColor UIColor Mask layer color default 0x333333
wShadowAlpha CGFLoat The opacity of the mask layer is default 0.4F
wShadowCanTap BOOL The mask layer can be closed by clicking default YES
wShadowShow BOOL Whether to display default YES on the mask layer
wEffectShow BOOL Whether to display default NO on frosted glass
wMultipleSelection BOOL Pops up the default NO
wSelectShowChecked BOOL Select whether to check default NO
wTextAlignment NSTextAlignment Text alignment Default Center

###DialogTypeAuto

DialogTypeAuto parameters type Function (default)
wDisappelSecond CGFLoat Automatic disappear time Default 1.5 F

###DialogTypePay

DialogTypePay parameters type Function (default)
wSonData id Payment method select data source
wKeyBoardMarginY CGFLoat Distance between the pop-up window and the keyboard Default 70
wPayNum NSInteger Pay password number default 6(if you want to set the number of digits larger than 6, ensure that the width is sufficient)
wDefaultSelectPayStr NSString Payment mode Default Agricultural Bank of China

###DialogTypeWrite

DialogTypeWrite parameters type Function (default)
wPlaceholder NSString Prompt default Enter
wWirteTextMaxLine NSInteger Maximum number of lines that can be wrapped in an edit box Default 7
wWirteTextMaxNum NSInteger The maximum number that can be entered in the edit box default-1 (-1 indicates unlimited)
wWirteKeyBoardType UIKeyBoardType Edit box keyboard type default UIKeyboardTypeDefault

###DialogTypePop

DialogTypePop parameters type Function (default)
wPercentAngle CGFLoat The pop-up bubble position is default 0.5F
wPercentOrginX CGFLoat Popup view center X offset default 1.0f (middle)
wDirection DiaDirection The view direction is default directionDowm
wNavigationItem BOOL Navigation position Default NO
wTapView UIView View of the trigger point default-mandatory

###DialogTypeDown

DialogTypeDown parameters type Function (default)
wImageSize CGSize Image size default (50,50)
wImageName NSString Image path name default –
wProgressTintColor UIColor Color of the idle progress bar Default 0xFF9900
wTrackTintColor UIColor Color of a Progress Bar Default 0xF3F4F6 description

###DialogTypeMenusSelect

DialogTypeMenusSelect parameters type Function (default)
wTableViewColor NSArray The background color of the tableview default FFFFFF/F6F7FA/EBECF0/666666

###DialogTypeLocation

DialogTypeLocation parameters type Function (default)
wLocationType NSInteger Region association level Default 3
wChainType ChainType Associative hierarchy style default ChainPickView
wSeparator NSString Select the data separator default,

###DialogTypeDatePicker

DialogTypeDatePicker parameters type Function (default)
wDateTimeType NSString Time selector style YYYY Year MM month DD day HH Hour MM minute SS second (optional combination) Default YYYY :MM: DD HH: MM: SS
wPickRepeat BOOL PickView infinite loop default YES

###Share/tabbarMenu/NaviMENU

Share/tabbarMenu NaviMENU parameters type Function (default)
wColumnCount NSInteger Columns default –
wRowCount NSInteger Line default –
Note that if rows and columns are set it should be displayed as expected and that wHeight is set

###DialogTypeLoading

DialogTypeLoading parameters type Function (default)
wLoadingType LoadingStyle Load box style Default LoadingStyleWait
wLoadingSize CGSize Size default (90,90)
wLoadingColor UIColor Load box line color Default Determines the text color of the button

###DialogTypeCardPresent

DialogTypeCardPresent parameters type Function (default)
wOpenScrollClose BOOL Slide to the top and continue to slide to turn off default YES
wLeftScrollClose BOOL Skid detection can be disabled default YES
wOpenDragging BOOL Enable dragging default YES
wScaleParentVC BOOL Scale the controller at the bottom default YES
wParentHeadView Custom top view default –
wParentBottomView Customize the bottom view default –

###DialogTypeCalander

DialogTypeCalander parameters type Function (default)
wDirectionVertical BOOL Default NO(Horizontal slide)
wCalanderCanScroll BOOL Enable sliding default YES
wOpenChineseDate BOOL Enable the Chinese Lunar Festival display default YES
wHideCalanderBtn BOOL Hide the action button on the calendar default YES
wDateShowCircle NSArray Display dot date @[[NSDate date]] default –
wReginerCollectionCell NSString Register custom collectionViewCell default –

###DialogTypeMyView

DialogTypeMyView parameters type Function (default)
wAddBottomView BOOL Whether to add the bottom button default NO

###Events

Events Function (default)
wEventOKFinish Ok click event
wEventCancelFinish Cancel click event (no default cancel button)
wEventFinish All operation events
wEventClose Popover close event
wEventMenuClick Menu click event
wSelectCell Customize cell click
wMyCell Custom cell
wMyDiaLogView Customize popover View(return to bottom View)
wCalanderCell Customize the calendar cell
wCalanderCellClick Customize calendar click

usage

The default mode

  Dialog().wTypeSet(DialogTypeNornal).wStart();
Copy the code

Multiselect mode

Dialog().wTypeSet(type) .wEventOKFinishSet(^(id anyID, id otherData) { NSLog(@"%@",anyID); }) // appear animation.wshowanimationSet (AninationCombineTwo).wtitleset (@"").wmultiplesElectionSet (YES).wselectShowCheckedSet (YES) WDataSet (@ [@ "swim," @ "to play basketball," @ "badminton", @ "climb a mountain," @ "to play football," @ "table tennis"]), wStart ();Copy the code

Custom pop-ups (Youku) More custom pop-ups see demo

MyAlert = Dialog().wtypeset (DialogTypeMyView) id otherData) { myAlert = nil; }) .wShowAnimationSet(AninatonZoomIn) .wHideAnimationSet(AninatonZoomOut) .wMyDiaLogViewSet(^UIView *(UIView *mainView) { UIImageView *image = [UIImageView new]; image.image = [UIImage imageNamed:@"healthy"]; image.frame = CGRectMake(0, 0, mainView.frame.size.width, 80); [mainView addSubview:image]; UILabel *la = [UILabel new]; La. The font = [UIFont systemFontOfSize: 15.0 f]; La.text = @" In order to protect the healthy growth of minors, Youku specially launches the juvenile mode, some functions in this mode cannot be used normally, please take the initiative to choose, and set the guardian password "; la.numberOfLines = 0; la.frame = CGRectMake(10, CGRectGetMaxY(image.frame), mainView.frame.size.width-20, 100); [mainView addSubview:la]; UIButton *enter = [UIButton buttonWithType:UIButtonTypeCustom]; [mainView addSubview:enter]; Enter the titleLabel. The font = [UIFont systemFontOfSize: 14.0 f]; enter.frame = CGRectMake(0, CGRectGetMaxY(la.frame), mainView.frame.size.width, 44); [enter setTitle: @ "into teenagers mode >" forState: UIControlStateNormal]; [enter setTitleColor:DialogColor(0x108ee9) forState:UIControlStateNormal]; [enter addTarget:WEAK action:@selector(youkuAction:) forControlEvents:UIControlEventTouchUpInside]; UIButton *know = [UIButton buttonWithType:UIButtonTypeCustom]; [mainView addSubview:know]; Know. TitleLabel. The font = [UIFont systemFontOfSize: 14.0 f]; know.frame = CGRectMake(0, CGRectGetMaxY(enter.frame), mainView.frame.size.width, 44); [know setTitle: @ "I know" forState: UIControlStateNormal]; [know setTitleColor:DialogColor(0x3333333) forState:UIControlStateNormal]; [know addTarget:WEAK action:@selector(youkuAction:) forControlEvents:UIControlEventTouchUpInside]; mainView.layer.masksToBounds = YES; mainView.layer.cornerRadius = 10; return know; }) .wStart();Copy the code

For other modes, see Demo

Rely on

No dependencies Import WMZTags if you need to use the shopping cart popup

The installation

CocoaPods

  1. Update Cocoapods to the latest version.
  2. Add to Podfilepod 'WMZDialog'.
  3. performpod installpod update.
  4. Import #import “wmzdialog.h”.

Note: Remove the warning of chained programming

Set CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF to NO in Buildding Settings

Manual installation

  1. Download all the contents of the WMZDialog folder.
  2. Add (drag and drop) the source file in WMZDialog to your project.
  3. Import the # import “WMZDialog. H”

System requirements

The library supports iOS 9.0 and Xcode 9.0 at a minimum.

Personal home page

GitHub address feel useful point a star support