您的当前位置:首页正文

小工具 小技巧

来源:花图问答
Paste_Image.png

2.清除xcode所有的描述文件
首先cd到目录”~/Library/MobileDevice/Provisioning\ Profiles”

cd ~/Library/MobileDevice/Provisioning\ Profiles/

然后删除里面所有的mobileprovision文件

sudo rm *.mobileprovision

3.苹果开发者的电话
4006701855
4.collectionview
collectionview reload 完,setContentOffset 不起效果

[self.collectionView reloadData];
[self.collectionView setContentOffset:CGPointMake(kScreenWidth*self.articleNumber, 0) animated:YES];
    [self.collectionView reloadData];
    [self.collectionView performBatchUpdates:^{
        [self.collectionView setContentOffset:CGPointMake(kScreenWidth*self.articleNumber, 0) animated:YES];
    } completion:^(BOOL finished) {
        
    }];

5.The following untracked working tree files would be overwritten by merge: .DS_Store

git clean -d -fx

6.mac 模拟post 请求 并且下载文件
curl 命令

curl -o 5.sqlite -d "version=902&id=5&os=1&uid=5914891&sign=5200fbe495f48ffbfe8b137267e6f35f&uuid=v87818a0daaaf6f07aeebcdc9424755f" 

7.隐藏ios navigationbar 系统的返回按钮
[self.navigationItem setHidesBackButton:YES];
8.runtime提供了一个方法直接可以获取已经安装app的bundle id

include <objc/runtime.h>

Class LSApplicationWorkspace_class = objc_getClass("LSApplicationWorkspace");
NSObject* workspace = [LSApplicationWorkspace_class performSelector:@selector(defaultWorkspace)];
NSLog(@"apps: %@", [workspace performSelector:@selector(allApplications)]);
8.清除所有的mobileprovision
cd ~/Library/MobileDevice/Provisioning\ Profiles/
rm *.mobileprovision