MMActionSheet介绍(自定义的UIActionSheet弹出框组件)

MMActionSheet是一个用Swift编写的简单弹出选择框组件,模仿微信的ActionSheet。它支持iOS 8.0+,swift 4.0+。安装方式包括Swift Package Manager、CocoaPods和手动导入。使用时,可以自定义标题、事件按钮数组、动画时长等,并提供回调处理按钮点击事件。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

在这里插入图片描述

Introduction

MMActionSheet 是一个简单的弹出选择框,使用纯swift编写,类似于微信的actionsheet

MMActionSheet is an simple pop-up selection box(ActionSheet) written in pure Swift. Similar to the wechat actionsheet

Rquirements

  • iOS 8.0+
  • swift 4.0+

Installation

Swift Package Manager

To install with Swift Package Manager, add this package to your project’s ‘Swift Packages’ section. Or add the following line to your Package.swift:

 .package(url: "https://github.com/MinMao-Hub/MMActionSheet.git", from: "2.0")
Install with Cocoapods
  • To install MMActionSheet using CocoaPods, integrate it in your existing Podfile, or create a new Podfile:

    platform :ios, '8.0'
    use_frameworks!
    
    target 'MyApp' do
      pod 'MMActionSheet', '~> 2.0'
    end
    
  • Execute command:

    • pod repo update master
    • pod install
  • Import MMActionSheet in you code

    • import MMActionSheet
Manual import

Just clone and add components dir to your project.

Example

desc preview
Has Cancel buttons and Title
【有标题和取消按钮】
在这里插入图片描述
Has a Cancel button but no Title
【无标题有取消按钮】
在这里插入图片描述
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值