摘要:
UITapGestureRecognizerUIPinchGestureRecognizerUIRotationGestureRecognizerUISwipeGestureRecognizerUIPanGestureRecognizerUILongPressGestureRecognizer从命名上不难了解這些类別所对应代表的手势,分別是 Tap(点一下)、Pinch(二指往內或往外拨动)、Rotation(旋转)、Swipe(滑动,快速移动)、Pan (拖移,慢速移动)以及 LongPress(长按)。這些手势別在使用上也很简单,只要在使用前定义并添加到对应的视图上即可。// 定义一个 r 阅读全文
摘要:
#define kBgQueue dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT,0)- (void)viewDidLoad{ [superviewDidLoad]; dispatch_async(kBgQueue, ^{ NSData* data = [NSDatadataWithContentsOfURL:kLatestKivaLoansURL]; [selfperformSelectorOnMainThread:@selector(fetchedData:)withObject:datawaitUntilDo... 阅读全文
摘要:
activity的生命周期图: 阅读全文
摘要:
UIButton *btn = [UIButtonbuttonWithType:UIButtonTypeCustom];1、[btn setTitle:@"测试一下" forState:UIControlStateNormal];输出:CurrentTitleLabel:测试一下,currentTitle:测试一下。模拟器button上显示:测试一下2、btn.titlelabel.text = @"测试一下";输出:CurrentTitleLabel:测试一下,currentTitle:(null)。模拟器button上无显示3、[btn setTit 阅读全文
摘要:
iPhoneAPI已经提供了系统写邮件界面的接口,使用MFMailComposeViewController,用来显示界面.项目中需要添加MessageUi.framework。头文件加入MFMailComposeViewControllerDelegate。#import<MessageUI/MessageUI.h>sendMailViewController.m文件的实现:-(void)viewDidLoad{UIButton*button=[UIButtonbuttonWithType:UIButtonTypeRoundedRect];button.frame=CGRectM 阅读全文