摘要://计算两点距离-(float)distanceBetweenTwoPoint:(CGPoint)point1 point2:(CGPoint)point2{ return sqrtf(powf(point1.x - point2.x, 2) + powf(point1.y - point2.y, 2));}
阅读全文
摘要:if ([self respondsToSelector:@selector(edgesForExtendedLayout)]) { self.edgesForExtendedLayout = UIRectEdgeNone; self.extendedLayoutIncludesOpaqueBars = NO; self.modalPresentationCapturesStatusBarAppearance = NO; }
阅读全文
摘要:UITextView *textView2 = [[UITextView alloc]initWithFrame:CGRectMake(0, textView1.frame.size.height + 60, 495,20)]; textView2.backgroundColor = [UIColor clearColor]; textView2.textColor = [UIColor blackColor]; textView2.font= [UIFont systemFontOfSize:19]; [scrollView addSu...
阅读全文
摘要:TwoDView *twoD =[[TwoDView alloc]init]; CATransition *animation = [CATransition animation]; [animation setDuration:0.4]; [animation setType: kCATransitionPush]; [animation setSubtype: kCATransitionFromLeft]; [animation setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMed...
阅读全文
摘要:// backString = [backString stringByReplacingOccurrencesOfString:@"\r" withString:@""];// backString = [backString stringByReplacingOccurrencesOfString:@"\n" withString:@""];
阅读全文
摘要:- (void)loadDataFromUrl{ NSURL* url = [NSURL URLWithString:@"http://m.weather.com.cn/data/101190408.html"]; NSMutableURLRequest * urlRequest=[NSMutableURLRequest requestWithURL:url]; NSURLConnection* urlConn = [[NSURLConnection alloc] initWithRequest:urlRequest delegate:self]; [urlConn s..
阅读全文