随笔分类 -  Mac & IOS

摘要:xcode-select --install安装命令行工具 安装完毕后,可能报错 xcrun: error: active developer path ("/Applications/Xcode.app/Contents/Developer") does not exist 使用 xcode-se 阅读全文
posted @ 2018-11-22 13:49 朋克 阅读(831) 评论(0) 推荐(0)
摘要:opencv手工编译方法1.下载cmake gui2.在where is the source code路径下配置opencv根目录,在where to build the binaries路径下配置生成工程的保存路径3.点击configure,选择要生成的工程对应ide,configure结束后再 阅读全文
posted @ 2016-04-29 11:06 朋克 阅读(185) 评论(0) 推荐(0)
摘要:目前没用到,备份一下 原帖地址:http://ios.jobbole.com/84216/ 阅读全文
posted @ 2016-03-14 11:19 朋克 阅读(7489) 评论(0) 推荐(0)
摘要:终端:1. touch ~/.lldbinit2. echo display @import UIKit >> ~/.lldbinit3. echo target stop-hook add -o “target stop-hook disable” >> ~/.lldbini 阅读全文
posted @ 2016-01-05 09:21 朋克 阅读(262) 评论(0) 推荐(0)
摘要:一、安装模板1.git clonehttps://github.com/kattrali/Xcode-Plugin-Template.git2.cdXcode-Plugin-Template3.mkdir~/Library/Developer/Xcode/Template4.mv ./Project... 阅读全文
posted @ 2015-08-03 12:43 朋克 阅读(237) 评论(0) 推荐(0)
摘要:- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{ return 0.0;}- (CGFloat)tableView:(UITableView *)tableVie... 阅读全文
posted @ 2015-06-24 14:54 朋克 阅读(752) 评论(0) 推荐(0)
摘要:1.定位定位使用CoreLocation库,引入CoreLocation/CoreLocation。创建CLLocationManager对象,使用startUpdatingLocation方法开始更新位置信息。_mgr = [[CLLocationManager alloc] init];[_mg... 阅读全文
posted @ 2015-06-05 17:25 朋克 阅读(304) 评论(0) 推荐(0)
摘要:#define iPhone5 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 1136), [[UIScreen mainScreen] curren... 阅读全文
posted @ 2015-06-05 14:20 朋克 阅读(449) 评论(0) 推荐(0)
摘要:-(void) motionBegan:(UIEventSubtype)motion withEvent:(UIEvent *)event{ if (motion==UIEventSubtypeMotionShake) NSLog(@"Shake begin");}-(void) motio... 阅读全文
posted @ 2015-04-24 17:44 朋克 阅读(143) 评论(0) 推荐(0)
摘要:1.声明:void (^TestBlock) (int,int) = ^(int x,int y){ NSLog(@"%d",x*y);};调用:TestBlock(3,5);2.直接使用^(int x,int y){ NSLog(@"%d",x + y); }(3,7);3.返回... 阅读全文
posted @ 2015-04-23 12:36 朋克 阅读(188) 评论(0) 推荐(0)
摘要:1.xcodebuild clean -project $projectname.xcodeproj -configuration Release -alltargets2.xcodebuild archive -project $projectname.xcodeproj -scheme $sch... 阅读全文
posted @ 2015-04-16 12:56 朋克 阅读(133) 评论(0) 推荐(0)
摘要:1.访问网络获取Json //Get方法 NSString *str = @"http://api.xxx.cc/product/found.jhtml";NSDictionary *params = [[NSDictionary alloc] initWithObjectsAndKeys:@"1... 阅读全文
posted @ 2015-04-09 13:43 朋克 阅读(148) 评论(0) 推荐(0)
摘要:1.THEOS的makefile文件中的THEOS_DEVICE_IP要写在第一行2.如果make package install报错dpkg status database is locked by another process则在iphone终端输入sudo rm /var/lib/dpkg/... 阅读全文
posted @ 2015-01-29 02:37 朋克 阅读(247) 评论(0) 推荐(0)
摘要:1.设置navigationbar背景颜色[[UINavigationBar appearance] setBarTintColor:[UIColor blackColor]];PS:如果颜色不对,可能是因为默认的半透明玻璃效果导致的,要关闭使用self.navigationController.n... 阅读全文
posted @ 2014-12-05 23:16 朋克 阅读(295) 评论(0) 推荐(0)
摘要:两个界面传递参数时报这个错误,经检查发现,是因为目标视图没有关联对应的controller。 阅读全文
posted @ 2014-12-04 23:50 朋克 阅读(104) 评论(0) 推荐(0)
摘要:点开UICollectionViewDelegate,发现有@protocol UICollectionViewDelegate 。所以只要实现UIScrollViewDelegate的- (void)scrollViewDidScroll:(UIScrollView *)scrollView; 方... 阅读全文
posted @ 2014-11-13 15:55 朋克 阅读(1088) 评论(0) 推荐(0)
摘要:1 - (IBAction)test:(id)sender { 2 NSString *result = @"{\"code\":\"S00000\",\"message\":\"success\",\"data\":{\"file_name\":\"b1feba4439d0bed9f86... 阅读全文
posted @ 2014-11-09 23:13 朋克 阅读(343) 评论(0) 推荐(0)
摘要:NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask, YES);NSString *filePath = [[paths objectAtIndex:0] stringBy... 阅读全文
posted @ 2014-11-09 00:00 朋克 阅读(745) 评论(0) 推荐(0)
摘要:1.修改选中图片:UITabBarItem* item = [self.tabBarController.tabBar.items objectAtIndex:1]; //从0开始item.selectedImage = [UIImage imageNamed:@"ItemSelProfile"]... 阅读全文
posted @ 2014-11-06 22:57 朋克 阅读(443) 评论(0) 推荐(0)
摘要:将build settings的ios deployment target改为对应真机系统版本即可 阅读全文
posted @ 2014-05-27 00:49 朋克 阅读(306) 评论(0) 推荐(0)