cocoapods XCODE 7.0后版本

1. 参靠资料 最新版 CocoaPods 的安装流程 2. 命令 sudo gem install -n /usr/local/bin cocoapods 3. 编译文件 cocoapods 4. 重启XCODE……

阅读全文

git xcode 版本管理

1. source control - >new branch new branch name ex “xxxx”; 2. 在 xxxx 库中修改文件 正常commit pull push 3. 确定修改OK 转回主库 如"master" source control - >switch to branch ->master 4.转回主库融合 source control - >merge from branch……

阅读全文

scrollview的contentSize、contentInset和contentOffset区别

而contentSize、contentInset和contentOffset 是 scrollView三个基本的属性。 contentSize: The size of the content view. 其实就是scrollview可以滚动的区域,比如frame = (0 ,0 ,320 ,480) contentSize = (320 ,960),代表你的scrollview可以上下滚动,滚动区域为frame大……

阅读全文

163 企业邮箱设置

163 企业邮箱设置 企业邮箱 1 pop3服务器地址:pop3.ym.163.com 110 995(ssl) 2 imap服务器地址:imap.ym.163.com 143 465(ssl) 3 smtp服务器地址:smtp.ym.163.com 25 993(ssl)……

阅读全文

IOS 函数指针

函数指针 // Call the selector 函数指针 id result = nil; IMP imp = [self methodForSelector:selector]; if (imp) { id(*func)(id, SEL, id, WACallback) = (void *)imp; result = func(self, selector, parameter, callback); } -(id)viewImage:(id)parameter callback:(WACallback)callback { }……

阅读全文

IOS自定义相册

KVO 值变化刷新界面 //注册调用 [testPerson addObserver:self forKeyPath:@"height" options:NSKeyValueObservingOptionNew context:nil]; //回调函数 - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { if ([keyPath isEqualToString:@"height"]) { NSLog(@"Height is changed! new=%@", [change valueForKey:NSKeyValueChangeNewKey]); } else { [super observeValueForKeyPath:keyPath ofObject:object change:change context:context]; } } UIScrollView - (void) setup{ //scrollview self.scrollView.delegate = self; int imagecount = 4; self.scrollView.contentSize = CGSizeMake(imagecount * PKScreenW, 0); self.scrollView.bounces = NO; //回弹 self.scrollView.showsHorizontalScrollIndicator = NO; //分页 self.scrollView.pagingEnabled = YES; //添加图片 到 scrollView int imageW = PKScreenW; for (int i = 0; i < imagecount; i++) { NSString *imagename = @"Starting_Image";//[NSString stringWithFormat:@"%d", i + 1]; UIImageView *image = [[UIImageView alloc] initWithImage:[UIImage imageNamed:imagename]]; image.userInteractionEnabled = YES; image.size = CGSizeMake(PKScreenW, PKScreenH-PKNavigationH); PKLog(@"%f,%f",self.size.width,self.size.height); image.x = i * imageW; image.y……

阅读全文

IOS音频相关

IOS音频相关 AVAudioPlayer AVAudioRecorder MPMoviePlayerController Sensor AVAudioSession 默认设置播放状态 使用以下类必须先设置 AVAudioPlayer AVAudioRecorder MPMoviePlayerController AVAudioSession *audioSession=[AVAudioSession sharedInstance]; //设置为播放和录音状态,以便可以在录制完之后播放录音 //听筒模式 [audioSession setCategory:AVAudioSessionCategoryPlayAndRecord error:nil]; //扬声器模式 [audioSession setCategory:AVAudioSessionCategoryPlayback error:nil]; [audioSession setActive:YES error:nil]; AVAudioPlayer -(AVAudioPlayer *)audioPlayer { //创建播放器 if (!_audioPlayer) { NSURL *url = [NSURL fileURLWithPath:self.recordPath]; NSError *error=nil; _audioPlayer=[[AVAudioPlayer alloc]initWithContentsOfURL:url error:&error]; [_audioPlayer setVolume:1.0]; [_audioPlayer setDelegate:self]; [_audioPlayer prepareToPlay]; [self.audioSession setCategory:AVAudioSessionCategoryPlayback error:nil]; if (error) { PKLog(@"创建播放器过程……

阅读全文

JS函数格式

onClick调用JS <input type="button" onclick="test();"/> <script type="text/javascript"> function a(){ return "hello"; } function test(){ document.getElementById("show").innerHTML=a(); } </script> JS改变Html内容 <script type="text/javascript"> //--------------------- addDiv(); //--------------------- function addDiv(){ var dialog = document.createElement('div'); dialog.className = 'ds-thread'; dialog.setAttribute('data-thread-key',window.location.pathname); dialog.setAttribute('data-title',window.location.pathname); dialog.setAttribute('data-url',window.location.href); document.getElementsByClassName('row')[1].appendChild(dialog); } </script>……

阅读全文

更新 WIKI

upDate WIKI //wiki内容更改 先更新SVN 1 svn checkout http://[email protected]:8080/scm/svn/documents 2 cd 文件夹路径 3 svn update 4 svn commit -m “注释xxxxxx” 在更新远端文件ftp 远端路径: /home/app/local/nginx/html/mdwiki/app_api 192.168.0.200 app test888888……

阅读全文

IOS 删除xcode证书,缓存

删除Xcode中多余的证书 ~/Library/MobileDevice/Provisioning Profiles 清除项目的缓存 Clean清除缓存或者使用⌘ + ⇧ + k快捷键来清除 清除Derived Data的缓存 清除Derived Data的缓存,在清除缓存之前先彻底退出Xcode,然后直接删除缓存文件夹。 ~/Library/Developer/Xcode/DerivedData……

阅读全文