首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • 来自专栏TechBox

    UIAlertView、UIActionSheet、UIAlertController使用

    ]; } // 需要遵守协议UIAlertViewDelegate来响应点击事件 #pragma mark - UIActionSheetDelegate - (void)actionSheet:(UIActionSheet loginAndPwdTextAlert.gif (二)UIActionSheet - (void)actionSheet { // iOS8被废弃 UIActionSheet *sheet = [[UIActionSheet alloc] initWithTitle:nil delegate:self cancelButtonTitle:@"取消" destructiveButtonTitle 旨在替代UIAlertView和UIActionSheet这两个控件。 我们知道,使用UIAlertView和UIActionSheet需要遵守对应的协议并实现相应的方法,因为UIAlertView和UIActionSheet采用delegate的方式处理事件。

    6.6K30发布于 2018-06-05
  • 来自专栏一“技”之长

    IOS中UIActionSheet使用详解 原

    IOS中UIActionSheet使用方法详解 一、初始化方法 - (instancetype)initWithTitle:(NSString *)title delegate:(id<UIActionSheetDelegate ; - (void)dismissWithClickedButtonIndex:(NSInteger)buttonIndex animated:(BOOL)animated; 使用代码将视图收回 三、UIActionSheet 代理方法 - (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex; 点击按钮时触发的方法 - (void)willPresentActionSheet:(UIActionSheet *)actionSheet;  视图将要弹出时触发的方法 - (void)didPresentActionSheet :(UIActionSheet *)actionSheet; 视图已经弹出式触发的方法 - (void)actionSheet:(UIActionSheet *)actionSheet willDismissWithButtonIndex

    72320发布于 2018-08-15
  • 来自专栏移动端开发

    Swift 2.0 UIAlertView 和 UIActionSheet 的使用

     在 IOS 9.0 之后, UIAlertView  是 给废弃了的,虽然你要使用的话,暂时还是可以的,但是在 9.0 之后,IOS 推荐大家使用的是  UIAlertController 这个控制器。下面是它的使用。 // 在 IOS 9.0 之后, UIAlertView 是 给废弃了的,虽然你要使用的话,暂时还是可以的,但是在 9.0 之后,IOS 推荐大家使用的是 UIAlertController 这个控制器。下面是它的使用。 let alview:UIAlertContr

    1K90发布于 2018-01-09
  • 来自专栏陈满iOS

    iOS·长按保存图片到相册:系统原生UIActionSheet与UIAlertView,UIAlertController等方案

    UIActionSheet实现底部弹框 给CollectionViewCell中的UIImageView添加事件 #pragma - mark - UICollectionViewDataSource UILongPressGestureRecognizer*)gesture { if(gesture.state == UIGestureRecognizerStateBegan) { UIActionSheet *actionSheet = [[UIActionSheet alloc]initWithTitle:nil delegate:self cancelButtonTitle:@"取消"destructiveButtonTitle imgView.image; } } 实现UIActionSheetDelegate代理方法 #pragma - mark - UIActionSheetDelegate - (void)actionSheet:(UIActionSheet

    2.1K10发布于 2018-09-10
  • 来自专栏mukekeheart的iOS之旅

    iOS学习——UIAlertController详解

    这两天项目中统一对已经被iOS API废弃的UIAlertView和UIActionSheet进行替换,我们知道,UIAlertView和UIActionSheet都已经被iOS的API所废弃了。 在两者的API中都建议用UIAlertController替代,并通过设置不同的类型风格来选择是原先的UIAlertView或UIActionSheet的形式。    之前项目中一直用的都是原先的UIAlertView和UIActionSheet风格,所以对UIAlertController的了解很少,这次也借着这次统一项目更新的机会对UIAlertController UIAlertController是在iOS8.0中出现的一种统一的提示风格的界面,代替原来的UIAlertView和UIActionSheet两种类别。 preferredStyle:UIAlertControllerStyleAlert]; //UIActionSheet风格 UIAlertController* alert = [UIAlertController

    4.6K170发布于 2018-03-01
  • 来自专栏韩曙亮的移动开发专栏

    【IOS 开发】基本 UI 控件详解 (UISegmentedControl | UIImageView | UIProgressView | UISlider | UIAlertView )

    UIActionSheet 控件 1. UIActionSheet 简介 (1) UIActionSheet 作用 UIActionSheet 作用 : 该控件是显示在界面底部的按钮列表, 该控件 有 一个标题 和 多个按钮; (2) UIActionSheet 按钮 UIActionSheet 固定按钮 :  -- 取消按钮 : 灰色背景, 主要用于取消该 UIActionSheet 控件显示; -- 销毁按钮 : 红色背景, 用于删除某记录时, 使用该按钮确认销毁 ; (3) UIActionSheet 风格 UIActionSheet 支持风格 :  -- UIActionSheetStyleDefault : 灰色背景上显示白色文字; -- UIActionSheetStyleBlackTranselucent UIActionSheet 示例代码 UIActionSheet 示例代码 :  -- 界面设计文件 :  -- OCViewController.h :  // // OCViewController.h

    4.7K40编辑于 2023-03-27
  • 来自专栏iOS122-移动混合开发研究院

    BlocksKit初见:一个支持将delegate转换成block的Cocoa库

    DynamicDelegate:动态代理(消息转发机制) UIKit:扩展了 UIAlertView,UIActionView,UIButton 等 最常用的是 UIKit Category,它为 UIAlertView,UIActionSheet 用法实例 UIAlertView 和 UIActionSheet 用法示例: UIAlertView *alertView = [[UIAlertView alloc] bk_initWithTitle NSInteger index) { if (index == 1) { NSLog(@"%ld clicked",index); } }]; [alertView show]; [[UIActionSheet bk_actionSheetCustomWithTitle:nil buttonTitles:@[@"查看", @"退出"] destructiveTitle:nil cancelTitle:@"取消" andDidDismissBlock:^(UIActionSheet

    1.6K100发布于 2018-01-02
  • 来自专栏ShaoYL

    遮罩 HUD 指示器 蒙板 弹窗

    //加登录框 alertView.alertViewStyle = UIAlertViewStyleLoginAndPasswordInput; [alertView show]; UIActionSheet 的使用 <代理方法处理按钮点击> UIActionSheet *sheet = [[UIActionSheet alloc] initWithTitle:@"警告:确定要删除它?"

    1.5K50发布于 2018-05-11
  • 来自专栏一“技”之长

    iOS8统一的系统提示控件——UIAlertController

    iOS8统一的系统提示控件——UIAlertController 一、引言         相信在iOS开发中,大家对UIAlertView和UIActionSheet一定不陌生,这两个控件在UI设计中发挥了很大的作用 在iOS8之后,系统吸引了UIAlertController这个类,整理了UIAlertView和UIActionSheet这两个控件,在iOS中,如果你扔使用UIAlertView和UIActionSheet UIActionSheet使用:http://my.oschina.net/u/2340880/blog/409907。

    93410发布于 2018-08-16
  • 来自专栏游戏杂谈

    升级IOS8游戏上传自定义头像功能失效的问题

    第一个问题:点击后无响应 原因是 UIActionSheet 的showInView方法的参数上,之前设置的是self.view.window (NSInvalidArgumentException, 原因是UIActionSheet在ios8中已经被弃用了(点击查看详情>>),使用UIAlertController进行替代,这里有两篇文件介绍它: UIAlertController in IOS8>

    91620发布于 2018-11-19
  • 来自专栏张志敏的技术专栏

    在 Xamarin.iOS 项目中访问 ArcGIS 云端专题数据图层

    string[] { @"None",@"US",@"Canada",@"France",@"Australia",@"Brazil" }; } var pickerSheet = new UIActionSheet (UIPickerView picker, int row, int component) { // Dismiss action sheet var pickerSheet = (UIActionSheet selectQuery, AGSFeatureLayerSelectionMethod.New); } // Dismiss action sheet var pickerSheet = (UIActionSheet

    2.1K20发布于 2020-08-10
  • 来自专栏码客

    iOS适配

    indexPathForCell:self].row; }else{ curRow = [(UITableView )[self superview] indexPathForCell:self].row; } UIActionSheet and UIAlertView 的升级 在iOS8里面,官方提供了新的类UIAlertController来替换UIActionSheet and UIAlertView。 如果你在iOS 8 里面使用UIActionSheet and UIAlertView 可能会出现一些很奇怪的问题,建议在iOS 8 里面使用UIAlertController,iOS 8 之前使用UIActionSheet

    1.4K10发布于 2019-10-22
  • 来自专栏APP自动化测试

    函数响应式编程及ReactiveObjC学习笔记 (三)

    terminalB]; [terminalB subscribe:terminalA]; 大家可以自己运行看看效果, 当textFieldA输入123的时候textFieldB会变为321 下面我们看看 UIActionSheet class RACDelegateProxy; @class RACSignal<__covariant ValueType>; NS_ASSUME_NONNULL_BEGIN @interface UIActionSheet rac_buttonClickedSignal; @end rac_delegateProxy跟之前textview是一样的用法这里开始就不再解释这类属性了 我们直接试着使用rac_buttonClickedSignal UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:@"RAC ActionSheet" delegate:self cancelButtonTitle

    1.2K20发布于 2019-10-15
  • 来自专栏iOS进阶开发

    iOS开发UI篇--一个支持图文混排的ActionSheet

    一、简介 UIActionSheet是IOS提供给我们开发者的底部弹出菜单控件,一般用于菜单选择、操作确认、删除确认等功能。 三、实现原理 因为ActionSheet不能支持图片的显示,所以我们就放弃使用扩展UIActionSheet控件的方法。

    95750发布于 2018-11-26
  • 来自专栏iOS逆向与安全

    iOS调整导航条BarButtonItem与titleView 的间距

    [self.navigationItem setRightBarButtonItem:rightItem animated:YES]; III、 控制器的跳转和回退细节处理 3.1 UIActionSheet 打开相册的处理:通常是等didDismissWithButtonIndex 之后才进行控制器跳转 - (void)actionSheet:(UIActionSheet *)actionSheet didDismissWithButtonIndex

    2.6K20发布于 2021-08-25
  • 来自专栏coding...

    iOS开发-RAC+MVVM练手项目 图床App写在前面准备工作界面设计首页历史关于后记

    @weakify(self); [copyBtn bk_addEventHandler:^(id sender) { @strongify(self); UIActionSheet *sheet = [UIActionSheet bk_actionSheetWithTitle:@"请选择需要复制的样式"]; [sheet bk_addButtonWithTitle @weakify(self); [copyBtn bk_addEventHandler:^(id sender) { @strongify(self); UIActionSheet *sheet = [UIActionSheet bk_actionSheetWithTitle:@"请选择需要复制的样式"]; [sheet bk_addButtonWithTitle

    1.2K20发布于 2018-08-23
  • 来自专栏落影的专栏

    iOS开发笔记(二)

    如果对应的ViewController也实现了- (void)actionSheet:(UIActionSheet *)actionSheet didDismissWithButtonIndex:(NSInteger

    1.2K70发布于 2018-04-27
  • 来自专栏月亮与二进制

    iOS判断系统版本号的四种方法

    比如说 UIAlertController 这个类,是iOS 8之后才出现的,用来取代 UIAlertView 和 UIActionsheet 的,如果当前系统没有这个类,说明是低于iOS 8的,可以这么判断

    4.8K20发布于 2021-11-23
  • 来自专栏Guangdong Qi

    iOS开发常用之 HUD 弹窗

    GSAlert.swfit - 苹果在iOS8推出了全新的UIAlertController,旧的UIAlertView和UIActionSheet渐渐被废弃,但如果你仍然支持iOS7系统,你将不得不写两套代码

    5.2K20发布于 2018-12-18
  • 来自专栏全栈程序员必看

    它们的定义UIAlertView

    NSLog(@"点击了firstbutton"); }]; //............下面相似 } @效果:(是不是认为有的时候也能取代UIActionSheet

    1.1K30编辑于 2022-07-06
领券