03 2014 档案

摘要:ios ui开发过程中,经常会使用到导航栏,默认的样式比较单一,所以经常需要修改导航栏的样式ios4:- (void)drawRect:(CGRect)rect { UIImage *image = [UIImage imageNamed:@"navbar_bg.png"]; [image drawInRect:CGRectMake(0, 0, image.size.width, image.size.height)]; return;}ios5以后: if ([self.navigationController.navigationBar respondsToSelect 阅读全文
posted @ 2014-03-31 18:35 geweb 阅读(704) 评论(0) 推荐(0)
摘要:ios5之前可以通过读取配置文件获取,ios5以后苹果修改wifi列表文件位置,只有root权限才可以读取.ios4:/System/Library/SystemConfiguration/WiFiManager.bundle/WiFiManagerios5:/System/Library/SystemConfiguration/IPConfiguration.bundle/IPConfiguration官方的API没有提供获取扫描所有wifi列表,相近功能的只有CaptiveNetwork,获取当前wifi的名称。引用头文件/*! @function CNCopySupportedInter 阅读全文
posted @ 2014-03-31 18:03 geweb 阅读(4313) 评论(0) 推荐(0)
摘要:编译第三方XCode插件时,提示没有文件操作权限(Permission denied)使用命令行,修改Xcode目录当前用户操作权限:sudo chmod -R 777 /Users/当前的用户名/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins 阅读全文
posted @ 2014-03-27 15:48 geweb 阅读(607) 评论(0) 推荐(0)
摘要:今天使用模拟器测试,发现有个UITableViewCell的detailTextLabel没有完全显示字符串,结尾是省略号,字符串的值中间显示有空格,如'Test 01'显示为'Te...'detailTextLabel默认自动计算frame,考虑可能是空格导致计算不正确,但是使用普通空格测试发现正常。使用测试代码查看字符串的十六进制 const char *c =[string UTF8String]; int len = strlen(c); while (len) { NSLog(@"%x"... 阅读全文
posted @ 2014-03-25 16:14 geweb 阅读(549) 评论(0) 推荐(0)
摘要:iOS7中UISearchDisplayController 与UISearchBar结合使用时,有时候会出现搜索框获得焦点时,阴影遮盖部分挡住了搜索框,影响用户使用,如下图API中没有阴影图层的接口,尝试分析解决1、使用Reveal,查找遮盖图层,发现为_UISearchDisplayControllerDimmingView2、找到该图层,修改对应的frame,通过上图可以发现dimmingview与searchResultsTableView为同一视图的子图层。- (void)searchDisplayControllerWillBeginSearch:(UISearchDisplayC 阅读全文
posted @ 2014-03-20 18:32 geweb 阅读(1881) 评论(1) 推荐(0)
摘要:ios升级到7.1时,企业证书http服务器发布无线安装不能使用,需要使用https服务器。测试了几种方式1.测试时自签名https证书测试无效,提示不能连接到服务器2.使用dropbox共享连接https服务,https://www.dropbox.com/s/xxx/x.plist,同样提示不能... 阅读全文
posted @ 2014-03-13 10:15 geweb 阅读(759) 评论(0) 推荐(0)
摘要:如果需要旋转的ViewController 使用了UINavigationController,对UINavigationController进行如下扩展@implementation UINavigationController(shouldAutorotate)- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation{ return (interfaceOrientation == UIInterfaceOrientationPortrait);}- (BOO... 阅读全文
posted @ 2014-03-04 14:21 geweb 阅读(973) 评论(0) 推荐(0)