IOS开发问题解决之UIAlertView调用UIActionSheet后灰色背景一直存在

[+]

问题描述

今天开发IOS时碰到了一个问题,就是在UIAlertView的delegate方法里初始化一个UIActionSheet,并显示后,在选择了按钮的操作以后,会有灰色背景一直存在,挡住了整个页面,使得页面无法交互。

解决方法

在alertView:clickedButtonAtIndex:这个委托方法里,使用下面代码调用显示UIActionSheet:

[cpp]  view plain copy
  1. [self performSelector:@selector(showActionSheet) withObject:nil afterDelay:0.0];  
showActionSheet就是自定义的一个函数,里面写上调用UIActionSheet的初始化和显示方法,问题解决。

问题总结

对于这个问题产生的原因,我不是很清楚。应该算是一个IOS系统中bug。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Title: iOS 8 Programming with Swift, 2nd Edition Author: Kevin Lyn. Length: 100 pages Edition: 2 Language: English Publication Date: 2015-04-24 ISBN-10: B00WO7FVDS Book Download iOS 8 Programming with Swift: A Step By Step Guide Book for Beginners. Create Your Own App in One Day! Recently, Apple Inc released iOS 8 into the market. This followed a release of the Swift programming language for the purpose of creating apps to run on devices supporting this version of iOS. This language has shown a number of improvements in terms of functionality compared to the Objective-C programming language. iOS 8 has shown improved support for amazing features which were not supported in iOS 7. This explains the need for the creation of iOS 8 apps, and therefore the need to learn Swift. Here is a preview of what you'll learn: Getting Started with Swift Variables and Constants Type Annotations Using Objective-C Classes Animations Creating an Audio Player and so on… Table of Contents Chapter 1: Definition Chapter 2: Getting Started with iOS 8 Swift Programming Chapter 3: Variables and Constants in Swift Chapter 4: Type Annotations Chapter 5: Tuples in Swift Chapter 6: Enumerations in Swift Chapter 7: UIAlertView in Swift Chapter 8: NSTimer in Swift Chapter 9: Swift and PHP Chapter 10: Connecting to iTunes Search API Chapter 11: Image Loading and Caching Asynchronously Chapter 12: Using Objective-C classes in Swift Chapter 13: Animations in Swift Chapter 14: Creating an Audio Player with Swift

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值