Magic Studio

专心做有逼格的APP!

2013年7月5日 #

ios5 中文键盘高度变高覆盖现有ui问题的解决方案(获取键盘高度的方法)

摘要: 背景: ios5之前,iphone上的键盘的高度是固定为216.0px高的,中文汉字的选择框是悬浮的,所以不少应用都将此高度来标注键盘的高度(包括米聊也是这么做的)。 可是在ios5中,键盘布局变了,尤其是中文输入时,中文汉字选择框就固定在键盘上方,这样就使得原本与键盘紧密贴合的界面视图被中文汉字选择框给覆盖住了。一方面影响了界面的美观,另一方面,如果被覆盖的部分就是文本输入框的话,用户就无法看到输入的内容了。因此这个问题就必须得解决了。解决方法: 其实在一开始使用216.0px这个固定值来标注键盘的高度就是错误的。因为在ios3.2以后的系统中,苹果就提供了键盘使用的api以及demo... 阅读全文

posted @ 2013-07-05 17:01 Mr 布鲁斯 阅读(372) 评论(0) 推荐(0) 编辑

NS_ENUM & NS_OPTIONS

摘要: When everything is an object, nothing is.So, there are a few ways you could parse that, but for the purposes of this article, this is all to say: sometimes it's nice to be able to drop down to the C layer of things.Yes--that non-objective part of our favorite Smalltalk-inspired hybrid language, 阅读全文

posted @ 2013-07-05 17:00 Mr 布鲁斯 阅读(475) 评论(0) 推荐(0) 编辑

NSInvocation Basics

摘要: In this article I'm going to cover the basics and usages of NSInvocation.What is NSInvocation?Apple Developer Reference describes NSInvocation this way:An NSInvocation is an Objective-C message rendered static, that is, it is an action turned into an object. NSInvocation objects are used to stor 阅读全文

posted @ 2013-07-05 11:11 Mr 布鲁斯 阅读(351) 评论(0) 推荐(0) 编辑

导航