Skip to content

OC Swift 简易可自定义ActionSheet菜单 XYActionSheet

License

Notifications You must be signed in to change notification settings

HeathHsia/XYActionSheet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bgimage.png

platform Language version blog

XYActionSheet

简易可自定义ActionSheet菜单

Email : [email protected]

欢迎Issue 欢迎邮件 欢迎Star

xyactionsheetgif

版本记录

1.0.0 --- 初始版本 简单实现ActionSheet

Installation

  1. OC版本

     直接将XYActionSheet文件夹下OC文件添加到工程
    

    Swift版本

     直接将XYSideViewController文件夹下Swift文件添加到工程
    

OC版本

// 定义菜单数组
NSArray *titles = @[@"拍摄", @"从手机相册选择"];
[[XYActionSheet actionSheet] showActionSheetWithTitles:titles selectedIndexBlock:^(NSInteger index) { 
 // index 对应 title数组的下标 	
 // index == title.count 为取消操作
}

Swift版本

let titles = ["拍照", "从手机相册选择"]
XYActionSheet.actionSheet().showActionSheetWithTitles(titles, { (index) in
 // index 对应 title数组的下标 	
 // index == title.count 为取消操作  
})

About

OC Swift 简易可自定义ActionSheet菜单 XYActionSheet

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published