好岸园IT技术学习网 hopean.com IT新闻 js网页特效 it技术 二次开发
上一页 1 2 3 4 5 6 ··· 12 下一页
摘要: UITapGestureRecognizerUIPinchGestureRecognizerUIRotationGestureRecognizerUISwipeGestureRecognizerUIPanGestureRecognizerUILongPressGestureRecognizer从命名上不难了解這些类別所对应代表的手势,分別是 Tap(点一下)、Pinch(二指往內或往外拨动)、Rotation(旋转)、Swipe(滑动,快速移动)、Pan (拖移,慢速移动)以及 LongPress(长按)。這些手势別在使用上也很简单,只要在使用前定义并添加到对应的视图上即可。// 定义一个 r 阅读全文
posted @ 2013-04-16 16:19 hopeanCom 阅读(212) 评论(0) 推荐(0) 编辑
摘要: #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... 阅读全文
posted @ 2013-04-16 14:49 hopeanCom 阅读(226) 评论(0) 推荐(0) 编辑
摘要: activity的生命周期图: 阅读全文
posted @ 2013-04-16 10:30 hopeanCom 阅读(175) 评论(0) 推荐(0) 编辑
摘要: UIButton *btn = [UIButtonbuttonWithType:UIButtonTypeCustom];1、[btn setTitle:@"测试一下" forState:UIControlStateNormal];输出:CurrentTitleLabel:测试一下,currentTitle:测试一下。模拟器button上显示:测试一下2、btn.titlelabel.text = @"测试一下";输出:CurrentTitleLabel:测试一下,currentTitle:(null)。模拟器button上无显示3、[btn setTit 阅读全文
posted @ 2013-04-16 10:25 hopeanCom 阅读(359) 评论(0) 推荐(0) 编辑
摘要: iPhoneAPI已经提供了系统写邮件界面的接口,使用MFMailComposeViewController,用来显示界面.项目中需要添加MessageUi.framework。头文件加入MFMailComposeViewControllerDelegate。#import<MessageUI/MessageUI.h>sendMailViewController.m文件的实现:-(void)viewDidLoad{UIButton*button=[UIButtonbuttonWithType:UIButtonTypeRoundedRect];button.frame=CGRectM 阅读全文
posted @ 2013-04-16 09:44 hopeanCom 阅读(341) 评论(0) 推荐(0) 编辑
摘要: -(BOOL)textField:(UITextField*)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString*)stringUITextField字符改变时调用,textField改变前的字符,range改变的范围,string改变的字符,如果确认改变返回YES,不改变返回NO 阅读全文
posted @ 2013-04-15 13:44 hopeanCom 阅读(611) 评论(0) 推荐(0) 编辑
摘要: [UITextField BecomeFirstResponder]启用键盘[UITextField ResignFirstResponder]关闭键盘UITextField.enablesReturnKeyAutomatically = YES当UITextField不为空时高亮。UITextField.keyboardType为键盘类型。UITextField.clearButtonMode:清空输入的字符,有以下几种模式 UITextFieldViewModeAlways,不为空,获得焦点与没有获得焦点都显示清空按钮 UITextFieldViewModeNever,不显示清空按钮 .. 阅读全文
posted @ 2013-04-15 13:43 hopeanCom 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 当程序接到内存警告时View Controller将会收到这个消息:didReceiveMemoryWarning从iOS3.0开始,不需要重载这个函数,把释放内存的代码放到viewDidUnload中去。这个函数的默认实现是:检查controller是否可以安全地释放它的view(这里加粗的view指的是controller的view属性),比如view本身没有superview并且可以被很容易地重建(从nib或者loadView函数)。如果view可以被释放,那么这个函数释放view并调用viewDidUnload。你可以重载这个函数来释放controller中使用的其他内存。但要记得调用 阅读全文
posted @ 2013-04-15 08:49 hopeanCom 阅读(166) 评论(0) 推荐(0) 编辑
摘要: NSUserDefaults可以存取一些短小的信息。比如存入再读出一个字符串到NSUserDefaultsNSString *string = [NSString stringWithString @"hahaha"];NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];[ud setObject:string forKey:@"myKey"];NSString *value;value = [ud objectForKey:"myKey"];但是并不是所有的东西都能往 阅读全文
posted @ 2013-04-12 10:53 hopeanCom 阅读(132) 评论(0) 推荐(0) 编辑
摘要: //画图-(void)addSecondZone:(UIView*)contentView//按钮图片UIImage *selecticonNo =[UIImageimageNamed:SelecticonNo];UIImage *selecticon =[UIImageimageNamed:Selecticon]; UIView *childSecondView; childSecondView = [[UIViewalloc] initWithFrame:CGRectMake(0,155 , 320, 500)]; int pointY =0;for (int i=0;i<4;... 阅读全文
posted @ 2013-04-07 11:06 hopeanCom 阅读(127) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 12 下一页