摘要:
解决办法:因为在ipad上面(确切的说是在iOS8上面的ipad),根据错误提示,在呈现窗口之前,他会当做POPover窗口呈现,所以需要一个坐标宿主窗口,所以在这之前添加一句activityViewController.popoverPresentationController.sourceVie 阅读全文
摘要:
获取所有html:NSString *lJs = [webView stringByEvaluatingJavaScriptFromString:@"document.documentElement.innerHTML"]; 获取body: [webView stringByEvaluatingJa 阅读全文
摘要:
大部分app在启动过程中全屏显示一张背景图片,比如新浪微博会显示这张: 要想在iOS中实现这种效果,毫无压力,非常地简单,把需要全屏显示的图片命名为Default.png即可,在iOS app启动时默认会去加载并全屏显示Default.png。 也可以用其他名称来命名图片,在Info.plist配置 阅读全文
摘要:
-(void)checkboxClick:(UIButton *)btn { btn.selected = !btn.selected; } - (void)viewDidLoad { UIButton *checkbox = [UIButton buttonWithType:UIButtonTyp 阅读全文
摘要:
在相应的代码中写入: 1、调用 电话phone [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tel://4008008288"]]; 2、调用自带 浏览器 safari [[UIApplication share 阅读全文
摘要:
// testAppDelegate.m // test // // Created by gaohf on 11-5-24. // Copyright 2011 __MyCompanyName__. All rights reserved. 在终端中执行以下命令: defaults write c 阅读全文
摘要:
NSString *regex =[NSString stringWithFormat:@"^1(3[4-9]|5[012789]|8[2378]|47)\\d{8}$"]; NSPredicate *predicate = [NSPredicate predicateWithFormat:@"SE 阅读全文
摘要:
1-1Did End On Exit 调用下面事件当点击键盘return得时候就会隐藏键盘 - (IBAction)textFieldShouldReturn:(UITextField *)textField { //[sender resignFirstResponder]; if (textFi 阅读全文
摘要:
在开发项目中,有时有这样的需求:运行程序,登陆界面是一个自由的ViewController,只是摆放几个TextField和button,点击后跳转到其它选择界面,点击选项后进入我们的主界面:这个时候,在登陆界面作跳转时,会有好多的方法,如果使用storyboard,就比较方便了,设置一个segue 阅读全文
摘要:
只需在加载时,添加这样的话就可以了: testView.layer.cornerRadius = 6; testView.layer.masksToBounds = YES; 注意,需要 import <QuartzCore/QuartzCore.h> 导入,否则,不能识别cornerRadius和 阅读全文