摘要: UserGuideViewController.h@interfaceUserGuideViewController:UIViewController{UIScrollView*_scrollView;}UserGuideViewController.m -(void)viewDidLoad{[superviewDidLoad];//设置ScrollView的整体触摸与显示区域,注意宽高不要超过320X480(4s,4)否则会出现无法滚动的情况_scrollView=[[UIScrollViewalloc]initWithFrame:CGRectMake(0,0,320,640)];//iph 阅读全文
posted @ 2013-09-12 17:32 0xdbe 阅读(305) 评论(0) 推荐(0) 编辑
摘要: //interfacebuilder中没有提供对点击组件ImageView、Label的响应,在程序运行初期添加gesturerecognizer可以实现对相应点击事件的响应-(void)viewDidLoad{[superviewDidLoad];//在viewDidLoad中增家gesturerecognizerUITapGestureRecognizer*tapRecognizer=[[UITapGestureRecognizeralloc]initWithTarget:selfaction:@selector(ClickEventOnImage:)];self.imageview.us 阅读全文
posted @ 2013-09-12 12:04 0xdbe 阅读(769) 评论(0) 推荐(0) 编辑
摘要: (转载)http://www.cnblogs.com/aimeng/archive/2013/08/05/3238358.html 1.通过UISwitch开关隐藏一个btn, 通过监听value change事件 self.btn.hidden = ![sender isOn];2.获取UISegmentedControl的标题[segment titleForSegmentAtIndex: [segment selectedSegmentIndex]] 3.获取0~~~~100000随机数int类型 rand()*100000;4.加载webView页面 NSString * urlSt. 阅读全文
posted @ 2013-09-12 11:25 0xdbe 阅读(531) 评论(0) 推荐(0) 编辑
摘要: int(^b)(int);b=^(intresu){returnresu*resu;};inta=b(3);NSLog(@"%d",a);intoutA=8;int(^myPtr)(int)=^(inta){returnoutA+a;};//block里面可以读取同一类型的outA的值intresult=myPtr(3);NSLog(@"result=%d",result);intoutA=8;int(^myPtr)(int)=^(inta){returnoutA+a;};//block里面可以读取同一类型的outA的值outA=5;//在调用myPtr 阅读全文
posted @ 2013-09-12 11:07 0xdbe 阅读(208) 评论(0) 推荐(0) 编辑