博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
0920 JSON数据 蓝懿
阅读量:4465 次
发布时间:2019-06-08

本文共 775 字,大约阅读时间需要 2 分钟。

《JSon数据》

基本顺序

1,NSString *path=@“路径”;

2,NSData *pathdata=[nsdata datawithcontentsoffile:path];

如果存入的是字典

3,NSDicitonary *dic=[NSJsonserialization JSONobjectwithData:pathdata];

 

《网络路径使用》

NSString *str=@http:\/\/www.1905.com\/vod\/play\/838297.shtml”;

UIImageview *iv=[uiimageview alloc]initwith….;

NSData *data=[NSData datawithcontentofURL:[NSURL URLwithstring:str];

iv.imageview.image=[uiimage imagewithdata:data];

 

《跳转网络页面》

UIViewController *vc=[[UIViewController alloc]init];

//创建web页面wv 让其加载电影

    UIWebView *wv=[[UIWebView alloc]initWithFrame:vc.view.bounds];

//创建网络请求

    NSMutableURLRequest *request=[NSMutableURLRequest requestWithURL:[NSURL URLWithString:s.detail_url]];

    [wv loadRequest:request];

 

    [vc.view addSubview:wv];

 

 

 

转载于:https://www.cnblogs.com/dieneufhuang/p/4827084.html

你可能感兴趣的文章
理解jquery的$.extend()、$.fn和$.fn.extend()的区别及用法
查看>>
NGUI基本事件
查看>>
工具下载地址
查看>>
mysqld诡异crash
查看>>
eclipse启动tomcat出现内存溢出错误 java.lang.OutOfMemoryError: PermGen space
查看>>
POJ 1564 经典dfs
查看>>
PLSQL触发器
查看>>
PHP 格式化时间date()
查看>>
android开发之路10(文件的读写)
查看>>
在Spring Boot中输出REST资源
查看>>
Arcgis for Silverlight学习(一)
查看>>
关于点击复选框实现全选
查看>>
[Codeforces]852I - Dating
查看>>
Asp.net MVC入门视频教程
查看>>
[Web前端系列之_Firebug_00_序]
查看>>
用NPOI完成公司任务(主要就是导入导出操作)
查看>>
Cracking the Coding Interview Q1.1
查看>>
汇编指令解释大全【转载】
查看>>
MySQL5.6.11安装步骤(Windows7 64位)
查看>>
使用Batch批量添加数据
查看>>