随笔分类 - Mac & IOS
摘要:xcode-select --install安装命令行工具 安装完毕后,可能报错 xcrun: error: active developer path ("/Applications/Xcode.app/Contents/Developer") does not exist 使用 xcode-se
阅读全文
摘要:opencv手工编译方法1.下载cmake gui2.在where is the source code路径下配置opencv根目录,在where to build the binaries路径下配置生成工程的保存路径3.点击configure,选择要生成的工程对应ide,configure结束后再
阅读全文
摘要:目前没用到,备份一下 原帖地址:http://ios.jobbole.com/84216/
阅读全文
摘要:终端:1. touch ~/.lldbinit2. echo display @import UIKit >> ~/.lldbinit3. echo target stop-hook add -o “target stop-hook disable” >> ~/.lldbini
阅读全文
摘要:一、安装模板1.git clonehttps://github.com/kattrali/Xcode-Plugin-Template.git2.cdXcode-Plugin-Template3.mkdir~/Library/Developer/Xcode/Template4.mv ./Project...
阅读全文
摘要:- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{ return 0.0;}- (CGFloat)tableView:(UITableView *)tableVie...
阅读全文
摘要:1.定位定位使用CoreLocation库,引入CoreLocation/CoreLocation。创建CLLocationManager对象,使用startUpdatingLocation方法开始更新位置信息。_mgr = [[CLLocationManager alloc] init];[_mg...
阅读全文
摘要:#define iPhone5 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 1136), [[UIScreen mainScreen] curren...
阅读全文
摘要:-(void) motionBegan:(UIEventSubtype)motion withEvent:(UIEvent *)event{ if (motion==UIEventSubtypeMotionShake) NSLog(@"Shake begin");}-(void) motio...
阅读全文
摘要: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.返回...
阅读全文
摘要:1.xcodebuild clean -project $projectname.xcodeproj -configuration Release -alltargets2.xcodebuild archive -project $projectname.xcodeproj -scheme $sch...
阅读全文
摘要:1.访问网络获取Json //Get方法 NSString *str = @"http://api.xxx.cc/product/found.jhtml";NSDictionary *params = [[NSDictionary alloc] initWithObjectsAndKeys:@"1...
阅读全文
摘要:1.THEOS的makefile文件中的THEOS_DEVICE_IP要写在第一行2.如果make package install报错dpkg status database is locked by another process则在iphone终端输入sudo rm /var/lib/dpkg/...
阅读全文
摘要:1.设置navigationbar背景颜色[[UINavigationBar appearance] setBarTintColor:[UIColor blackColor]];PS:如果颜色不对,可能是因为默认的半透明玻璃效果导致的,要关闭使用self.navigationController.n...
阅读全文
摘要:两个界面传递参数时报这个错误,经检查发现,是因为目标视图没有关联对应的controller。
阅读全文
摘要:点开UICollectionViewDelegate,发现有@protocol UICollectionViewDelegate 。所以只要实现UIScrollViewDelegate的- (void)scrollViewDidScroll:(UIScrollView *)scrollView; 方...
阅读全文
摘要:1 - (IBAction)test:(id)sender { 2 NSString *result = @"{\"code\":\"S00000\",\"message\":\"success\",\"data\":{\"file_name\":\"b1feba4439d0bed9f86...
阅读全文
摘要:NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask, YES);NSString *filePath = [[paths objectAtIndex:0] stringBy...
阅读全文
摘要:1.修改选中图片:UITabBarItem* item = [self.tabBarController.tabBar.items objectAtIndex:1]; //从0开始item.selectedImage = [UIImage imageNamed:@"ItemSelProfile"]...
阅读全文
摘要:将build settings的ios deployment target改为对应真机系统版本即可
阅读全文
浙公网安备 33010602011771号