数据库的使用,和单例的使用MainViewController.m#import"MainViewController.h"
#import"DataBaseHandler.h"
@interfaceMainViewController()
@end
@implementationMainViewController
-(id)initWithNibName:(NSString*)nibNameOrNilbundle:(NSBundle*)nibBundleOrNil
{
self=[..
分类:
数据库 时间:
2014-09-22 19:50:33
阅读次数:
236
我事先放了一堆svg文件,但是我是批量使用的,想要直接遍历他们加入到一个list中来,那我直接就遍历他们的名称,把他们的名字组成一个array。 var ss:NSString = NSBundle.mainBundle().resourcePath!//6.0.1修改了要求感叹号 ...
分类:
移动开发 时间:
2014-09-20 14:00:47
阅读次数:
135
NSLog(@"%@", NSHomeDirectory());//沙盒主目录
NSLog(@"%@", NSTemporaryDirectory());//沙盒中tmp文件夹的路径
NSLog(@"%@", [[NSBundle mainBundle] bundlePath]);//沙盒中*.app包的路径
NSLog(@"%@", [NSSearchPathForDir...
分类:
移动开发 时间:
2014-09-19 21:13:26
阅读次数:
226
保存一下iOS 读取Json的代码,留着以后Copy用,哈哈。 NSString* path = [[NSBundle mainBundle] pathForResource: @"Sandwiches" ...
分类:
移动开发 时间:
2014-09-19 17:28:25
阅读次数:
190
NSBundle.mainBundle().infoDictionaryiOS 8中带按钮的推送代码 1 if ( UIDevice.currentDevice().systemVersion.hasPrefix("7") ){ 2 3 applic...
分类:
移动开发 时间:
2014-09-19 15:27:45
阅读次数:
185
#import"MainViewController.h"
#import"Student.h"
@interfaceMainViewController()
@end
@implementationMainViewController
-(id)initWithNibName:(NSString*)nibNameOrNilbundle:(NSBundle*)nibBundleOrNil
{
self=[superinitWithNibName:nibNameOrNilbundle:nibBundleOrN..
分类:
其他好文 时间:
2014-09-16 02:50:00
阅读次数:
181
图片、xib等资源文件无法直接封入静态库,要想在静态库中使用他们,就必须借助于bundle 那么什么是bundle呢? 简单来说,bundle就是一个内部结构按照标准规则组织的特殊目录,即directory 要知道,iOS的应用都是通过bundle进行封装的,对应的bundle类型...
分类:
其他好文 时间:
2014-09-14 22:02:07
阅读次数:
229
解析:
就是按照一种约定好的格式(假象),由后台开发人员按照格式存数据,由前端开发人员按照格式取数据.(谨记:这种格式是由后台开发人员决定的,我们无权决定)
解析的本质:按照约定好的格式,取出我们想要的数据的过程.
JSON解析系统
1.先获取文件路径
NSString *jsonPath = [[NSBundle
mainBundle]...
分类:
Web程序 时间:
2014-09-14 10:10:07
阅读次数:
186
//数据持久化的本质:将数据读取成文件保存在本地. 沙盒机制就是系统针对于每一个程序在本地生成的文件夹(名字随机生成), 对于不同的应用程序, 不能访问其他应用程序沙盒内的内容, 对于该应用程序内容起到保护作用:1 Documents:用来存储长久保存的数据 2 xxx.app:应用程序的包, 包含应用程序加载所需的所有资源(readonly只读, 不可修改), 平时使用的NSBundle就是该包...
分类:
移动开发 时间:
2014-09-13 13:23:25
阅读次数:
325
首先,创建一个UIView对象有两种方法:IB方式和编码方式。1、IB(Interface Builder)方式:即从nib文件中加载视图,此时会调用该view对象的initWithCoder方法,接着调用awakeFromNib方法CMButton *button = [[[NSBundle .....
分类:
其他好文 时间:
2014-09-12 19:05:13
阅读次数:
233