1.导入框架Security.framework2.编写工具类/* 该工具类只能保存一个用户和密码 *//* service 一般为 bundle ID */@interface GLKeyChainManage : NSObject+(void)save:(NSString *)service.....
分类:
其他好文 时间:
2015-08-09 20:19:56
阅读次数:
96
#import @interface RYSingleExample : NSObject +(instancetype)singleExample; @end#import "RYSingleExample.h" static id _single; @implementation RYS...
分类:
移动开发 时间:
2015-08-08 19:43:40
阅读次数:
121
原文: http://blog.csdn.net/ganlijianstyle/article/details/79244461.在@interface :NSObject{} 的括号中,当然NSObject 是指一个父类,可以是其他的。形式如下:@interfaceGCTurnBasedMatch...
分类:
移动开发 时间:
2015-08-07 18:33:10
阅读次数:
148
reference from :http://mobile.51cto.com/hot-434804.htm1.构建Person类Person.h@interface Person : NSObject@property (nonatomic, copy) NSString *name;@prope...
分类:
编程语言 时间:
2015-08-07 01:49:32
阅读次数:
186
------------- CZQuestion.h -------------#import @interface CZQuestion : NSObject@property (nonatomic, copy) NSString *answer;@property (nonatomic, cop...
分类:
其他好文 时间:
2015-08-06 20:23:40
阅读次数:
115
什么是GCDGCD是苹果对多线程编程做的一套新的抽象基于C语言层的API,结合Block简化了多线程的操作,使得我们对线程操作能够更加的安全高效。在GCD出现之前Cocoa框架提供了NSObject类的performSelectorInBackground:withObjectperformSele...
分类:
移动开发 时间:
2015-08-06 20:01:29
阅读次数:
142
判断 iPhone 是否插入了 SIM 卡,可以参考苹果官网的 systemconfigure framework 教程,将下面的代码复制到头文件 #import?<Foundation/Foundation.h>
@interface?NSObjectiveCPlusPLus?:?NSObject
extern?...
分类:
其他好文 时间:
2015-08-06 15:19:28
阅读次数:
97
Foundation框架一、Foundation课程安排1.NSObject、NSString、NSMutableString2.NSNumber、NSValue、NSDate、NSArray NSMutableArray3.NSArray的遍历、NSArray的新语法(IOS6)、NSArray ...
分类:
其他好文 时间:
2015-08-06 01:59:09
阅读次数:
106
//
// Person.h
// 手动内存管理
//
// Created by admin on 15/8/5.
// Copyright (c) 2015年 admin. All rights reserved.
//
#import
#import "Car.h"
@interface Person : NSObject
/*
@property 参数...
分类:
移动开发 时间:
2015-08-05 22:13:11
阅读次数:
142
单例是ios开发中常用的一种设计模式,通常用来控制器之间传值。方便、高效,全局通用。单例模式的设计分为ARC和MRC。ARC:方式一1、创建一个继承自NSObject的类。2、在这个类的.h文件中声明类方法:+ (instancetype)sharedInstance;2、在这个类的.m文件中实现以...
分类:
移动开发 时间:
2015-08-05 14:41:03
阅读次数:
135