NSUrl的打印
1转自 http://my.oschina.net/wangdk/blog/165554; NSURL *url = [NSURL URLWithString:@"http://www.baidu.com/search?id=1"];
2
NSLog(@"scheme:%@", [url scheme]); //协议 http
3
NSLog(@"host:%@", [url host]); //域名 www.baidu.com
4
NSLog(@"absoluteString:%@", [url absoluteString]); //完整的url字符串 http://www.baidu.com:8080/search?id=1
5
NSLog(@"relativePath: %@", [url relativePath]); //相对路径 search
6
NSLog(@"port :%@", [url port]); // 端口 8080
7
NSLog(@"path: %@", [url path]); // 路径 search
8
NSLog(@"pathComponents:%@", [url pathComponents]); // search
9
NSLog(@"Query:%@", [url query]); //参数 id=1
NSUrl的打印的更多相关文章
- iOS进阶学习-CoreData
一.CoreData数据库框架的优势 1.CoreData数据持久化框架是Cocoa API的一部分,首次在iOS5版本的系统中出现,它允许按照实体-属性-值模型组织数据,并以XML.二进制文件或者S ...
- [BS-27] 创建NSURL的几个方法的区别
创建NSURL的几个方法的区别 URL的基本格式 = 协议://主机地址/路径 URL和Path的区别 * URL:统一资源定位符,格式 “协议+主机名称+路径” 例如:[NSURL UR ...
- 网络编程---(数据请求+slider)将网络上的大文件下载到本地,并打印其进度
网络编程---将网络上的大文件下载到本地,并打印其进度. 点击"開始传输"button.将网络上的大文件先下载下来,下载完毕后,保存到本地. UI效果图例如以下: watermar ...
- NSURL 子串截取
NSURL *url = [NSURL URLWithString:@"http://reg.email.163.com/unireg/call.do?cmd=register.entran ...
- ios开发之--NSURL的用法
NSURL *url = [NSURL URLWithString:@"http://www.baidu.com/search?id=1"]; NSLog(@"schem ...
- iOS UIPrintInteractionController打印
- (void)printData{ //为打印做准备,创建一个指向sharedPrintController的引用 UIPrintInteractionController *printer = [ ...
- NSURL初始化失败
服务端给返回的网页加载不出来,仔细一看,url是空的!!为什么呢. 示例: NSString *urlStr = @"http://服务器返回带有汉字的url字符串.com"; N ...
- NSURL组成部分详解
手思中有这么一段代码,初看下,让人摸不着头脑 //功能:UIWebView响应长按事件 -(BOOL)webView:(UIWebView *)webView shouldStartLoadWithR ...
- ASP.NET MVC5+EF6+EasyUI 后台管理系统(55)-Web打印
系列目录 前言 1.本次主要弥补工作流,用户表单数据的打印 2.使用JQprint做为web打印插件 3.兼容:FireFox,Chrome,IE. 4.没有依赖也没有配置,使用简单 代码下载:htt ...
随机推荐
- 【代码升级】【iCore3 双核心板】例程二十八:FSMC实验——读写FPGA
实验指导书及代码包下载: http://pan.baidu.com/s/1qXAxwgk iCore3 购买链接: https://item.taobao.com/item.htm?id=524229 ...
- ios-WKWebView 拨打电话
-(void)webView:(WKWebView* )webView didStartProvisionalNavigation:(WKNavigation* )navigation { NSStr ...
- ios-系统警告框 跳转到设置里面
-(void)createUIAlertIphone:(NSString*)title { UIAlertController * alert =[UIAlertController alertCon ...
- linux PPTP VPN客户端安装
转载于http://www.2cto.com/os/201209/157462.html 下载pptp-1.7.2.tar.gz http://pptpclient.sourceforge.net/ ...
- sqlserver临时表操作
创建临时表 方法一: create table #临时表名(字段1 约束条件, 字段2 约束条件, ...
- 去除行内(inline/inline-block)元素之间的间距
先展示一下,行内元素之间存在间距,实例代码如下: <style> div { color: #fff; padding: 25px 50px; } .inline-f00 { displa ...
- 一些常见maven仓库
<repositories> <repository> <id>spring-releases</id> <url>https://repo ...
- mac 升级vim
首先,要下载vim的源代码.Vim source archives : vim online,下载7.4的新建一个目录用于安装vim 7.4:sudo mkdir /usr/local进入源代码的sr ...
- 学习OpenCV——HOG+SVM
#include "cv.h" #include "highgui.h" #include "stdafx.h" #include < ...
- ZOJ 1015 Fishing Net(弦图判定)
In a highly modernized fishing village, inhabitants there make a living on fishery. Their major tool ...