Once again, in this series of posts I look at the parts of the .NET Framework that may seem trivial, but can help improve your code by making it easie...
分类:
Web程序 时间:
2014-07-16 23:25:24
阅读次数:
601
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace OfTypeDemo{ class Program { static void Main(...
分类:
其他好文 时间:
2014-07-14 08:51:20
阅读次数:
175
1,仅加载图片,图像数据不会缓存。NSString *path = [[NSBundle mainBundle] pathForResource:@”icon” ofType:@”png”]; UIImage *image = [UIImage imageWithContentsOfFile:pa....
分类:
其他好文 时间:
2014-06-28 11:43:47
阅读次数:
177
NSData *gifFile = [NSData dataWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"text" ofType:@"gif"]]; _mywebview.scalesPageToFit = YES;...
分类:
Web程序 时间:
2014-06-20 16:16:58
阅读次数:
226
除了不能继承enum之外,可将其看做一个常规类。甚至可以有main方法。
注意:必须先定义enum实例,实例的最后有一个分号。
下面是一个例子:返回对实例自身的描述,而非默认的toString返回枚举实例的名字。
public enum Color {
RED("红色", 1), GREEN("绿色", 2), BLANK("白色", 3), YELLO("黄色", 4);...
分类:
编程语言 时间:
2014-06-17 16:18:31
阅读次数:
482
1、背景音乐播放 循环播放长音乐 支持mp3格式#import ; 1 NSString
*musicFilePath = [[NSBundle mainBundle] pathForResource:@"changan"
ofType:@"mp3"]; //创建音乐文件路径 2 NSURL *m....
分类:
移动开发 时间:
2014-06-10 21:24:46
阅读次数:
251
首先在工程中加入XXX plist 配置文件。 然后在key 输入名字比如allsdk value
里填写.a 文件的名字NSString *plistPath = [[NSBundle mainBundle]pathForResource:@"Pc_sdk"
ofType:@"plist"]; ....
分类:
移动开发 时间:
2014-06-10 20:05:01
阅读次数:
238
NSString *path = [[NSBundlemainBundle]
pathForResource:@"tmp_add"ofType:@"txt"]; NSString *aStr =
[NSStringstringWithContentsOfFile:path encoding:N...
分类:
移动开发 时间:
2014-05-26 08:15:58
阅读次数:
258
1.加载JSON文件a.JSON文件的路径NSString *path = [[NSBundle
mainBundle] pathForResource:@"XXXX.json" ofType:nil];b.加载JSON文件 获取Data数据NSData
*data = [NSData dataWi...
分类:
Web程序 时间:
2014-05-12 09:20:20
阅读次数:
284
-(void)createImages
{
// Load the alpha image, which is just the same Ship.png image used in the clipping demo
NSString *imagePath = [[NSBundle mainBundle] pathForResource:@"Ship.png" ofType:n...
分类:
移动开发 时间:
2014-05-08 16:17:52
阅读次数:
401