
IOS 开发
Jlins
不知不觉已经工作6年了.
展开
-
ios 判断是qq,银行卡,手机号等等公用的方法。
#import typedef enum { IdentifierTypeKnown = 0, IdentifierTypeZipCode, //1 IdentifierTypeEmail, //2 IdentifierTypePhone, //3 IdentifierTypeUnicomPhone, //4 Id转载 2013-03-04 19:09:22 · 5366 阅读 · 0 评论 -
iOS开发那些事-iOS常用设计模式–委托模式
对于iOS开发,举例Cocoa框架下的几个设计模式为大家分析。当然,Cocoa框架下关于设计模式的内容远远不止这些,我们选择了常用的几种:单例模式、委托模式、观察者模式、MVC模式。 委托模式委托模式从GoF 设计装饰(Decorator)、适配器(Adapter)和模板方法(Template Method)等模式演变而来。几乎每一个应用都会或多或少地使用到委托模式。不只是CocoaTouch框架转载 2013-02-22 21:25:48 · 1554 阅读 · 0 评论 -
自定义UITableViewCell
自定义UITableViewCell1 @interface CustomCell : UITableViewCell 2 3 @property (nonatomic, retain) IBOutlet UIImageView *tripPhoto; 4 @property (nonatomic, retain) IBOutlet UILabel *tripName; 5 6 @end 1转载 2013-02-22 21:28:48 · 914 阅读 · 0 评论 -
关于性能优化–选择nib还是故事板的讨论
故事板是苹果在iOS5之后推出的技术,本意是集成多个nib文件于一个故事板文件,管理起来方便,故事板还能反应控制器之间的导航关系,很多导航是需要连连线就可以了,不需写代码,使用起来很方便。但是我告诫读者,从内存占用角度看故事板不是一个好的技术。为了比较我们使用Xcode中的Master-Detail模板分别创建,基于故事板的应用StoryboardDemo和基于nib的应用 NibDemo。然后通转载 2013-02-22 21:30:26 · 1170 阅读 · 0 评论 -
iOS开发_统计xcode代码行数
如果要统计ios开发代码,包括头文件的,终端命令进入项目目录下,命令如下find . -name "*.m" -or -name "*.h" -or -name "*.xib" -or -name "*.c" |xargs wc -l 列出每个文件的行数 find . -name "*.m" -or -name "*.h" -or -name "*.xib" -or -name "*.c" |x转载 2013-02-22 21:29:33 · 1067 阅读 · 0 评论 -
面试题分享【不断更新】
问题1:求以下程序段的输出int test(int x, int y) { x = x + y; return x * y; } int main(int argc, const char * argv[]) { @autoreleasepool { int x = 3, y = 10, z = test(x, y);转载 2013-02-22 21:27:06 · 1091 阅读 · 0 评论 -
IOS 将图片转换为圆角图
UIImage+wiRoundedRectImage.h#import @interface UIImage (wiRoundedRectImage) + (id)createRoundedRectImage:(UIImage*)image size:(CGSize)size radius:(NSInteger)r; @end UIImage+wiRoundedRectImage.m#im转载 2013-02-22 21:27:55 · 2480 阅读 · 1 评论