[A gull's training note] [Objective-c] [Sixth day] [Personal notes]

Source: Internet
Author: User

- -.. Grabbed a request for what what package URL ... And then what's the request ...

With a tool called Paros.

IP set to computer: Set the lower port ... And then set the HTTP proxy of the mobile device to the same, you can catch the =w=

After the arrest. What kind of bag did you use? A request was made to the URL you just grabbed. Then took a look at responce.

//PictureURLRequest.h#import<Foundation/Foundation.h>@protocolPictureurlrequestdelegate <nsobject>-(void) LoadData;@end@interfacePictureurlrequest:nsobject@property (nonatomic,weak)ID<PictureURLRequestDelegate>Delegate; @property (nonatomic,strong) Nsmutablearray*MARR;-(instancetype) init;@end //PICTUREURLREQUEST.M#import "PictureURLRequest.h"#import "URLParsing.h"#import "Network.h"#import "PictureModel.h"@implementationpictureurlrequest-(instancetype) init{ Self=[Super Init]; if(self) {Network*net =[[Network alloc] init]; [NET Asyngetnetworkwith:[nsurl urlwithstring:@"Http://c.m.163.com/photo/api/list/0096/4GJ60096.json"] block:^ (IDdata) {Nsarray*arr =[nsjsonserialization jsonobjectwithdata:data options:nsjsonreadingmutablecontainers Error:nil]; _marr= [[Nsmutablearray alloc] Initwithcapacity:Ten];  for(Nsdictionary *dic1incharr) {Picturemodel*picturemodel =[[Picturemodel alloc] init];                [Picturemodel Setvaluesforkeyswithdictionary:dic1];            [_marr Addobject:picturemodel]; } [self.DelegateLoadData];    }]; }returnSelf ;}@end //There are only a few properties in Picturemodel

Then use the sdwebimage to get pictures from the Internet.

#import " uiimageview+webcache.h "

And then

[Self.clientcoverimageview Sd_setimagewithurl:[nsurl URLWithString:model.clientcover];

Just a =w=.

[A gull's training note] [Objective-c] [Sixth day] [Personal notes]

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.