码迷,mamicode.com
首页 >  
搜索关键字:groups @interface    ( 15105个结果
(转载)OC语法总结
1、定义类:@interface 类名 : 父类@end2、使用:(冒号)表示继承一个类Student : NSObject3、使用()定义一个Catagory(类别)* 作用:在不改变原有类结构的基础上,扩展原有类的方法(不能扩展属性),但不建议重载原有类的方法* 开发工具默认生成的文件为:类名+...
分类:其他好文   时间:2014-07-12 13:08:12    阅读次数:178
effective c++ 条款18 make interface easy to use correctly and hard to use incorrectly
举一个容易犯错的例子class Date{private: int month; int day; int year;public:Date(int month,int day,int year){ this->month = month; ... }}//wrong exampleDa...
分类:编程语言   时间:2014-07-12 00:13:54    阅读次数:235
iOS开发项目篇—12搜索框的封装
iOS开发项目篇—12搜索框的封装一、在“发现”导航栏中添加搜索框1.实现代码 1 #import "YYDiscoverViewController.h" 2 3 @interface YYDiscoverViewController () 4 5 @end 6 7 @implementat...
分类:移动开发   时间:2014-07-11 21:52:57    阅读次数:429
iOS开发项目篇—13标题栏设置
iOS开发项目篇—13标题栏设置一、添加标题栏代码: 1 #import "YYHomeTableViewController.h" 2 #import "YYOneViewController.h" 3 4 @interface YYHomeTableViewController () 5 6.....
分类:移动开发   时间:2014-07-11 21:03:29    阅读次数:242
Mvc Linq 分页 参考PagedList
第一次写博客 写的不好各位大神多多包涵。 我的分页主要是针对Linq 分页来写的,针对IEnumerable 和 IQueryable 类型数据分页。 开始上代码 创建接口:public interface IPagedList { /// /// 总记录...
分类:Web程序   时间:2014-07-11 20:35:49    阅读次数:282
JNDI 是什么
JNDI是 Java 命名与文件夹接口(Java Naming and Directory Interface),在J2EE规范中是重要的规范之中的一个,不少专家觉得,没有透彻理解JNDI的意义和作用,就没有真正掌握J2EE特别是EJB的知识。那么,JNDI究竟起什么作用?要了解JNDI的作用,我们...
分类:其他好文   时间:2014-07-11 20:23:17    阅读次数:213
工厂方法模式(2)
定义:定义一个用于创建对象的接口,让子类决定实例化哪一个类,工厂方法使一个类的实例化延迟到其子类。类型:创建类模式类图:工厂方法模式代码interface IProduct { public void productMethod();}class Product implements IProduc...
分类:其他好文   时间:2014-07-11 19:57:51    阅读次数:183
LeetCode ---Anagrams() 详解
Notice:Given an array of strings, return all groups of strings that are anagrams.Note: All inputs will be in lower-case.For example:Input: ["tea","an....
分类:其他好文   时间:2014-07-10 14:44:00    阅读次数:179
iOS开发OC基础:延展Extension
//延展Extension,是为类扩充私有的方法,以及私有的实例变量,和分类Category相比,延展定义的方法是私有的,而且还可以定义实例变量(私有的)。//@interface开头+类名(哪一个类的延展)+小括号,小括号内填写的是延展名,一般情况下都省略。@end结束(写在.m文件里)main函..
分类:移动开发   时间:2014-07-09 09:00:12    阅读次数:227
iOS开发OC基础:OC中的分类(类目)
//分类,category,(类目)//为没有源代码的类添加方法//一定要注意,只能添加方法,不能添加实例变量/***分类类的定义也是分为接口部分和实现部分接口部分:以@interface开头+类名后跟小括号,小括号内填写的是分类名@end结束在@interface与@end之间添加方法。*///分类为原类..
分类:移动开发   时间:2014-07-09 08:47:36    阅读次数:240
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!