var jsonFormatter = config.Formatters.OfType().First();jsonFormatter.SerializerSettings.ContractResolver = new CamelCasePropertyNamesContractResolver(...
分类:
Web程序 时间:
2015-03-06 18:35:01
阅读次数:
125
//加载gif 02 03 NSString *filePath = [[NSBundle mainBundle]pathForResource:@"bai3" ofType:@"gif"]; 04 05 NSData *data = [NSData da...
分类:
其他好文 时间:
2015-02-13 19:50:48
阅读次数:
187
---恢复内容开始---1. 读取文件 (本地 UTF-8编码的文本文件) NSString *filePath = [[NSBundle mainBundle] pathForResource:@"song" ofType:@"json"]; NSString *str =[NSString s....
分类:
移动开发 时间:
2015-02-07 18:47:21
阅读次数:
153
方法一:
用UIWebView就可以了
-(void)loadDocument:(NSString*)documentName inView:(UIWebView*)webView
{
NSString *path = [[NSBundle mainBundle] pathForResource:documentName ofType:nil];
NSURL *url =...
分类:
其他好文 时间:
2015-01-29 12:49:34
阅读次数:
226
方法一:利用webview
-(void)loadDocument:(NSString *)documentName inView:(UIWebView *)webView
{
NSString *path = [[NSBundle mainBundle] pathForResource:documentName ofType:nil];
N...
分类:
其他好文 时间:
2015-01-22 09:30:44
阅读次数:
182
这里用的是CIImage,同样可以转换成UIImage。内容比较简单,适合初学者。(自己忘记时看看,严禁商业转载)
//第一种,从应用程序包中(资源文件)加载图像
NSString * path = [[NSBundle
mainBundle] pathForResource:@"1"
ofType:@"png"];
NSURL * pathURL = [N...
分类:
其他好文 时间:
2015-01-21 10:19:57
阅读次数:
166
比如VB.NET的代码:For Each prop In entity.Details.Properties.All().
OfType(Of Microsoft.LightSwitch.Details.IEntityStorageProperty)()
If prop.Name <> "Id" Then
If Not Object.Eq...
初学iOS开发的同学,不管是自己写的,还是粘贴的代码,或多或少都写过下面的代码[[NSBundlemainBundle]pathForResource:@"someFileName"ofType:@"yourFileExtension"];[YourViewControllerinitWithNib...
分类:
移动开发 时间:
2015-01-12 17:36:39
阅读次数:
181
在我们项目中需要将一个NSData类型的数据进行base64编码为一个字符串进行传输。这里记录下编码和解码的方式
编码:
UIImage *image = [UIImage imageWithData:[NSData dataWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"di1" ofType:@"jpg...
分类:
移动开发 时间:
2015-01-06 15:36:06
阅读次数:
183
1.前提分页后每页32条数据,分四列绑定,每列8条数据 Repeater1.DataSource = ds.Tables[0].Rows.OfType().Take(8).CopyToDataTable(); Repeater1.DataB...
分类:
其他好文 时间:
2014-12-12 12:58:28
阅读次数:
140