上一页 1 ··· 48 49 50 51 52 53 54 55 56 ··· 69 下一页
摘要: 1.字典转模型的过程最好封装在模型内部 2.模型应该提供一个可以传入字典参数的构造方法 - (instancetype)initWithDict:(NSDictionary *)dict;+ (instancetype)xxxWithDict:(NSDictionary *)dict; 阅读全文
posted @ 2016-12-03 21:32 iFat 阅读(148) 评论(0) 推荐(0) 编辑
摘要: 1.使用Objective-C开发iOS程序时,最好在每个类名前面加一个前缀,用来标识这个类的“老家”在哪 2.目的是防止N个人开发了一样的类,冲突了 比如Jake Will、Kate Room在同一个项目中都各自开发了个Button类,这样的程序是不能运行起来的 解决方案:Jake Will的类名 阅读全文
posted @ 2016-12-03 21:06 iFat 阅读(327) 评论(0) 推荐(0) 编辑
摘要: [1]透明 [2]旋转 [3]缩放 [4]位移 阅读全文
posted @ 2016-12-03 19:04 iFat 阅读(331) 评论(0) 推荐(0) 编辑
摘要: public class MainActivity extends Activity { //[0]声明AutoCompleteTextView要显示的数据 private static final String[] COUNTRIES = new String[] { "laofang", "laozhang", "laoli", "laobi"... 阅读全文
posted @ 2016-12-02 20:00 iFat 阅读(641) 评论(0) 推荐(0) 编辑
摘要: [1]添加菜单方式 通过一个布局 在res下 meun目录下创建一个布局 [2]动态的添加 [3]点击menu弹出一个对话框 如果你想实现自己定义的view 效果重写onMeunOpened方法 阅读全文
posted @ 2016-12-02 15:29 iFat 阅读(231) 评论(0) 推荐(0) 编辑
摘要: Fragment有一个公共的桥梁 Activity 阅读全文
posted @ 2016-12-01 21:45 iFat 阅读(2084) 评论(0) 推荐(0) 编辑
摘要: [1]使用Fragment必须重写onCreateView方法 [2]还可以重写一个ondestroy方法 做一些收尾的工作 阅读全文
posted @ 2016-11-29 19:50 iFat 阅读(210) 评论(0) 推荐(0) 编辑
摘要: 使用字典的坏处 一般情况下,设置数据和取出数据都使用“字符串类型的key”,编写这些key时,编辑器没有智能提示,需要手敲 dict[@"name"] = @"Jack"; NSString *name = dict[@"name"]; 手敲字符串key,key容易写错 Key如果写错了,编译器不会 阅读全文
posted @ 2016-11-25 21:49 iFat 阅读(271) 评论(0) 推荐(0) 编辑
摘要: [1]定义fragment继承V4包中的Fragment [2]定义的activity要继承v4包中的FragmentActivity [3]通过这个方法getSupportFragmentManager 获取Fragment的管理者 import android.os.Bundle; import 阅读全文
posted @ 2016-11-25 21:16 iFat 阅读(724) 评论(0) 推荐(0) 编辑
摘要: import android.os.Bundle; import android.app.Activity; import android.app.FragmentManager; import android.app.FragmentTransaction; import android.view.Menu; import android.view.View; import android.v... 阅读全文
posted @ 2016-11-25 21:06 iFat 阅读(780) 评论(0) 推荐(0) 编辑
上一页 1 ··· 48 49 50 51 52 53 54 55 56 ··· 69 下一页