我是个菜鸟NSURLConnection.我搜索过谷歌并找到了这个网站,但我对此并不了解.
我的朋友请解释我从Document文件夹中的url下载的代码.
这是我的代码:
- (void)viewDidLoad
{
[super viewDidLoad];
NSURL *url =[NSURL URLWithString:@"http://cdn.arstechnica.net/wp-content/uploads/2012/09/iphone5-intro.jpg"];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
NSURLConnection *con = [[NSURLConnection alloc]initWithRequest:request delegate:self];
[con start];}
- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response
{
//I dont know what thing put here
}
- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)theData
{
//I dont know what thing put here
}
- (void)connectionDidFinishLoading:(NSURLConnection *)connection
{
//I dont know what thing put here
}
- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error
{
UIAlertView *errorView = [[UIAlertView alloc]initWithTitle:@"Error" message:@"The Connection …Run Code Online (Sandbox Code Playgroud) 我想获得扩展(来自NSString的格式文件)但我不知道它请告诉我从NSString获取格式文件的语法.
NSString *name = @"Xcode-tutorial.pdf"
Run Code Online (Sandbox Code Playgroud)
我想得到.pdf格式并存储在一个变量中
我必须使用sqlite DB,并在我的sqlite文件中插入许多数据.现在我想要执行具有"NULL"的记录.在oder单词中我想看到"NULL"的记录.当我执行这段代码时,我什么也得不到.
select * from table1 where ParentID = NULL
//or this select * from table1 where ParentID = 'NULL'
Run Code Online (Sandbox Code Playgroud)
这是我的sqlite文件:

我想执行folder1并检查ParentID(我只需要检查ParentID列)