2015年12月21日

iOS 之 获取View所在控制器

摘要: 1.UIResponderUIViewController *uvc; UIResponder* nextResponder = [self.superview.superview.superview nextResponder]; if ([nextResponder isKi... 阅读全文

posted @ 2015-12-21 16:56 大木哥 阅读(489) 评论(0) 推荐(0) 编辑

iOS 之 WebView 简单使用

摘要: 1. 代理 UIWebViewDelegate 2. 创建UIWebView myWebView=[[UIWebView alloc] initWithFrame:CGRectMake(0, 0,self.view.frame.size.width,self.view.frame.size.heig... 阅读全文

posted @ 2015-12-21 16:21 大木哥 阅读(242) 评论(0) 推荐(0) 编辑

iOS 之 关闭键盘

摘要: //方法一:关闭整个系统的键盘[[[UIApplication sharedApplication] keyWindow] endEditing:YES];//方法二:关闭当前页的键盘[[selffindFirstResponderBeneathView:self]resignFirstRespon... 阅读全文

posted @ 2015-12-21 10:22 大木哥 阅读(167) 评论(0) 推荐(0) 编辑

iOS 之 NSString 去除前后空格和回车键

摘要: NSString *string = @" spaces in front and at the end ";NSString *trimmedString = [string stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAnd... 阅读全文

posted @ 2015-12-21 08:31 大木哥 阅读(470) 评论(0) 推荐(0) 编辑

导航