zoukankan      html  css  js  c++  java
  • iOS第三方(ActionSheet)-JTSActionSheet

    外观和系统的基本一样

    github地址:https://github.com/jaredsinclair/JTSActionSheet

    百度云下载: http://pan.baidu.com/s/1qWyZwjM

    使用方法:

    #import "JTSActionSheet.h"
     JTSActionSheetTheme *theme = [JTSActionSheetTheme defaultTheme];
        theme.titleColor = [Common colorWithTheme];
        theme.normalButtonColor = [Common colorWithTheme];
        // Setup your buttons
        
        JTSActionSheetItem *buyAll = [JTSActionSheetItem itemWithTitle:@"拍照" action:^{
            [self initCamera];
        } isDestructive:NO];
        
        JTSActionSheetItem *deleteAll = [JTSActionSheetItem itemWithTitle:@"从相册选择" action:^{
            [self initPhoto];
        } isDestructive:NO];
        
        JTSActionSheetItem *cancel = [JTSActionSheetItem itemWithTitle:@"取消" action:^{
            
        } isDestructive:NO];
        
        JTSActionSheet *sheet = [[JTSActionSheet alloc] initWithTheme:theme
                                                                title:nil
                                                          actionItems:@[buyAll, deleteAll]
                                                           cancelItem:cancel];
        [sheet showInView:self.view];

     效果图:

     

  • 相关阅读:
    聊一聊Flutter的setState()
    Flutter + Android 混合开发
    Flutter防止布局溢出
    Flutter获取远程数据 刷新UI界面
    Flutter日常笔记
    POJ 3299 Humidex
    POJ 1207 The 3n + 1 problem
    POJ 1005 I Think I Need a Houseboat
    POJ 1004 Financial Management
    POJ1012
  • 原文地址:https://www.cnblogs.com/hxwj/p/4585504.html
Copyright © 2011-2022 走看看