iOS???????(???ü?????????)
???????????? ???????[ 2016/5/26 15:25:25 ] ??????????????? ???????
???????????AFNetworking?????????????????????????????????????????????????£?
??????Info.plist?????NSAppTransportSecurity????Dictionary?? ??NSAppTransportSecurity?????NSAllowsArbitraryLoads????Boolean??????YES??????λ?????£?
????iOS9??http????????????????????????????????????????????????????????????????????£??????????????????????????????????????????????????????????????С???????????????????????????????£?
????//waitForExpectationsWithTimeout????????????????????????С?
????#define WAIT do {\
????[self expectationForNotification:@"RSBaseTest" object:nil handler:nil];\
????[self waitForExpectationsWithTimeout:30 handler:nil];\
????} while (0)
????#define NOTIFY \
????[[NSNotificationCenter defaultCenter]postNotificationName:@"RSBaseTest" object:nil]
??????????????testRequest??
????-(void)testRequest{
????// 1.????????????
????AFHTTPRequestOperationManager *mgr = [AFHTTPRequestOperationManager manager];
????mgr.responseSerializer.acceptableContentTypes = [NSSet setWithObjects:@"text/html"??nil];
????// 2.????GET????
????[mgr GET:@"http://www.weather.com.cn/adat/sk/101110101.html" parameters:nil success:^(AFHTTPRequestOperation *operation?? id responseObject) {
????NSLog(@"responseObject:%@"??responseObject);
????XCTAssertNotNil(responseObject?? @"???????");
????NOTIFY //???????
????} failure:^(AFHTTPRequestOperation *operation?? NSError *error) {
????NSLog(@"error:%@"??error);
????XCTAssertNil(error?? @"???????");
????NOTIFY //???????
????}];
????WAIT //???
????}
?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????С?????????????????????????STAlertView???????????á?
????STAlertView????÷?????
????self.stAlertView = [[STAlertView alloc]initWithTitle:@"?????" message:nil textFieldHint:@"??????????????" textFieldValue:nil cancelButtonTitle:@"???" otherButtonTitle:@"???" cancelButtonBlock:^{
????//??????????????
????[self testAlertViewCancel];
????NOTIFY //???????
????} otherButtonBlock:^(NSString *b) {
????//???????????
????[self alertViewComfirm:b];
????NOTIFY //???????
????}];
????[self.stAlertView show];
????· ?????????????????????LeanCloud ????????????????????????????????
????· ??????????github
??????????÷????????????????????????????????н?????????????????????????????????????????????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11