例如,我的Podfile有
pod x
pod y
pod z
当我跑步时pod install,除了'x','y'和'z'之外,还会安装'a','b'和'c'.如果我想找出'a'来自哪里,(它来自'x'或'y'或'z',还是他们分享),我怎么知道?
这是代码片段
self.xyzIcon = [UIImage mobileImageNamed:@"icon_xyz"];
self.xyzIconImageView = [UIImageView new];
[self.contentView addSubview:self.xyzIconImageView];
[self.xyzIconImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(weakSelf.contentView.mas_left);
make.width.equalTo(@(weakSelf.xyzIcon.size.width));
make.height.equalTo(@(weakSelf.xyzIcon.size.height));
}];
Run Code Online (Sandbox Code Playgroud)
在视图控制器中,它使用tableview
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
if (!self.prototypeCell) {
self.prototypeCell = [UITableViewCell new];
}
[self.prototypeCell configure];
CGFloat heightCalculated = [self.prototypeCell.contentView systemLayoutSizeFittingSize:UILayoutFittingCompressedSize].height + 1.f;
NSLog(@"Height calculated %f", heightCalculated);
returns heightCalculated;
}
Run Code Online (Sandbox Code Playgroud)
这总是返回1.f. 请帮助,我不知道我在这里做错了什么.
这是我试过的代码片段:
[library writeImageToSavedPhotosAlbum:self.checkInImage.CGImage metadata:self.metadata
completionBlock :^(NSURL * assetURL, NSError * error) {
NSLog (@"Asset url = %@", assetURL);
NSError *err;
NSString *docDir = [NSSearchPathForDirectoriesInDomains (NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0];
NSString *jpgFilePath = [NSString stringWithFormat:@"%@/test.jpg", docDir];
NSFileManager *fileManager = [NSFileManager defaultManager];
[fileManager moveItemAtURL:assetURL toURL:[NSURL URLWithString:jpgFilePath] error:&err];
NSLog(@"error is %@", err);
}];
Run Code Online (Sandbox Code Playgroud)
我收到错误,因为错误域= NSCocoaErrorDomain Code = 262"操作无法完成.(Cocoa错误262.)"UserInfo = 0xb49a680 {NSURL = assets-library://asset/asset.JPG?id = 6FAC823A- 33CB-489B-A125-714FBA5F0EE8&EXT = JPG}
有任何想法吗?