`
dcj3sjt126com
  • 浏览: 1887689 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

Presenting action sheet clipped by its superview

    博客分类:
  • IOS
 
阅读更多

转自: http://dongxin1390008.blog.163.com/blog/static/3179247820129148363384/

 

Presenting action sheet clipped by its superview.Some controls might not respond to touches.On iPhone try-[UIActionSheet showFromTabBar:]or-[UIActionSheet showFromToolbar:] instead of -[UIActionSheet showInView:].

今天学UIActionSheet的时候,调试的时候,突然显示这个警告,在stackoverflow上找到这个答案:http://stackoverflow.com/questions/4447563/last-button-of-actionsheet-does-not-get-clicked

 
在模拟器里面测试的时候,发现最下面一个按钮点击的时候,不是很好点击了,而且也出现了一大堆警告,这个博客上写出了答案:http://dale.leepood.com/2012/04/
 
我的代码是这样写的:

 

UIBarButtonItem*setStyleButton=[[UIBarButtonItemalloc]initWithTitle:@"Style" 


                                                                     style:UIBarButtonItemStyleBorderedtarget:self 


                                                                    action:@selector(setNavigationControllerStyle:)];

 

-(void)setNavigationControllerStyle:(id)sender


{


  //more code

    //[styleAlert showInView:self.view];


    [styleAlert showInView:[UIApplicationsharedApplication].keyWindow];

[styleAlert release];


}

将代码:[styleAlert showInView:self.view]; 改为:[styleAlert showInView:[UIApplicationsharedApplication].keyWindow];即可
分享到:
评论

相关推荐

    ios应用源码之分享action sheet 2018127

    Action Sheet需要有一个presenting view controller,通常是当前显示的VC。 ```swift self.present(alertController, animated: true, completion: nil) ``` 4. **自定义Action Sheet** 除了基本的添加动作,...

    Writing and presenting in English_The Rosetta Stone of Science

    ### 《Writing and Presenting in English:The Rosetta Stone of Science》相关知识点解析 #### 一、书籍概览 《Writing and Presenting in English:The Rosetta Stone of Science》是一本旨在帮助科研工作者...

    Groovy in action

    The result is the true definitive guide to the new Groovy language., Groovy in Action introduces Groovy by example, presenting lots of reusable code while explaining the underlying concepts....

    Pi : a sourcebook on the recent history of Pi and its computation Book Cover

    Each contribution is preceded by a brief summary of its content as well as a short key word list indicating how the content relates to others in the collection. The volume includes articles on actual...

    演示制胜 讲故事的艺术 Presenting to Win

    《演示制胜——讲故事的艺术》(Presenting to Win)是由世界顶级演示顾问杰里·韦斯曼(Jerry Weissman)撰写的一本书,该书主要介绍了如何通过有效的演示技巧来吸引并说服听众的方法。书中强调了演示不仅仅是展示...

    R in Action(Manning,2ed,2015)

    R in Action, Second Edition presents both the R language and the examples that make it so useful for business developers. Focusing on practical solutions, the book offers a crash course in statistics ...

    Congenital Dyserythropoietic Anaemia (Type II) Presenting

    Congenital Dyserythropoietic Anaemia (Type II) Presenting with Haemosiderosis

    Presenting to Win_The Art of Telling Your Story

    本书由FT金融时报出版发行,作者号称世界第一的Presentation顾问,随便翻几页你就会感觉到他不同一般的说服力。 一开始从原理入手,告诉读者Presentation的重要性,以及要想做好Presentation的基本原理。...

    Presenting_Java_Beans.rar_java

    在“Presenting Java Beans”这个主题中,我们深入探讨Java Beans的各个方面,包括其设计理念、基本原理以及如何在实际开发中有效地使用它们。 Java Beans的核心特性包括属性、事件和方法。属性代表组件的状态,...

    Java Reflection in Action

    Java Reflection in Action is unique in presenting a clear account of all the cool things you can do with reflection, and at the same time pro- viding the sound conceptual basis that developers need to...

    R in Action - Robert Kabacoff

    R in Action is a language tutorial focused on practical problems. It presents useful statistics examples and includes elegant methods for handling messy, incomplete, and non-normal data that are ...

    Financial Times Prentice Hall - Presenting To Win The Art Of Telling Your Story

    it's very useful for who study presenting.

    《展现 C#》(Presenting C#)

    欢迎阅读《展现 C#》(Presenting C#)。这本书是你提高企业编程语言的一条捷径。这种企业编程语言带有下一代编 程语言服务运行时(NGWS Runtime):C#(发音"C sharp")。 NGWS Runtime 是一个不仅管理执行代码、同时也...

    presenting.vim:一个基于文本文件在vim中显示幻灯片的简单工具

    presenting.vim presenting.vim是一个vim插件,可以将您的标记转换为可显示的幻灯片(在vim中)。 这是一个克隆这是一个克隆 。 与它的前任相比,presenting.vim: 支持常见的标记语言, 可以扩展,并且 有记录 ...

    Biostatistics by Example Using SAS Studio

    SAS University Edition and its user interface, SAS Studio, have become very popular. SAS Studio can also be used with standard versions of SAS, perhaps as an alternative to SAS Enterprise Guide. SAS ...

    Swarm Intelligence Volume 3: Applications by Ying Tan

    This complete and timely collection fills this gap by presenting the latest research systematically and thoroughly to provide readers with a full view of the field of swarm. Students will learn the ...

    Presenting Java Beans (Sams).pdf

    根据给定文件的信息,我们可以提炼出关于JavaBeans的...综上所述,《Presenting JavaBeans》这本书全面覆盖了JavaBeans的技术细节和应用场景,无论是初学者还是有经验的开发者,都可以从中获得有价值的见解和实践经验。

Global site tag (gtag.js) - Google Analytics