当前位置:  编程技术>移动开发
本页文章导读:
    ▪怎么搞30等角视图.斜45度说法不合理        如何搞30等角视图.斜45度说法不合理     定理:   现在有向量 u = (ux, uy); v = (vx, vy),则称 S = (u(T), v(T))为其坐标系矩阵。 坐标系矩阵的作用如下:   标准正交坐标系{(1,0)(T), (0, 1)(T)}下的(x, y) ,S坐.........
    ▪ id foo1, NSObject *foo2跟id<NSObject> foo3区别        id foo1, NSObject *foo2和id<NSObject> foo3区别   id foo1; NSObject *foo2; id<NSObject> foo3;     The first one is the most common.It simply declares a pointer to some Objective-C object (see /usr/include/objc/objc.h). id gives the.........
    ▪ EditText 输入法有关问题(setContentView切换两个view,抢焦点有关问题)       EditText 输入法问题(setContentView切换两个view,抢焦点问题) 在用setContentView来切换两个已经创建好的view时(它们里面有EditText),会有一个EditText无法获取输入法输入事件,而老是会输入到第一个获.........

[1]怎么搞30等角视图.斜45度说法不合理
    来源: 互联网  发布时间: 2014-02-18
如何搞30等角视图.斜45度说法不合理

 

 

定理:

  现在有向量 u = (ux, uy); v = (vx, vy),则称 S = (u(T), v(T))为其坐标系矩阵。

坐标系矩阵的作用如下:

  标准正交坐标系{(1,0)(T), (0, 1)(T)}下的(x, y) ,S坐标系下的(xs, ys),有

(x, y ) = (xs, ys)S;

 

  这是最基本的公式.

 

由此可得,所有坐标转换,在3D空间中也是如此.

参考:

http://blog.csdn.net/ityuany/article/details/4481631

http://www.webgamei.com/club/thread-4987-1-1.html



 


    
[2] id foo1, NSObject *foo2跟id<NSObject> foo3区别
    来源: 互联网  发布时间: 2014-02-18
id foo1, NSObject *foo2和id<NSObject> foo3区别

 

id foo1;
NSObject *foo2;
id<NSObject> foo3;

 

 

  • The first one is the most common.It simply declares a pointer to some Objective-C object (see /usr/include/objc/objc.h). id gives the compiler no information about the actual type of the object, so the compiler cannot do compile-time type checking for you.


 

  •  

Just because we know that an id is an Objective-C object does not mean that it points to an object that derives from NSObject, or that it even has common methods like retain and release.

One solution is to statically type our variable using NSObject* as shown in number 2 above.

This gives the compiler information about the class of the object pointed to by foo2 so the compiler can warn if you send a message to foo2 that an NSObject doesn't respond to. This means you can safely call retain, release, description, etc., but the compiler will warn if you call length or count or anything that an NSObject doesn't respond to.



 

  • Declaring an object as id<NSObject> tells the compiler that you don't care what type the object is, but you do care that it conforms to the specified NSObject protocol**.

    ** the protocol (@protocol) named NSObject. There is also a class named NSObject that does indeed conform to the NSObject protocol, but they are two different thing

    The compiler will ensure that all objects you assign to that pointer conform to the required protocol.

    A pointer typed like this can safely hold any NSObject (because NSObject conforms to theNSObject protocol), but it could also hold any NSProxy, because NSProxy also conforms to the NSObject protocol.

    In english, the declaration id<NSObject> foo3; says "foo3 is a pointer to an object of any type that behaves like an NSObject".

    This is very powerful, convenient, and expressive. In reality, we often don't care what type an object is, we just care that it responds to the messages that we want to send it (e.g., retain, release).


    
[3] EditText 输入法有关问题(setContentView切换两个view,抢焦点有关问题)
    来源: 互联网  发布时间: 2014-02-18
EditText 输入法问题(setContentView切换两个view,抢焦点问题)

在用setContentView来切换两个已经创建好的view时(它们里面有EditText),会有一个EditText无法获取输入法输入事件,而老是会输入到第一个获取了焦点的EditText中。

不论是使用n种获取焦点的办法,还是使用输入法管理器将输入法强制弹出,一样无法输入内容。

最后,试验出一种终极方法。将view中的 EditText remove,然后再添加进来,这时就可以正常的输入。


    
最新技术文章:
▪Android开发之登录验证实例教程
▪Android开发之注册登录方法示例
▪Android获取手机SIM卡运营商信息的方法
▪Android实现将已发送的短信写入短信数据库的...
▪Android发送短信功能代码
▪Android根据电话号码获得联系人头像实例代码
▪Android中GPS定位的用法实例
▪Android实现退出时关闭所有Activity的方法
▪Android实现文件的分割和组装
▪Android录音应用实例教程
▪Android双击返回键退出程序的实现方法
▪Android实现侦听电池状态显示、电量及充电动...
▪Android获取当前已连接的wifi信号强度的方法
▪Android实现动态显示或隐藏密码输入框的内容
▪根据USER-AGENT判断手机类型并跳转到相应的app...
▪Android Touch事件分发过程详解
▪Android中实现为TextView添加多个可点击的文本
▪Android程序设计之AIDL实例详解
▪Android显式启动与隐式启动Activity的区别介绍
▪Android按钮单击事件的四种常用写法总结
▪Android消息处理机制Looper和Handler详解
▪Android实现Back功能代码片段总结
▪Android根据电话号码获得联系人头像实例代码 iis7站长之家
▪Android实现弹出键盘的方法
▪Android中通过view方式获取当前Activity的屏幕截...
▪Android提高之自定义Menu(TabMenu)实现方法
▪Android提高之多方向抽屉实现方法
▪Android提高之MediaPlayer播放网络音频的实现方法...
▪Android提高之MediaPlayer播放网络视频的实现方法...
▪Android提高之手游转电视游戏的模拟操控
 


站内导航:


特别声明:169IT网站部分信息来自互联网,如果侵犯您的权利,请及时告知,本站将立即删除!

©2012-2021,,E-mail:www_#163.com(请将#改为@)

浙ICP备11055608号-3