上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 16 下一页
摘要: //// ViewController.m// 蓝牙//// Created by 谢泽锋 on 15/11/2.// Copyright (c) 2015年 xiezefeng. All rights reserved.//#import "ViewController.h"#import @in... 阅读全文
posted @ 2015-11-21 17:50 谢小锋 阅读(167) 评论(0) 推荐(0)
摘要: -(NSMutableAttributedString*)string:(NSString*)allString:(NSString*)unit{ NSMutableAttributedString* string=[[NSMutableAttributedString alloc]initWit... 阅读全文
posted @ 2015-10-12 14:23 谢小锋 阅读(154) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2015-09-14 16:17 谢小锋 阅读(481) 评论(0) 推荐(0)
摘要: 栈区的存放局部变了 由系统管理出{}后内存会被系统回收 堆区 存放对象 动态分布 不会随便被回收 需要手动释放所以oc对象有自己的引用计数器是一个整数 占有4个字节存储空间当减为0时别回收 java 是垃圾回收机制 没用既回收 当alloc new copy 创建 对象时 新对象引用计数就是1 给对 阅读全文
posted @ 2015-08-27 10:29 谢小锋 阅读(144) 评论(0) 推荐(0)
摘要: UIStoryboard *s = [UIStoryboard storyboardWithName:storyboard的名字 bundle:nil]; id viewController(所属的视图控制器) = [s instantiateViewControllerWithIdentifier 阅读全文
posted @ 2015-07-14 11:11 谢小锋 阅读(216) 评论(0) 推荐(0)
摘要: #import <Foundation/Foundation.h>@interface user : NSObject<NSCoding>@property(nonatomic,copy)NSString* name;@property(nonatomic,copy)NSString* age;@e 阅读全文
posted @ 2015-07-13 10:51 谢小锋 阅读(177) 评论(0) 推荐(0)
摘要: const,只读的全局变量,其值不可修改.static,规定此全局变量只在当前模块(文件)中可见.static const,既是只读的,又是只在当前模块中可见的. int a=12; const int * p; 阅读全文
posted @ 2015-07-09 10:13 谢小锋 阅读(157) 评论(0) 推荐(0)
摘要: #import "ViewController.h"#import #import #import "CustomView.h"#define width self.view.frame.size.width//#define height self.view.frame.size.height@i... 阅读全文
posted @ 2015-07-08 15:52 谢小锋 阅读(181) 评论(0) 推荐(0)
摘要: 是启动页停留一段时间 只需要在 AppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {// Override 阅读全文
posted @ 2015-07-07 15:33 谢小锋 阅读(565) 评论(0) 推荐(0)
摘要: OC中protocol、category和继承的区别以前还是有点迷糊,面试的时候说的有点混乱,现在结合一些资料总结一下。利用继承,多态是一个很好的保持“对扩展开放、对更改封闭”(OCP)的办法,也是最常见的一种方法。Objective C还支持另外两种语法来支持OCP:Protocol和Catego... 阅读全文
posted @ 2015-07-05 08:45 谢小锋 阅读(902) 评论(0) 推荐(0)
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 16 下一页