摘要: First of all,Excel the method "prefersStatusBarHidden" in view controllers to set the status bar hiden 'YES' when inited1 [self perfersStatusBarHiden]Second,Excel the method "performSelector:@selector(setNeedsStatusBarAppearanceUpdate)" to set the view controller based st 阅读全文
posted @ 2014-03-20 10:29 optt 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 1 -(UIImage*)changeImage:(UIImage*)imageT withNewSize:(CGSize)newSizeT 2 { 3 //define a new image 4 UIImage* newImage = nil; 5 6 //set the image to current context 7 UIGraphicsBegainImageContext(newSizeT); 8 //redraw the image to new rect 9 ... 阅读全文
posted @ 2014-03-18 17:19 optt 阅读(252) 评论(0) 推荐(0) 编辑
摘要: 1 typeof (NSString*) __weak str = @"this is a test";2 double delayInSeconds = 2.0;3 dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delayInSeconds * NSEC_PER_SEC));4 dispatch_after(popTime, dispatch_get_main_queue(), ^(void){5 NSLog(@"%@",str);6 ... 阅读全文
posted @ 2014-03-18 14:00 optt 阅读(191) 评论(0) 推荐(0) 编辑
摘要: 1.主要实现UIResponder类的两个方法: (1)- (void)touchesBegan:(NSSet*)touches withEvent:(UIEvent*)event; (2)- (void)touchesEnded:(NSSet*)touches withEvent:(UIEvent*)event;正对拥护触摸屏幕的前后。 controller 控件一般继承语UIViewController,继承与UIResponder,因此程序的UIViewController可以使用这两个方法:第一步。定义一个键盘隐藏的函数 1 - (void)hidenKeyboard:(id... 阅读全文
posted @ 2013-11-27 14:29 optt 阅读(325) 评论(0) 推荐(0) 编辑
摘要: 想学IPhone,Mac开发,但是在公司不方便把MBP带来,就在debian中是用GNUstep配置环境进行开发。把搭建的过程写下来,做一个备份。准备环境一台PC,虚拟机中安装debian,或者直接安装debian安装GNUstep开发包 apt-get install gnustep-devel配置环境修改$HOME/.bashrc,添加export GNUSTEP_MAKEFILES=/usr/share/GNUsetp/Makefiles/ (安装位置的makefiles)然后重启终端,或者直接使用source $HOME/.bashrc重新载入配置配置自己的VIM,VIM默认不支持OB 阅读全文
posted @ 2013-10-01 00:02 optt 阅读(462) 评论(0) 推荐(0) 编辑